public frmAMDI_Parent() { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed CheckForUpdates(); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed InitializeComponent(); GV.ActiveScreen = Properties.Settings.Default.ActiveScreen; FC.SetFormPosition(this); //Color defaultBackColor = this.BackColor; GV.MAINMENU = this; frmLogin LoginForm = new frmLogin(); LoginForm.ShowDialog(); frmAssignment frmAssignment = new frmAssignment(); frmAssignment.MdiParent = this; frmAssignment.Dock = DockStyle.Fill; GV.ASSIGNMENTFORM = frmAssignment; int configMode = Properties.Settings.Default.DatabaseMode; if (configMode == 1) { GlobalConfig.DatabaseMode = DatabaseType.Live; } else { GlobalConfig.DatabaseMode = DatabaseType.Sandbox; } setFormText(); setDBConfigProperty(); SetMenuAccess(); }
public frmScreens() { InitializeComponent(); RadioButton[] rdo = new RadioButton[] { rdoScreen1, rdoScreen2, rdoScreen3, rdoScreen4 }; for (int i = 0; i < GV.ScreenList.Count; i++) { rdo[i].Visible = true; } rdo[GV.ActiveScreen - 1].Checked = true; FC.SetFormPosition(this); }
private void frmLogin_Load(object sender, EventArgs e) { int UserID = -1; formLoading = true; FC.SetFormPosition(this); List <UserModel> users = GlobalConfig.Connection.GenericGetAll <UserModel>("tblUsers", "LastName"); cboUser.DataSource = users; cboUser.DisplayMember = "FullName"; try { UserID = (int)Properties.Settings.Default.UserID; } catch (Exception) { } cboUser.SelectedIndex = -1; formLoading = false; SelectUser(UserID); }
private void btnClose_Click(object sender, EventArgs e) { FC.SetFormPosition(GV.MAINMENU); this.Close(); }