void frmLogin_DoubleClick(object sender, EventArgs e) { All.Control.Metro.ItemBox btn = (All.Control.Metro.ItemBox)sender; btn.Icon = HeiFeiMideaPlayer.Properties.Resources.UseError; btn.Value = ""; frmMain.mMain.AllDataBase.FlushData.Write( string.Format("Update InfoLineStation Set UserName='' where workStation={0}", btn.Tag)); }
void frmLogin_Click(object sender, EventArgs e) { All.Control.Metro.ItemBox btn = (All.Control.Metro.ItemBox)sender; for (int i = 0; i < allTestItem.Length; i++) { allTestItem[i].Check = false; } btn.Check = true; }
private void SetWidthAndHeight(float x, float y, System.Windows.Forms.Control.ControlCollection c) { if (c == null) { return; } foreach (System.Windows.Forms.Control cc in c) { SetWidthAndHeight(x, y, cc.Controls); cc.Font = new System.Drawing.Font(cc.Font.FontFamily, cc.Font.Size * x); cc.Left = (int)(cc.Left * x); cc.Top = (int)(cc.Top * y); cc.Width = (int)(cc.Width * x); cc.Height = (int)(cc.Height * y); if (cc is All.Control.Metro.ItemBox) { All.Control.Metro.ItemBox tmp = cc as All.Control.Metro.ItemBox; tmp.TitleFont = new Font(tmp.TitleFont.FontFamily, tmp.TitleFont.Size * x); tmp.ValueFont = new Font(tmp.ValueFont.FontFamily, tmp.ValueFont.Size * x); tmp.LineBold = (int)(tmp.LineBold * x); } } }