public Options(Controller controller) { InitializeComponent(); this.controller = controller; string positionType = controller.getSetting("WindowsPositioning"); if (positionType.Equals("default")) { defaultRadio.Checked = true; } else if (positionType.Equals("center")) { centerRadio.Checked = true; } else if (positionType.Equals("custom")) { customRadio.Checked = true; } if (controller.getSetting("WarnBeforeClose").Equals("true")) { closeWarningCheckbox.Checked = true; } alertFontSizeField.Text = "" + controller.getSetting("AlertFont"); colorBox.Text = controller.getSetting("AlertBackground"); if (!colorBox.Text.Equals("Window")) { colorBox.BackColor = Color.FromArgb(System.Convert.ToInt32(colorBox.Text)); } soundBox.Text = controller.getSetting("AlertSound"); }
public Reminder19() { InitializeComponent(); controller = new Controller(); htAlerts = new Dictionary<string, Alert>(); htAlertDialogs = new Dictionary<int, Thread>(); //Take care of positioning before the app is shown string positionType = controller.getSetting("WindowsPositioning"); if (positionType.Equals("center")) { this.CenterToScreen(); } else if( positionType.Equals("custom") ) { Dictionary<string, int> settings = controller.getManagerSettings(); this.Location = new Point(settings["xpos"], settings["ypos"]); this.Size = new Size(settings["width"],settings["height"]); alertsListView.Columns[0].Width = settings["width1"]; alertsListView.Columns[1].Width = 0; alertsListView.Columns[2].Width = settings["width2"]; alertsListView.Columns[3].Width = settings["width3"]; } //See if the current registration is valid if (Registration.checkRegistration(controller.getSetting("LicenseUser"), controller.getSetting("LicenseCode"))) { Registration.markValid(); registerReminder19ToolStripMenuItem.Text = "Update License"; } //Try to create a program startup createStartupShortcut(); //Used for testing registration //Registration.test(); //Used for Testing alerts and getting the next update time //Leave commented unless you want to test //new Alert().tester(); //if (true) // Environment.Exit(0); }