private void InstallApplication() { BlankForm f = new BlankForm(new ProgramDownloader(Variables.MyLibrarySelected), true) { Text = "ByteGuard Downloader (BETA - Progress Broken)" }; f.Show(); }
private void MenuItemRedeem_Click(object sender, EventArgs e) { BlankForm redeemLicenseForm = new BlankForm(new RedeemLicense(Variables.MyLicenses[ListViewLicenses.SelectedItems[0].Index]), true) { Text = "Redeem License" }; redeemLicenseForm.Show(); }
private void ButtonActivateAccount_Click(object sender, EventArgs e) { ButtonActivateAccount.Enabled = false; BlankForm f = new BlankForm(new ActivateAccount(), true); f.FormClosing += (closedSender, closedE) => ButtonActivateAccount.Enabled = (!Variables.Users.Current.IsActivated); f.Show(); }
private void ButtonAddAdministrator_Click(object sender, EventArgs e) { ButtonAddAdministrator.Enabled = false; BlankForm addAdministratorForm = new BlankForm(new AddAdmin(), true) { Text = "Add Program Administrator" }; addAdministratorForm.FormClosing += (closedSender, closedE) => ButtonAddAdministrator.Enabled = true; addAdministratorForm.Show(); }
private void ButtonAddVariable_Click(object sender, EventArgs e) { ButtonAddVariable.Enabled = false; BlankForm addVariableForm = new BlankForm(new AddVariable(), true) { Text = "Add Server Variable" }; addVariableForm.FormClosing += (closedSender, closedE) => ButtonAddVariable.Enabled = true; addVariableForm.Show(); }
private void ButtonCreateLicense_Click(object sender, EventArgs e) { ButtonCreateLicense.Enabled = false; BlankForm createLicenseForm = new BlankForm(new CreateLicense(), true) { Text = "Create License" }; createLicenseForm.FormClosing += (closedSender, closedE) => ButtonCreateLicense.Enabled = true; createLicenseForm.Show(); }
private void ButtonChangeAvatar_Click(object sender, EventArgs e) { ButtonChangeAvatar.Enabled = false; BlankForm changeAvatarForm = new BlankForm(new ChangeAvatar(), true) { Text = "ByteGuard - Change Avatar " }; changeAvatarForm.FormClosing += (closedSender, closedE) => ButtonChangeAvatar.Enabled = true; changeAvatarForm.Show(); }
private void LinkLabelViewCreator_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { LinkLabelViewCreator.Enabled = false; BlankForm viewProfileForm = new BlankForm(new ViewProfile(TextBoxCreator.Text), true) { Text = "ByteGuard - User profile" }; viewProfileForm.FormClosing += (closedSender, closedE) => LinkLabelViewCreator.Enabled = true; viewProfileForm.Show(); }
private void ButtonViewLockDetails_Click(object sender, EventArgs e) { ButtonViewLockDetails.Enabled = false; Variables.ByteGuardProgram byteguardProgram = Variables.MyLibrary[Variables.Forms.Main.MyLibrarySelectedIndex]; BlankForm f = new BlankForm(new LockDetails(byteguardProgram), true); f.FormClosing += (closedSender, closedE) => ButtonViewLockDetails.Enabled = true; f.Show(); }
private void MenuItemModify_Click(object sender, EventArgs e) { BlankForm f = new BlankForm( new ModifyLicense( Variables.MyLicenses.First( l => l.LicenseCode == ListViewLicenses.SelectedItems[0].SubItems[1].Text)), true) { Text = "Modify License" }; f.Show(); }
/// <summary> /// Displays a blank black window on all screens but the primary screen. /// see: http://stackoverflow.com/questions/1363374/showing-a-windows-form-on-a-secondary-monitor /// </summary> private static void BlankSecondaryScreens() { foreach (Screen screen in Screen.AllScreens) { if (screen.Primary == false) { System.Drawing.Rectangle bounds = screen.Bounds; Utilities.Log.WriteLine("Secondary screen: " + bounds); Form form = new BlankForm(); form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; form.StartPosition = System.Windows.Forms.FormStartPosition.Manual; form.TopMost = true; form.SetBounds(-400, -100, 10, 10); form.Show(); form.Enabled = false; form.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height); form.WindowState = FormWindowState.Maximized; } } }
private void ButtonLogout_Click(object sender, EventArgs e) { ButtonLogout.Enabled = false; if (Network.SubmitData("logout")) { Form parentForm = ParentForm; Form currentForm = FindForm(); BlankForm f = new BlankForm(new Login(false), true); if (parentForm != null) { f.FormClosed += (closedSender, closedE) => parentForm.Close(); } if (currentForm != null) { currentForm.Hide(); } f.Show(); } }