Exemplo n.º 1
0
        private void AddTokenButtonCallback(object sender, EventArgs e)
        {
            // Open the token editor window
            TokenEditor tokenEditor = new TokenEditor();

            tokenEditor.ShowDialog();

            // If the OK button was pressed, add the token to the list
            if (tokenEditor.DialogResult == true)
            {
                control.viewModel.TokenViewModel.AddToken(tokenEditor.Token);
            }

            // Select the new token from the list
            control.viewModel.SelectedToken = tokenEditor.Token;
        }
        public void AddToken()
        {
            // Open the token editor window
            TokenEditor tokenEditor = new TokenEditor();

            tokenEditor.ShowDialog();

            // If the OK button was pressed, add the token to the list
            if (tokenEditor.DialogResult == true)
            {
                TokenViewModel.AddToken(tokenEditor.Token);
            }

            // Select the new token from the list
            SelectedToken = tokenEditor.Token;

            // Force update of tokens
            TaskViewModel.GetTasksFromApplicationObject();
            TaskViewModel.CreateFilteredTaskCollection(SelectedToken, SelectedScopeIndex);
        }