Exemplo n.º 1
0
        public void Load()
        {
            this.JiraBaseUrl = Properties.Settings.Default.JiraBaseUrl ?? "";

            this.TimerEditable  = Properties.Settings.Default.TimerEditable;
            this.AlwaysOnTop    = Properties.Settings.Default.AlwaysOnTop;
            this.MinimizeToTray = Properties.Settings.Default.MinimizeToTray;
            this.IssueCount     = Properties.Settings.Default.IssueCount;
            this.Username       = Properties.Settings.Default.Username;
            if (Properties.Settings.Default.Password != "")
            {
                this.Password = DPAPI.Decrypt(Properties.Settings.Default.Password);
            }
            else
            {
                this.Password = "";
            }
            this.RememberCredentials = Properties.Settings.Default.RememberCredentials;
            this.FirstRun            = Properties.Settings.Default.FirstRun;
            this.SaveTimerState      = (SaveTimerSetting)Properties.Settings.Default.SaveTimerState;
            this.PauseOnSessionLock  = (PauseAndResumeSetting)Properties.Settings.Default.PauseOnSessionLock;

            this.CurrentFilter = Properties.Settings.Default.CurrentFilter;

            this.PersistedIssues = ReadIssues(Properties.Settings.Default.PersistedIssues);

            this.AllowMultipleTimers = Properties.Settings.Default.AllowMultipleTimers;
        }
Exemplo n.º 2
0
        private void ReadSettings()
        {
            this.JiraBaseUrl = Properties.Settings.Default.JiraBaseUrl ?? "";

            this.AlwaysOnTop        = Properties.Settings.Default.AlwaysOnTop;
            this.IncludeProjectName = Properties.Settings.Default.IncludeProjectName;
            this.MinimizeToTray     = Properties.Settings.Default.MinimizeToTray;
            this.IssueCount         = Properties.Settings.Default.IssueCount;
            this.Username           = Properties.Settings.Default.Username;
            if (Properties.Settings.Default.ApiToken != "")
            {
                this.ApiToken = DPAPI.Decrypt(Properties.Settings.Default.ApiToken);
            }
            else
            {
                this.ApiToken = "";
            }
            this.FirstRun           = Properties.Settings.Default.FirstRun;
            this.SaveTimerState     = (SaveTimerSetting)Properties.Settings.Default.SaveTimerState;
            this.PauseOnSessionLock = (PauseAndResumeSetting)Properties.Settings.Default.PauseOnSessionLock;
            this.PostWorklogComment = (WorklogCommentSetting)Properties.Settings.Default.PostWorklogComment;

            this.CurrentFilter = Properties.Settings.Default.CurrentFilter;

            this.PersistedIssues = ReadIssues(Properties.Settings.Default.PersistedIssues);

            this.AllowMultipleTimers = Properties.Settings.Default.AllowMultipleTimers;

            this.StartTransitions = Properties.Settings.Default.StartTransitions;

            this.LoggingEnabled = Properties.Settings.Default.LoggingEnabled;

            CheckForUpdate = Properties.Settings.Default.CheckForUpdate;
        }
Exemplo n.º 3
0
        private void ReadSettings()
        {
            this.JiraBaseUrl = Properties.Settings.Default.JiraBaseUrl ?? "";

            this.AlwaysOnTop        = Properties.Settings.Default.AlwaysOnTop;
            this.IncludeProjectName = Properties.Settings.Default.IncludeProjectName;
            this.MinimizeToTray     = Properties.Settings.Default.MinimizeToTray;
            this.IssueCount         = Properties.Settings.Default.IssueCount;
            this.Username           = Properties.Settings.Default.Username;
            if (Properties.Settings.Default.Password != "")
            {
                this.Password = DPAPI.Decrypt(Properties.Settings.Default.Password);
            }
            else
            {
                this.Password = "";
            }
            this.FirstRun           = Properties.Settings.Default.FirstRun;
            this.SaveTimerState     = (SaveTimerSetting)Properties.Settings.Default.SaveTimerState;
            this.PauseOnSessionLock = (PauseAndResumeSetting)Properties.Settings.Default.PauseOnSessionLock;
            this.PostWorklogComment = (WorklogCommentSetting)Properties.Settings.Default.PostWorklogComment;

            this.CurrentFilter = Properties.Settings.Default.CurrentFilter;

            this.PersistedIssues = ReadIssues(Properties.Settings.Default.PersistedIssues);

            if (!string.IsNullOrEmpty(Properties.Settings.Default.TotalTimeLogged) &&
                DateTime.Now.ToString("d") == Properties.Settings.Default.WorkingDate)
            {
                this.TotalTimeLogged = TimeSpan.Parse(Properties.Settings.Default.TotalTimeLogged);
            }

            this.AllowMultipleTimers = Properties.Settings.Default.AllowMultipleTimers;

            this.StartTransitions = Properties.Settings.Default.StartTransitions;

            this.LoggingEnabled = Properties.Settings.Default.LoggingEnabled;

            CheckForUpdate = Properties.Settings.Default.CheckForUpdate;
        }
Exemplo n.º 4
0
        private void ReadSettings()
        {
            this.JiraBaseUrl = Properties.Settings.Default.JiraBaseUrl ?? "";

            this.AlwaysOnTop        = Properties.Settings.Default.AlwaysOnTop;
            this.IncludeProjectName = Properties.Settings.Default.IncludeProjectName;
            this.MinimizeToTray     = Properties.Settings.Default.MinimizeToTray;
            this.IssueCounts        = ReadIssueCounts(Properties.Settings.Default.IssueCounts);
            this.TabNames           = ReadTabNames(Properties.Settings.Default.TabNames);
            this.Username           = Properties.Settings.Default.Username;
            this.PrivateApiToken    = Properties.Settings.Default.PrivateApiToken != "" ? DPAPI.Decrypt(Properties.Settings.Default.PrivateApiToken) : "";
            this.FirstRun           = Properties.Settings.Default.FirstRun;
            this.SaveTimerState     = (SaveTimerSetting)Properties.Settings.Default.SaveTimerState;
            this.PauseOnSessionLock = (PauseAndResumeSetting)Properties.Settings.Default.PauseOnSessionLock;
            this.PostWorklogComment = (WorklogCommentSetting)Properties.Settings.Default.PostWorklogComment;

            this.CurrentFilter = Properties.Settings.Default.CurrentFilter;

            this.PersistedIssues = ReadIssues(Properties.Settings.Default.PersistedIssues);

            if (this.IssueCounts == null || this.IssueCounts.Count == 0)
            {
                int count = this.PersistedIssues.Count > 0 ? this.PersistedIssues[0].Count : 0;
                if (count <= 0)
                {
                    count = 6;
                }
                this.IssueCounts = new Dictionary <int, int> {
                    { 0, count }
                };
            }
            if (this.TabNames == null)
            {
                this.TabNames = new Dictionary <int, string>();
                foreach (var count in IssueCounts)
                {
                    this.TabNames.Add(count.Key, $"Tab {count.Key}");
                }
            }

            if (!string.IsNullOrEmpty(Properties.Settings.Default.TotalTimeLogged) &&
                DateTime.Now.ToString("d") == Properties.Settings.Default.WorkingDate)
            {
                this.TotalTimeLogged = TimeSpan.Parse(Properties.Settings.Default.TotalTimeLogged);
            }

            this.AllowMultipleTimers = Properties.Settings.Default.AllowMultipleTimers;

            this.StartTransitions = Properties.Settings.Default.StartTransitions;

            this.LoggingEnabled = Properties.Settings.Default.LoggingEnabled;

            this.JiraAvatarUrl = Properties.Settings.Default.JiraAvatarUrl;

            CheckForUpdate = Properties.Settings.Default.CheckForUpdate;
        }