private void PreferencesPage_Load(object sender, EventArgs e) { try { defaultReminderTimeSecs.Value = Properties.Settings.Default.defaultReminderSecs; searchFrequencyMins.Value = Math.Max(1, Math.Min(Properties.Settings.Default.searchFrequencySecs / 60, searchFrequencyMins.Maximum)); reminderSoundPath.Text = Properties.Settings.Default.playSoundOnReminder; // provide default in case user forgets meetingUrlRegex.Items.Add(UpcomingMeeting.DefaultMeetingUrlRegex); meetingUrlRegex.Text = Properties.Settings.Default.meetingUrlRegex; if (string.IsNullOrWhiteSpace(meetingUrlRegex.Text)) { meetingUrlRegex.Text = UpcomingMeeting.DefaultMeetingUrlRegex; } subjectExcludeRegex.Text = Properties.Settings.Default.subjectExcludeRegex; propertyPageSite = GetPropertyPageSite(); logger.Info("Successfully loaded preferences page"); } catch (Exception ex) { logger.Error("Error loading preferences page: ", ex); throw; } }
private void SetToDirty() { isDirty = true; if (null == PropertyPageSite) { PropertyPageSite = GetPropertyPageSite(); } PropertyPageSite.OnStatusChange(); }
private void UCPropertPage_Load(object sender, EventArgs e) { //Required to make 'Apply' button work. Type myType = typeof(System.Object); string assembly = System.Text.RegularExpressions.Regex.Replace(myType.Assembly.CodeBase, "mscorlib.dll", "System.Windows.Forms.dll"); assembly = System.Text.RegularExpressions.Regex.Replace(assembly, "file:///", ""); assembly = System.Reflection.AssemblyName.GetAssemblyName(assembly).FullName; Type unmanaged = Type.GetType(System.Reflection.Assembly.CreateQualifiedName(assembly, "System.Windows.Forms.UnsafeNativeMethods")); Type oleObj = unmanaged.GetNestedType("IOleObject"); System.Reflection.MethodInfo mi = oleObj.GetMethod("GetClientSite"); object myppSite = mi.Invoke(this, null); ppSite = (Outlook.PropertyPageSite)myppSite; CheckBoxTaskInbox.Checked = Properties.Settings.Default.TaskInbox; CheckBoxTaskSent.Checked = Properties.Settings.Default.TaskSent; CheckBoxTaskDuplicates.Checked = Properties.Settings.Default.TaskDuplicates; CheckBoxTaskRouting.Checked = Properties.Settings.Default.TaskEmailRouting; }
private void UserControl1_Load(object sender, EventArgs e) { propertyPageSite = GetPropertyPageSite(); mauticUrl.Text = Globals.ThisAddIn.EndpointUrl; mauticSecret.Text = Globals.ThisAddIn.MauticSecret; }
private void WebDialerOptions_Load(object sender, EventArgs e) { _PropertyPageSite = GetPropertyPageSite(); //Databinding sourceProfile = new BindingSource(); sourceProfile.DataSource = phoneList; int selected=phoneList.SelectedIndex; cboProfile.DataSource = sourceProfile; cboProfile.DisplayMember = "description"; cboProfile.SelectedIndex = selected; txtUrl.DataBindings.Add(new Binding("Text", sourceProfile, "phoneIP")); txtUser.DataBindings.Add(new Binding("Text", sourceProfile, "user")); txtPassword.DataBindings.Add(new Binding("Text", sourceProfile, "password")); testConnection(); Dirty = false; }