public ApplicationContext() { if (Properties.Settings.Default.CallUpgrade) { Properties.Settings.Default.Upgrade(); Properties.Settings.Default.CallUpgrade = false; Properties.Settings.Default.Save(); } _components = new System.ComponentModel.Container(); _notifyIcon = new NotifyIcon(_components) { ContextMenuStrip = new ContextMenuStrip(), Visible = true }; _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("Settings", null, new EventHandler(MenuSettingsItem_Click))); _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("Exit", null, new EventHandler(MenuExitItem_Click))); _buddies = new Buddies(); _housekeepingTimer = new System.Windows.Forms.Timer(); _housekeepingTimer.Interval = 5000; _housekeepingTimer.Tick += HousekeepingTimer_Tick; HousekeepingTimer_Tick(null, null); // tick anyway enables timer when finished _trackerStatus = TrackerStatus.OK; if (trackersConfigured()) { _trackerStatus = TrackerStatus.UNKNOWN; UpdateTrackerSetting(); } _viewModel = new ViewModel(_buddies); }
public SettingsForm(ViewModel model) { InitializeComponent(); _model = model; Icon = Properties.Resources.LyncFellow; Text += string.Format(" (Version {0})", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); if (Properties.Settings.Default.RedOnTrackerError) { OnTrackerError.Checked = true; CITrackerPath.Enabled = true; } else { CITrackerPath.Enabled = false; switch (Properties.Settings.Default.RedOnDndCallBusy) { case ContactAvailability.DoNotDisturb: OnDoNotDisturb.Checked = true; break; case ContactAvailability.Busy: OnBusy.Checked = true; break; default: OnCallConference.Checked = true; break; } } IncomingCall_DoDance.Checked = Properties.Settings.Default.IncomingCall_DoDance; IncomingCall_DoFlapWings.Checked = Properties.Settings.Default.IncomingCall_DoFlapWings; IncomingCall_DoGlowHeart.Checked = Properties.Settings.Default.IncomingCall_DoGlowHeart; IncomingCall_DoBlinkSingleColor.Checked = Properties.Settings.Default.IncomingCall_DoBlinkSingleColor; IncomingCall_DoBlinkRainbow.Checked = Properties.Settings.Default.IncomingCall_DoBlinkRainbow; NewIMConversation_DoDance.Checked = Properties.Settings.Default.NewIMConversation_DoDance; NewIMConversation_DoFlapWings.Checked = Properties.Settings.Default.NewIMConversation_DoFlapWings; NewIMConversation_DoGlowHeart.Checked = Properties.Settings.Default.NewIMConversation_DoGlowHeart; NewIMConversation_DoBlinkSingleColor.Checked = Properties.Settings.Default.NewIMConversation_DoBlinkSingleColor; NewIMConversation_DoBlinkRainbow.Checked = Properties.Settings.Default.NewIMConversation_DoBlinkRainbow; CITrackerPath.Text = Properties.Settings.Default.CITrackerPath; }