public WorkWinderDisplay() { InitializeComponent(); initializeTimers(); theme = new xColors(); initializeColors(); initializeTLP(ref baseTLP); TIMEENGINE = new TimerEngine(this, FILEMECH); FILEMECH = new FileMechanism(TIMEENGINE, this); CONFDIS = new ReportWindow(TIMEENGINE, this, FILEMECH); }
/// <summary> /// Handles stop looking correct. /// </summary> /// <param name="TLP"></param> /// <param name="stopped">TRUE means you should show stopped.</param> public static void setStopped(ref TableLayoutPanel TLP, bool stopped, xColors thm) { Label lbl = StaticUtility.getLabelYX(TLP, 0, 0); if (stopped) { lbl.Text = "Stopped"; lbl.ForeColor = thm.STOPPEDForeColor; lbl.BackColor = thm.STOPPEDBackColor; } else { lbl.Text = "Stop"; lbl.ForeColor = thm.defStopForeColor; lbl.BackColor = thm.defStopBackColor; } }
/// <summary> /// Does the visual changes /// </summary> /// <param name="TLP"></param> /// <param name="running"></param> /// <param name="active"></param> public static void setRunningRow(ref TableLayoutPanel TLP, bool running, int active, xColors thm) { TLP.SuspendLayout(); if (running) { getLabelYX(TLP, active + visualNonTimerRows, 0).BackColor = getLabelYX(TLP, active + visualNonTimerRows, 3).BackColor = thm.STARTEDBackColor; getLabelYX(TLP, active + visualNonTimerRows, 0).ForeColor = getLabelYX(TLP, active + visualNonTimerRows, 3).ForeColor = thm.STARTEDForeColor; getLabelYX(TLP, active + visualNonTimerRows, 0).Text = "Running"; getLabelYX(TLP, active + visualNonTimerRows, 0).Font = new Font("Calibri", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); getTextBoxYX(TLP, active + visualNonTimerRows, 2).ForeColor = thm.ACTIVETxtBxForeColor; getTextBoxYX(TLP, active + visualNonTimerRows, 2).BackColor = thm.ACTIVETxtBxBackColor; } else { getLabelYX(TLP, active + visualNonTimerRows, 0).BackColor = getLabelYX(TLP, active + visualNonTimerRows, 3).BackColor = thm.defStartBackColor; getLabelYX(TLP, active + visualNonTimerRows, 0).ForeColor = getLabelYX(TLP, active + visualNonTimerRows, 3).ForeColor = thm.defStartForeColor; getLabelYX(TLP, active + visualNonTimerRows, 0).Text = "u"; getLabelYX(TLP, active + visualNonTimerRows, 0).Font = new Font("Wingdings 3", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 2); getTextBoxYX(TLP, active + visualNonTimerRows, 2).ForeColor = thm.defTxtBxForeColor; getTextBoxYX(TLP, active + visualNonTimerRows, 2).BackColor = thm.defTxtBxBackColor; } TLP.ResumeLayout(false); TLP.PerformLayout(); }