public void SetOpponentTry(int attempt, string code) { this._myPanels[8 + 36 + (attempt * 4) + 3].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(0, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 2].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(1, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 1].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(2, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 0].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(3, 1)) - 1); }
public void MoveCode(bool first, byte attempt) { if (first) { this._inputCode1.BackColor = this._input1.BackColor; this._inputCode2.BackColor = this._input2.BackColor; this._inputCode3.BackColor = this._input3.BackColor; this._inputCode4.BackColor = this._input4.BackColor; ResetCodes(); } else { this._myPanels[8 + (attempt * 4) + 0].BackColor = this._input1.BackColor; this._myPanels[8 + (attempt * 4) + 1].BackColor = this._input2.BackColor; this._myPanels[8 + (attempt * 4) + 2].BackColor = this._input3.BackColor; this._myPanels[8 + (attempt * 4) + 3].BackColor = this._input4.BackColor; ResetCodes(); } this._input1.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input2.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input3.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input4.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); }
private void InputCode3Clicked(object sender, MouseEventArgs e) { code3++; if (code3 > 5) { code3 = 0; } //Console.WriteLine("Changing code3 to : " + code3); this._input3.BackColor = ENUMS.GetColor((ENUMS.color)code3); _controller.InputCodeClicked(sender, e, 3); }
int GetLevel(ENUMS.PROPERTIES propertie) { return GameProperties_CT.levelOfAllUnits[unitScript.type][propertie]; }
public static void CASES() { int x_choose; try { x_choose = Convert.ToInt32(Console.ReadLine()); if (x_choose > 26 || x_choose < 1) { Console.WriteLine("\t\t\tEntered number is out of scope!"); Console.WriteLine("\t\t\tPlease, reenter number!"); CASES(); } else { switch (x_choose) { case 1: //Working with variables { Console.BackgroundColor = ConsoleColor.Green; Console.Clear(); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("1\t\t\t\tVARIABLE TYPES & LITERALS & CASTING and TYPE CONVERSIONS"); Console.WriteLine("1_1\tLITERALS"); Console.WriteLine("1_2\tVARIABLE TYPES"); Console.WriteLine("1_3\tCASTING & TYPE CONVERSIONS"); VARIABLES vars = new VARIABLES(); vars.VARIABLES_TYPES_CAST_M(); break; } case 2: //Basic operations { Console.BackgroundColor = ConsoleColor.Yellow; Console.Clear(); Console.ForegroundColor = ConsoleColor.Black; OPERATORS oper = new OPERATORS(); oper.OPERATIONS(); break; } case 3: //Conditions (IF/ELSE, SWITCH/CASE) { Console.BackgroundColor = ConsoleColor.DarkGreen; Console.Clear(); Console.ForegroundColor = ConsoleColor.White; CONDITIONS cond = new CONDITIONS(); cond.CONDITIONS_M(); break; } case 4: //Loops (FOR/WHILE/DO WHILE) { Console.BackgroundColor = ConsoleColor.Cyan; Console.Clear(); Console.ForegroundColor = ConsoleColor.DarkBlue; LOOPS loop_block = new LOOPS(); loop_block.LOOPS_M(); break; } case 5: //ARRAYS { Console.BackgroundColor = ConsoleColor.DarkMagenta; Console.Clear(); Console.ForegroundColor = ConsoleColor.White; ARRAYS arr = new ARRAYS(); arr.ARRAYS_M(); break; } case 6: //Multi-dimensional arrays { Console.BackgroundColor = ConsoleColor.DarkGray; Console.Clear(); Console.ForegroundColor = ConsoleColor.Yellow; MULTI_ARRAYS arr_m = new MULTI_ARRAYS(); arr_m.MULTI_ARRAYS_M(); break; } case 7: //Lists - we don't know number of elements, uses more memory { Console.BackgroundColor = ConsoleColor.DarkBlue; Console.Clear(); Console.ForegroundColor = ConsoleColor.White; LISTS list = new LISTS(); list.LISTS_M(); break; } case 8: //Strings { STRINGS str = new STRINGS(); str.STRINGS_M(); break; } case 9: //Try & Catch { TRY_CATCH tr = new TRY_CATCH(); tr.TRY_CATCH_M(); break; } case 10: //Object & Classes, Properties, GET/SETS (for private) { CLASSES_OBJECTS clas = new CLASSES_OBJECTS(); clas.CLASSES_OBJECTS_M(); break; } case 11: //METHODS, FUNCTIONS, { METHODS_FUNCTIONS mth = new METHODS_FUNCTIONS(); mth.METHODS_FUNCTIONS_M(); break; } case 12: //INHERITANCE, AS/IS, Virtual methods (From External Class file) { INHERITANCE_ASIS_VIRT inh = new INHERITANCE_ASIS_VIRT(); inh.INHERITANCE_ASIS_M(); break; } case 13: { MULTI_INHERITANCE m_inh = new MULTI_INHERITANCE(); m_inh.MULTI_INHERITANCE_M(); break; } case 14: { RELOAD_METHODS_OPERAT_TYPES reloading = new RELOAD_METHODS_OPERAT_TYPES(); reloading.RELOAD_METHODS_OPERAT_TYPES_M(); break; } case 15: { ENUMS enums = new ENUMS(); enums.ENUMS_M(); break; } case 16: { STRUCTURES str = new STRUCTURES(); str.STRUCTURES_M(); break; } case 17: { TUPLES tupl = new TUPLES(); tupl.TUPLES_M(); break; } case 18: { REFERENCES refer = new REFERENCES(); refer.REFERENCES_M(); break; } case 19: { SHADOWING_HIDING_METHODS shad = new SHADOWING_HIDING_METHODS(); shad.SHADOWING_HIDING_METHODS_M(); break; } case 20: { REGUL_EXP_IO reg = new REGUL_EXP_IO(); reg.REGUL_EXP_IO_M(); break; } case 21: { PREPROCESSOR_DIRECTIVES prep = new PREPROCESSOR_DIRECTIVES(); prep.PREPROCESSOR_DIRECTIVES_M(); break; } case 22: { NAMESPACES nam = new NAMESPACES(); nam.NAMESPACES_M(); break; } case 23: { NullableTypesExamples nullab = new NullableTypesExamples(); nullab.NULLABLES_M(); break; } case 24: { IDENTIFIERS iden = new IDENTIFIERS(); iden.IDENTIFIERS_M(); break; } case 25: { FILE_SYSTEM files = new FILE_SYSTEM(); files.FILE_SYSTEM_M(); break; } case 26: { LINQ link = new LINQ(); link.LINQ_M(); break; } } } } catch (Exception x) { Console.WriteLine("INFORMATIVE DESCRIPTION OF ERROR: \n " + x); CheckReturnToContent(); } }