コード例 #1
0
ファイル: MainForm.cs プロジェクト: dsuess/OutlookGoogleSync
        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;
            }
        }
コード例 #2
0
        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;
            }
        }