void Awake() { s_instance = this; if(useMat){ timerMat = transform.parent.GetComponent<Image>().material; } thisText = GetComponent<Text>(); }
void Awake() { s_instance = this; thisText = GetComponent<Text>(); }
private void Form1_Load(object sender, EventArgs e) { Timer1.Start(); }
private void Form1_Load(object sender, EventArgs e) { Timer1.Interval = 10; Timer1.Start(); String cad = "\".*?\""; csLexer.AddTokenRule(@"usando\s+[a-zA-Z]+\s*;", "DIRECTIVA"); csLexer.AddTokenRule(@"publico\s+[_a-zA-Z]\w+\s*\(\s*\)\s*{\s*}", "CONSTRUCTOR"); csLexer.AddTokenRule(@"spacename\s+[a-zA-Z]+\s*\{\s*\}", "NOMBRE_DEL_ESPACIO"); csLexer.AddTokenRule(@"clase\s+[a-zA-Z]+\s*\{\s*\}", "CLASE"); csLexer.AddTokenRule(@"estatico\s+vacio\s+\w+\d*\s*\(\s*cadena\s*\[\]\s+argumento\s*\)\s*\{\s*\}", "PSVM"); csLexer.AddTokenRule(@"publico\s+vacio\s+[_a-zA-Z]+[0-9]*\s*\(\s*\)\{\s*\}", "METODO_VACIO"); csLexer.AddTokenRule(@"(para\s*\(\s*variable\s+\w.*\s*=\s*\d+\s*;\s*\w.*[<|>|<=|>=]\s*\d+\s*;\s*\w.*[\+\+|\-\-]\s*\)\s*{\s*})|(mientras\s*\(\s*\w.*\s*[<|>|<=|>=]\s*\d+\s*\)\s*{\s*})|(hacer\s*{\s*}mientras\s*\(expresion\)\s*;)", "CICLO"); csLexer.AddTokenRule(@"mientras\s*\(\s*verdadero\s*\)\s*{\s*}", "CICLO_INFINITO"); csLexer.AddTokenRule(@"si\s*\(\s*\w+\d*\s*(==|!=|>|<|<=|>=)\s*([+|-]?\d+(\.\d+)?)\s*\)\s*{\s*}\s?(sino\s*\(\s*\w+\d*\s*(==|!=|>|<|<=|>=)\s*([+|-]?\d+(\.\d+)?)\s*\)\s*{\s*}\s?)?(otrocaso\s*{\s*})?", "CONDICIONAL_NUMERICA"); csLexer.AddTokenRule(@"si\s*\(\s*\w+\d*\s*(==|!=)\s*([+|-]?\d+(\.\d+)?|'[^\\]'|" + cad + @")\s*\)\s*{\s*}\s?(sino\s*\(\s*\w+\d*\s*(==|!=)\s*([+|-]?\d+(\.\d+)?|'[^\\]'|" + cad + @")\s*\)\s*{\s*}\s?)?(otrocaso\s*{\s*})?", "CONDICIONAL_CADENA-CARACTER"); csLexer.AddTokenRule(@"(variable\s+[_a-zA-Z]+\s*=\s*[_a-zA-Z]+\s*;)|(variable\s+[_a-zA-Z]+\s*=\s*[-|+]?\d*\.?\d+\s*;)", "DECLARACION_GENERAL"); csLexer.AddTokenRule(@"cadena\s+[_a-zA-Z]+[0-9]*\s*=\s*" + cad + @"\s*;", "DECLARACION_CADENA"); csLexer.AddTokenRule(@"entero\s+[_a-zA-Z]+[0-9]*\s*=\s*[+|-]?[0-9]+\s*;", "DECLARACION_ENTERO"); csLexer.AddTokenRule(@"doble\s+[_a-zA-Z]+[0-9]*\s*=\s*[-|+]?\d*\.?\d+;", "DECLARACION_DOBLE"); csLexer.AddTokenRule(@"flotante\s+[_a-zA-Z]+[0-9]*\s*=\s*[-|+]?\d*\.?\d+;", "DECLARACION_FLOTANTE"); csLexer.AddTokenRule(@"caracter\s+\w+\s*=\s*'[^\\]';", "DECLARACION_CARACTER"); csLexer.AddTokenRule(@"booleano\s+\w+\s*=\s*(falso|verdadero);", "DECLARACION_BOOLEANO"); csLexer.AddTokenRule(@"publico\s+(entero|cadena|doble|flotante|booleano|caracter)\s+[_a-zA-Z]\w*\d*\s*\(\s*\)\s*{\s*retorno\s+\w*\s*;\s*}", "METODO_RETORNANTE"); csLexer.AddTokenRule(@"(entero|cadena|doble|flotante|booleano|caracter)\[\s*\]\s+[_a-zA-Z]+\d*\s*=\s*nuevo\s*(entero|cadena|doble|flotante|booleano|caracter)\s*\[\s*\d+\s*\]", "DECLARACION_VECTOR"); csLexer.AddTokenRule(@"(entero|cadena|doble|flotante|booleano|caracter)\[\s*\]\[\s*\]\s+[_a-zA-Z]+\d*\s*=\s*nuevo\s*(entero|cadena|doble|flotante|booleano|caracter)\s*\[\s*\d+\s*\]\[\s*\d+\s*\]", "DECLARACION_MATRIZ"); csLexer.AddTokenRule(@"(Consola\.EscribirLinea\(\);)|Consola\.LeerLinea\(\);", "CONSOLA"); csLexer.AddTokenRule(@"\t", "TABULACION"); // //csLexer.AddTokenRule(@"\n+", "SALTO_DE_LINEA"); csLexer.AddTokenRule(@"\s+", "ESPACIO", true); //true csLexer.AddTokenRule(@"AND|OR|NAND|NOR|NOT", "OPERADOR_LOGICO"); csLexer.AddTokenRule(@"\b[_a-zA-ZñÑáéíóúÁÉÍÓÚ][\w]*\b", "VARIABLE"); csLexer.AddTokenRule("\".*?\"", "CADENA"); csLexer.AddTokenRule(@"'\\.'|'[^\\]'", "CARACTER"); csLexer.AddTokenRule(@"//[^\r\n]*", "COMENTARIO1"); csLexer.AddTokenRule(@"/[*].*?[*]/", "COMENTARIO2"); csLexer.AddTokenRule(@"\..[^\n]*", "COMENTARIO3"); csLexer.AddTokenRule(@"[-|+]?\d*\.?\d+", "NUMERO"); csLexer.AddTokenRule(@"[\(\)\{\}\[\];,]", "DELIMITADOR"); csLexer.AddTokenRule(@">|<|==|>=|<=|!|!=", "COMPARADOR"); csLexer.AddTokenRule(@"\+\+|\-\-", "ACUMULADOR"); csLexer.AddTokenRule(@"[=\+\-/*%]|\^|\√", "OPERADOR"); csLexer.AddTokenRule(@"\\n|\\r", "RETORNO"); csLexer.AddTokenRule(@"\.", "REFERENCIADOR"); //csLexer.AddTokenRule(@"\0","NULO"); palabrasReservadas = new List <string>() { "abstracto", "como", "asincrono", "espera", "checado", "const", "continuar", "defecto", "delegate", "base", "romper", "caso", "hacer", "sino", "enumerar", "evento", "explicito", "externo", "falso", "finalmente", "arreglado", "para", "paracadauno", "ir_a", "si", "implicito", "en", "interface", "interno", "es", "cerrado", "nuevo", "nulo", "operador", "atrapar", "fuera", "anular", "parametros", "privado", "protegido", "publico", "leersolo", "referencia", "retorno", "sellado", "tamañode", "apilar_todo", "estatico", "interruptor", "este", "tirar", "verdadero", "intentar", "tipo_de", "nombre_espacio", "nochecado", "inseguro", "virtual", "vacio", "mientras", "flotante", "entero", "largo", "objeto", "obtener", "poner", "parcial", "rendimiento", "añadir", "remover", "valor", "alias", "ascendiente", "descendiente", "de", "grupo", "dentro", "ordenpor", "seleccionar", "donde", "unir", "igual", "usando", "booleano", "byte", "caracter", "decimal", "doble", "dinamico", "sbyte", "corto", "cadena", "uentero", "ulargo", "ucorto", "variable", "clase", "estructura", "spacename", "otrocaso" }; csLexer.Compile(RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.ExplicitCapture); load = true; AnalizeCode(); textoCodigo.Focus(); LlenadoTablaSimbolos(); }
public void Timer1_Tick(object sender, EventArgs e) { if (pgb.Value >= pgb.Maximum - 1) { Timer1.Stop(); // Frm_Main.Show() if (txtUsername.Text == "") { MessageBox.Show("Enter Username Please", "Username Require"); pgb.Visible = false; btLogin.Text = "ເຂົ້າສູ່ລະບົບ"; return; } if (txtPassword.Text == "") { MessageBox.Show("Enter Passwore Please", "Password Require"); pgb.Visible = false; btLogin.Text = "ເຂົ້າສູ່ລະບົບ"; return; } if (txtUsername.Text == "" && txtPassword.Text == "") { MessageBox.Show("Enter User and Password Please", "User Info Require"); pgb.Visible = false; btLogin.Text = "ເຂົ້າສູ່ລະບົບ"; return; } if (cbState.Text == "----ເລືອກສະຖານະ-----") { MessageBox.Show("Select State Please", "State Require"); pgb.Visible = false; btLogin.Text = "ເຂົ້າສູ່ລະບົບ"; return; } var sqlScript = "select Username,userpassword, userState from tb_user where username = '******' and Userpassword = '******' and userstate = '" + cbState.SelectedItem.ToString() + "'"; db.SQLCm = new SqlCommand(sqlScript, db.DatabaseConnection(constr)); db.SQLDr = db.SQLCm.ExecuteReader(); if (db.SQLDr.HasRows) { db.SQLDr.Close(); Frm_Main.Default.Show(); if (cbState.Text == "staff") { Frm_Main.Default.ButtonX6.Enabled = false; frm_OrderFood3.Default.txtprice.Enabled = false; } else if (cbState.Text == "admin") { Frm_Main.Default.ButtonX6.Enabled = true; frm_OrderFood3.Default.txtprice.Enabled = true; } // Frm_Main.lbUsername.Text = Me.txtUsername.Text this.Hide(); this.Hide(); } else { db.SQLDr.Close(); MessageBox.Show("ຊື່ ແລະລະຫັດຜູ້ໃຊ້ບໍຖຶກຕ້ອງ"); cbState.Text = "-----ເລືອກສະຖານະ-----"; txtUsername.Clear(); txtPassword.Clear(); txtUsername.Focus(); } btLogin.Text = "ເຂົ້າສູ່ລະບົບ"; pgb.Visible = false; } else { pgb.Value = pgb.Value + 5; } }
private void SetLocationMap_Load(object sender, EventArgs e) { idleTimer = DateTime.Now; Timer1.Start(); Timer1.Interval = 5000; int intHandler6; MapWinGIS.Shapefile shapefile6 = new MapWinGIS.Shapefile(); shapefile6.Open("..\\..\\shapefiles\\air lvl 1.shp"); string Label1; //define two double variables to use as a coordinates for label position double x, y; for (int i = 0; i < shapefile6.NumShapes - 1; i++) { //assign the value of the cells of the field number zero to the label Label1 = System.Convert.ToString( shapefile6.get_CellValue(1, i)); //Calculate the x position for the label x = shapefile6.get_Shape(i).Extents.xMin + (shapefile6.get_Shape(i).Extents.xMax - shapefile6.get_Shape(i).Extents.xMin) / 2; //Calculate the y position for the label y = shapefile6.get_Shape(i).Extents.yMin + (shapefile6.get_Shape(i).Extents.yMax - shapefile6.get_Shape(i).Extents.yMin) / 2; shapefile6.Labels.AddLabel(Label1, x, y, 0, -1); } intHandler6 = axMap1.AddLayer(shapefile6, true); int intHandler2; MapWinGIS.Shapefile shapefile2 = new MapWinGIS.Shapefile(); shapefile2.Open("..\\..\\shapefiles\\air lvl 2.shp"); string Label2; //define two double variables to use as a coordinates for label position for (int i = 0; i < shapefile2.NumShapes - 1; i++) { //assign the value of the cells of the field number zero to the label Label2 = System.Convert.ToString( shapefile2.get_CellValue(1, i)); //Calculate the x position for the label x = shapefile2.get_Shape(i).Extents.xMin + (shapefile2.get_Shape(i).Extents.xMax - shapefile2.get_Shape(i).Extents.xMin) / 2; //Calculate the y position for the label y = shapefile2.get_Shape(i).Extents.yMin + (shapefile2.get_Shape(i).Extents.yMax - shapefile2.get_Shape(i).Extents.yMin) / 2; shapefile2.Labels.AddLabel(Label2, x, y, 0, -1); } intHandler2 = axMap1.AddLayer(shapefile2, true); int intHandler3; MapWinGIS.Shapefile shapefile3 = new MapWinGIS.Shapefile(); shapefile3.Open("..\\..\\shapefiles\\air lvl 3.shp"); string Label3; //define two double variables to use as a coordinates for label position for (int i = 0; i < shapefile3.NumShapes - 1; i++) { //assign the value of the cells of the field number zero to the label Label3 = System.Convert.ToString( shapefile3.get_CellValue(1, i)); //Calculate the x position for the label x = shapefile3.get_Shape(i).Extents.xMin + (shapefile3.get_Shape(i).Extents.xMax - shapefile3.get_Shape(i).Extents.xMin) / 2; //Calculate the y position for the label y = shapefile3.get_Shape(i).Extents.yMin + (shapefile3.get_Shape(i).Extents.yMax - shapefile3.get_Shape(i).Extents.yMin) / 2; shapefile3.Labels.AddLabel(Label3, x, y, 0, -1); } intHandler3 = axMap1.AddLayer(shapefile3, true); int intHandler4; MapWinGIS.Shapefile shapefile4 = new MapWinGIS.Shapefile(); shapefile4.Open("..\\..\\shapefiles\\navlines.shp"); intHandler4 = axMap1.AddLayer(shapefile4, false); int intHandler5; MapWinGIS.Shapefile shapefile5 = new MapWinGIS.Shapefile(); shapefile5.Open("..\\..\\shapefiles\\navnodes.shp"); intHandler5 = axMap1.AddLayer(shapefile5, true); axMap1.SendMouseDown = true; axMap1.MouseDownEvent += axMap1_MouseDownEvent; axMap1.CursorMode = tkCursorMode.cmNone; if (File.Exists("..\\..\\devloc.txt")) { Loc = Convert.ToInt32(File.ReadAllText("..\\..\\devloc.txt")); } }
private void stopProgress() { Timer1.Stop(); progressBar1.Value = 0; }
private void searchBunifuTextBox1_TextChanged(object sender, EventArgs e) { Timer1.Stop(); Timer1.Start(); }
private void button1_Click(object sender, EventArgs e) { ImagePosition = 0; RotateImage(); Timer1.Start(); }
void Awake() { s_instance = this; thisText = GetComponent <Text>(); }
private void timer1_Tick(object sender, EventArgs e) { if (nueva > vieja) { contador = (nueva - vieja) * 65; a = a + 1; Label1.Location = new Point(x, y - a); if (a == contador) { Timer1.Stop(); y = y - a; a = 0; if (nueva == 1) { Button1.BackColor = Color.Red; } else if (nueva == 2) { Button2.BackColor = Color.Red; } else if (nueva == 3) { Button3.BackColor = Color.Red; } else if (nueva == 4) { Button4.BackColor = Color.Red; } else if (nueva == 5) { Button5.BackColor = Color.Red; } if (vieja == 1) { Button1.BackColor = Color.CadetBlue; } else if (vieja == 2) { Button2.BackColor = Color.CadetBlue; } else if (vieja == 3) { Button3.BackColor = Color.CadetBlue; } else if (vieja == 4) { Button4.BackColor = Color.CadetBlue; } else if (vieja == 5) { Button5.BackColor = Color.CadetBlue; } vieja = nueva; } } if (nueva < vieja) { contador = (vieja - nueva) * 65; a = a + 1; Label1.Location = new Point(x, y + a); if (a == contador) { Timer1.Stop(); y = y + a; a = 0; if (nueva == 1) { Button1.BackColor = Color.Red; } else if (nueva == 2) { Button2.BackColor = Color.Red; } else if (nueva == 3) { Button3.BackColor = Color.Red; } else if (nueva == 4) { Button4.BackColor = Color.Red; } else if (nueva == 5) { Button5.BackColor = Color.Red; } if (vieja == 1) { Button1.BackColor = Color.CadetBlue; } else if (vieja == 2) { Button2.BackColor = Color.CadetBlue; } else if (vieja == 3) { Button3.BackColor = Color.CadetBlue; } else if (vieja == 4) { Button4.BackColor = Color.CadetBlue; } else if (vieja == 5) { Button5.BackColor = Color.CadetBlue; } vieja = nueva; } } }
private void Buscar_servidores_Load(object sender, EventArgs e) { panelBuscandoServidor.Location = new Point((Width - panelBuscandoServidor.Width) / 2, (Height - panelBuscandoServidor.Height) / 2); PanelSinServidor.Location = new Point((Width - PanelSinServidor.Width) / 2, (Height - PanelSinServidor.Height) / 2); Timer1.Start(); }
private void Timer1_Tick(object sender, EventArgs e) { Timer1.Stop(); mostrar_usuario(); }
private void frmLogin_Load(object sender, EventArgs e) { Timer1.Start(); }
private void Customergreet_Load(object sender, EventArgs e) { Timer1.Start(); }