Exemple #1
0
 private void OnServerUpdate(string elapsedTimeFormatted)
 {
     Console.WriteLine("elapsedTimeFormatted: " + elapsedTimeFormatted);
     if (activeWorklog == null)
     {
         activeWorklog = programManagerProvider.GetProgramManager()
                         .LogTime(selectedIssue.key, elapsedTimeFormatted);
     }
     else
     {
         var updateSuccess = programManagerProvider.GetProgramManager()
                             .UpdateLogTime(selectedIssue.key, elapsedTimeFormatted, activeWorklog.id);
     }
 }
        /// <summary>
        /// When the login button is clicked
        /// </summary>
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            WaitingForProgress();
            if (string.IsNullOrEmpty(usernameField.Text) ||
                string.IsNullOrEmpty(passwordField.Password))
            {
                return;
            }
            // Call DPAPI to encrypt data with user-specific key.
            var encryptedPassword = DPAPI.Encrypt(DPAPI.KeyType.UserKey,
                                                  passwordField.Password);

            Settings.Default.jiraurl  = serverField.Text;
            Settings.Default.username = usernameField.Text;
            Settings.Default.password = encryptedPassword;
            Settings.Default.Save();

            programManagerProvider.GetProgramManager()
            .Login(new User(usernameField.Text, passwordField.Password, serverField.Text), OnUserLoginComplete);
        }
 /// <summary>
 /// Sync the client with data on jira servers
 /// </summary>
 public void Sync()
 {
     projectDataCached = programManagerProvider.GetProgramManager().GetProjects();
     programManagerProvider.GetProgramManager().UpdateProjectData(OnProjectDataReceived);
 }
Exemple #4
0
 /// <summary>
 /// Get the list of projects from the program manager, retrieved from the server
 /// </summary>
 private void GetProjects()
 {
     projects = programManagerProvider.GetProgramManager().GetProjects();
 }