コード例 #1
0
ファイル: MainForm.cs プロジェクト: davgit/Gmail-Notifier
        internal void Setup()
        {
            DetectBaseUrl();

            _processMsgClosed            = false;
            _processMsg                  = new ProcessMessaging();
            _processMsg.MessageReceived += new MessageReceivedEventHandler(MessageReceived);
            _processMsg.ReceieveMessages();

            SetupThumbAndButtons();

            EnableAppropriateButtons();

            AddJumpList();

            UpdateIcon();

            if (_gmailClient.Emails.Count > 0)
            {
                _thumbForm.Invoke(new Action <int>(_thumbForm.UpdatePreviewThumb), 0);
                _thumbForm.Invoke(new Action <bool>(_thumbForm.ShowAppropriateThumb), false);
            }

            _timer          = new System.Timers.Timer();
            _timer.Interval = _checkInterval;
            _timerOn        = true;
            _timer.Elapsed += TimerElapsed;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: davgit/Gmail-Notifier
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                ProcessMessaging.SendMessage(args[0]);
                Environment.Exit(0);
                return;
            }

            bool hasMutex;

            using (Mutex mutex = new Mutex(false, "KwertyGmailNotifier", out hasMutex))
            {
                if (!hasMutex)
                {
                    ProcessMessaging.SendMessage("inbox");
                    Environment.Exit(0);
                    return;
                }

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: Katorce/Gmail-Notifier
        internal void Setup()
        {
            DetectBaseUrl();

            _processMsgClosed = false;
            _processMsg = new ProcessMessaging();
            _processMsg.MessageReceived +=new MessageReceivedEventHandler(MessageReceived);
            _processMsg.ReceieveMessages();

            SetupThumbAndButtons();

            EnableAppropriateButtons();

            AddJumpList();

            UpdateIcon();

            if (_gmailClient.Emails.Count > 0)
            {
                _thumbForm.Invoke(new Action<int>(_thumbForm.UpdatePreviewThumb), 0);
                _thumbForm.Invoke(new Action<bool>(_thumbForm.ShowAppropriateThumb), false);
            }

            _timer = new System.Timers.Timer();
            _timer.Interval = _checkInterval;
            _timerOn = true;
            _timer.Elapsed += TimerElapsed;
        }