Ejemplo n.º 1
0
 public void ResetCurrentIcon()
 {
     m_currentIcon      = Properties.Resources.TrayNormal;
     m_currentTooltip   = Strings.MainForm.TrayStatusReady;
     m_currentIconState = DuplicatiRunner.RunnerResult.OK;
     UpdateTrayIcon();
 }
Ejemplo n.º 2
0
        public void SetCurrentIcon(DuplicatiRunner.RunnerResult icon, string message)
        {
            if (icon == DuplicatiRunner.RunnerResult.Error)
            {
                m_currentIcon      = Properties.Resources.TrayNormalError;
                m_currentIconState = icon;
                m_currentTooltip   = message;
            }
            else if ((icon == DuplicatiRunner.RunnerResult.Warning || icon == DuplicatiRunner.RunnerResult.Partial) && m_currentIconState != DuplicatiRunner.RunnerResult.Error)
            {
                m_currentIcon      = Properties.Resources.TrayNormalWarning;
                m_currentIconState = icon;
                m_currentTooltip   = message;
            }

            UpdateTrayIcon();
        }
Ejemplo n.º 3
0
        void Runner_ResultEvent(DuplicatiRunner.RunnerResult result, string parsedMessage, string message)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new DuplicatiRunner.ResultEventDelegate(Runner_ResultEvent), result, parsedMessage, message);
                return;
            }

            string name = "";

            //Dirty read of the instance variable
            try { name = Program.WorkThread.CurrentTask.Schedule.Name; }
            catch { }

            if (result == DuplicatiRunner.RunnerResult.Error)
            {
                SetCurrentIcon(result, String.Format(Strings.MainForm.BalloonTip_Error, name, parsedMessage));
            }
            else if (result == DuplicatiRunner.RunnerResult.Partial || result == DuplicatiRunner.RunnerResult.Warning)
            {
                SetCurrentIcon(result, String.Format(Strings.MainForm.BalloonTip_Warning, name));
            }


            if (result == DuplicatiRunner.RunnerResult.OK || m_settings.BallonNotificationLevel == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.Off)
            {
                return;
            }

            if (result == DuplicatiRunner.RunnerResult.Error)
            {
                m_trayIcon.ShowBalloonTip(BALLOON_SHOW_TIME, Application.ProductName, String.Format(Strings.MainForm.BalloonTip_Error, name, parsedMessage), ToolTipIcon.Error);
            }

            else if (result == DuplicatiRunner.RunnerResult.Warning || result == DuplicatiRunner.RunnerResult.Partial)
            {
                m_trayIcon.ShowBalloonTip(BALLOON_SHOW_TIME, Application.ProductName, String.Format(Strings.MainForm.BalloonTip_Warning, name), ToolTipIcon.Warning);
            }
        }
Ejemplo n.º 4
0
        public void SetCurrentIcon(DuplicatiRunner.RunnerResult icon, string message)
        {
            if (icon == DuplicatiRunner.RunnerResult.Error)
            {
                m_currentIcon = Properties.Resources.TrayNormalError;
                m_currentIconState = icon;
                m_currentTooltip = message;

            }
            else if ((icon == DuplicatiRunner.RunnerResult.Warning || icon == DuplicatiRunner.RunnerResult.Partial) && m_currentIconState != DuplicatiRunner.RunnerResult.Error)
            {
                m_currentIcon = Properties.Resources.TrayNormalWarning;
                m_currentIconState = icon;
                m_currentTooltip = message;
            }

            UpdateTrayIcon();
        }
Ejemplo n.º 5
0
 public void ResetCurrentIcon()
 {
     m_currentIcon = Properties.Resources.TrayNormal;
     m_currentTooltip = Strings.MainForm.TrayStatusReady;
     m_currentIconState = DuplicatiRunner.RunnerResult.OK;
     UpdateTrayIcon();
 }