private void MainTimer_Tick(object sender, EventArgs e) { Panel1.Invalidate(); Panel2.Invalidate(); Panel3.Invalidate(); Panel4.Invalidate(); }
void Start() { SoundManager.instance.BgmApply(Bgm.RuleEditor); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); }
/// <summary> /// Sets interface screens according to given input /// </summary> /// <param name="step"></param> public void SetInterface(int step) { if (step == 0) { Intro.SetActive(true); Intro.SetActive(true); CloseBtn.SetActive(false); Panel1.SetActive(false); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); } else if (step == 1) { Intro.SetActive(false); CloseBtn.SetActive(true); Panel1.SetActive(true); Settings1.SetActive(false); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); } else if (step == 2) { Intro.SetActive(false); CloseBtn.SetActive(true); Panel1.SetActive(false); Panel2.SetActive(true); Settings2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); } else if (step == 3) { Intro.SetActive(false); CloseBtn.SetActive(true); Panel1.SetActive(false); Panel2.SetActive(false); Panel3.SetActive(true); Panel4.SetActive(false); } else if (step == 4) { Intro.SetActive(false); CloseBtn.SetActive(true); Panel1.SetActive(false); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(true); } }
// Use this for initialization void Start() { FadeImage.enabled = false; Mainpanel.SetActive(true); Panel1.SetActive(false); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); Panel5.SetActive(false); Gamepanel.SetActive(false); Resultpanel.SetActive(false); prevpanel = Mainpanel; PanelNumber = 0; gamemode = false; Timer = false; }
private void DoPageLoad() { Stopwatch lcStopWatch = new Stopwatch(); lcStopWatch.Reset(); lcStopWatch.Start(); tcGridViewType lcGridViewType = new tcGridViewType(teGridViewType.eePlayerPage, teSubPageType.eePlayerPageNocheck); string lpanSteamId = Request.QueryString["id"]; lpanSteamId = StaticMethods.CheckSqlReqValidity(lpanSteamId, "STEAM_0:1:5134837"); gcLabelSteamId.Text = lpanSteamId.Replace("%3a", ":"); lcGridViewType.meSub = GetGridTypeFromDropDownState(); switch (lcGridViewType.meSub) { case teSubPageType.eePlayerPageStats: ProcessStatsPage(lpanSteamId); break; case teSubPageType.eePlayerPageTag: try { ProcessTagPage(lpanSteamId); } catch (Exception e) { Debug.WriteLine("ProcessTagPage: " + e.Message); } break; default: string lpanQuery = GetQueryFromDropDownState(lpanSteamId); ProcessRecordsPage(lpanQuery, lcGridViewType); break; } tcLinkPanel.AddLinkPanel(this); Panel4.DataBind(); lcStopWatch.Stop(); gcPageLoad.Text = lcStopWatch.ElapsedMilliseconds.ToString(); }
private void frm_inicio_Load(object sender, EventArgs e) { // metodo pone un timer a funcionar para ir mostrado la hora en el sistema y se cambie timer1.Start(); // antes de iniciar el programa implementa parametros para acomodar la interfaz dependiendo de la pantalla de computador PictureBox1.SetBounds(Screen.PrimaryScreen.Bounds.Width - 150, 15, PictureBox1.Width, PictureBox1.Height); pb_inicio.SetBounds(0, Screen.PrimaryScreen.Bounds.Height - 140, pb_inicio.Width, pb_inicio.Height); PictureBox3.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, 15, PictureBox3.Width, PictureBox3.Height); PictureBox4.SetBounds(10, 30, PictureBox4.Width, PictureBox4.Height); PictureBox5.SetBounds(this.Width - 200, this.Height - 100, PictureBox5.Width, PictureBox5.Height); Label1.SetBounds(100, 30, Label1.Width, Label1.Height); nombre.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 40, nombre.Width, nombre.Height); Label4.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 15, Label4.Width, Label4.Height); Label11.SetBounds(this.Width - 245, this.Height - 120, Label11.Width, Label11.Height); Label12.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, PictureBox3.Height + 15, Label12.Width, Label12.Height); Label4.SetBounds(Screen.PrimaryScreen.Bounds.Width - 220, PictureBox1.Height, Label4.Width, Label4.Height); pn_principal.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width + pn_empleados.Width + Pn_pagos.Width + 400, Panel4.Height + Panel1.Height + 100); Panel1.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width, Panel1.Height); pn_empleados.SetBounds(Panel1.Width + 350, PictureBox4.Height + 40, pn_empleados.Width, pn_empleados.Height); Pn_pagos.SetBounds(pn_empleados.Width + 800, PictureBox4.Height + 40, Pn_pagos.Width, Pn_pagos.Height); Panel4.SetBounds(PictureBox4.Width + 50, Panel1.Height + 200, Panel4.Width, Panel4.Height); Panel5.SetBounds(Panel4.Width + 350, Panel1.Height + 200, Panel5.Width, Panel5.Height); pn_configuracion.SetBounds(Panel5.Width + 800, Panel1.Height + 200, Panel5.Width, Panel5.Height); pn_principal.Hide(); // obtiene los datos del usuario actual por medio de la variable ID DataSet ds = conexion.sqlconsulta("Select nombre,cedula,foto from tbl_usuarios where id_usuario='" + ID.ToString() + "'"); nombre.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString(); Label4.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString(); try { PictureBox1.BackgroundImage = Image.FromFile(ds.Tables[0].Rows[0].ItemArray[3].ToString()); PictureBox1.BackgroundImageLayout = ImageLayout.Stretch; } catch (Exception ex) { PictureBox1.BackgroundImage = Image.FromFile(@"perfiles\profile.png"); PictureBox1.BackgroundImageLayout = ImageLayout.Stretch; } var busqueda = new StreamReader("configuracion.cfg"); String cadena; while ((cadena = busqueda.ReadLine()) != null) { string[] campos = cadena.Split(':'); if (campos[0].Equals("Fondo")) { this.BackgroundImage = Image.FromFile("fondo/" + campos[1]); this.BackgroundImageLayout = ImageLayout.Stretch; } cadena = busqueda.ReadLine(); } busqueda.Close(); }
private void PictureBox2_Click(object sender, EventArgs e) { // boton inicio por medio de la variable se pone en falso y muestra los modulo y si la variable es verdara oculta los modulos if (pn_principal.Visible == true) { pn_principal.Controls.RemoveAt(0); pn_principal.Hide(); if (pasar == true) { Panel1.Show(); pn_empleados.Show(); Pn_pagos.Show(); Panel4.Show(); Panel5.Show(); pn_configuracion.Show(); } else { Panel1.Show(); Panel4.Show(); } paso = false; } if (paso == true) { if (pasar == true) { Panel1.Hide(); pn_empleados.Hide(); Pn_pagos.Hide(); Panel4.Hide(); Panel5.Hide(); pn_configuracion.Hide(); } else { Panel1.Hide(); Panel4.Hide(); } paso = false; } else { if (pasar == true) { Panel1.Show(); pn_empleados.Show(); Pn_pagos.Show(); Panel4.Show(); Panel5.Show(); pn_configuracion.Show(); } else { Panel1.Show(); Panel4.Show(); } paso = true; } }
private void SB4_Click(object sender, EventArgs e) { SB4.Visible = false; models[3] = new RoadModel(crashServices[1]); Panel4.Invalidate(); }
public void PanelChange3() { Panel3.SetActive(false); Panel4.SetActive(true); }
private void btn3_Click(object sender, EventArgs e) { Panel3.Hide(); Panel4.Show(); }