public MainForm(string startingTab = null) { log.Debug("Initialiasing MainForm."); InitializeComponent(); if (startingTab != null && startingTab == "Help") this.tabApp.SelectedTab = this.tabPage_Help; Instance = this; Social.TrackVersion(); updateGUIsettings(); Settings.Instance.LogSettings(); NotificationTray = new NotificationTray(this.trayIcon); log.Debug("Create the timer for the auto synchronisation"); OgcsTimer = new SyncTimer(); //Set up listener for Outlook calendar changes if (Settings.Instance.OutlookPush) OutlookCalendar.Instance.RegisterForPushSync(); if (Settings.Instance.StartInTray) { this.CreateHandle(); this.WindowState = FormWindowState.Minimized; } }
public MainForm(string startingTab = null) { log.Debug("Initialiasing MainForm."); InitializeComponent(); notificationTray = new NotificationTray(this.trayIcon); if (startingTab!=null && startingTab=="Help") this.tabApp.SelectedTab = this.tabPage_Help; lVersion.Text = lVersion.Text.Replace("{version}", System.Windows.Forms.Application.ProductVersion); Instance = this; updateGUIsettings(); Settings.Instance.LogSettings(); log.Debug("Create the timer for the auto synchronisation"); ogcsTimer = new Timer(); ogcsTimer.Tag = "AutoSyncTimer"; ogcsTimer.Tick += new EventHandler(ogcsTimer_Tick); //Refresh synchronizations (last and next) lLastSyncVal.Text = lastSyncDate.ToLongDateString() + " - " + lastSyncDate.ToLongTimeString(); setNextSync(getResyncInterval()); //Set up listener for Outlook calendar changes if (Settings.Instance.OutlookPush) OutlookCalendar.Instance.RegisterForAutoSync(); if (Settings.Instance.StartInTray) { this.CreateHandle(); this.WindowState = FormWindowState.Minimized; } }