Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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());
            }
        }
Ejemplo n.º 3
0
        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;
        }