예제 #1
0
        private async void AddStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            var cred = new Windows.EditCredential
            {
                Owner = Window.GetWindow(this)
            };

            cred.Item.ProviderType = EditModel.SelectedItem.ChallengeProvider;

            cred.ShowDialog();

            //refresh credentials list on complete

            await EditModel.RefreshOptions();

            //await RefreshCredentialOptions();

            var credential = cred.Item;

            if (cred.Item != null && cred.Item.StorageKey != null)
            {
                // create a new challenge config based on new credentialsSelectedItem
                EditModel.SelectedItem.ChallengeProvider      = credential.ProviderType;
                EditModel.SelectedItem.ChallengeCredentialKey = credential.StorageKey;
            }
        }
예제 #2
0
        private void AddStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            var cred = new Windows.EditCredential
            {
                Owner = Window.GetWindow(this)
            };

            cred.ShowDialog();

            UpdateDisplayedCredentialsList();
        }
예제 #3
0
        private void ModifyStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            //modify the selected credential
            if (_selectedStoredCredential != null)
            {
                var d = new Windows.EditCredential(_selectedStoredCredential);
                d.Owner = Window.GetWindow(this);

                d.ShowDialog();

                UpdateDisplayedCredentialsList();
            }
        }
예제 #4
0
        private void ModifyStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            //modify the selected credential
            if (_selectedStoredCredential != null)
            {
                var d = new Windows.EditCredential
                {
                    Item  = _selectedStoredCredential,
                    Owner = Window.GetWindow(this)
                };
                d.ShowDialog();
            }

            //TODO: test credential option
        }
예제 #5
0
        private void AddStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            var cred = new Windows.EditCredential
            {
                Owner = Window.GetWindow(this)
            };

            cred.ShowDialog();

            //refresh credentials list on complete
            cred.Closed += async(object s, System.EventArgs ev) =>
            {
                await MainViewModel.RefreshStoredCredentialsList();

                this.CredentialsList.ItemsSource = MainViewModel.StoredCredentials;
            };
        }
예제 #6
0
        private void AddStoredCredential_Click(object sender, RoutedEventArgs e)
        {
            var cred = new Windows.EditCredential
            {
                Owner = Window.GetWindow(this)
            };

            cred.Item.ProviderType = Models.StandardAuthTypes.STANDARD_AUTH_PASSWORD;

            cred.ShowDialog();

            //refresh credentials list on complete

            RefreshPfxCredentials();

            var credential = cred.Item;

            if (cred.Item != null && cred.Item.StorageKey != null)
            {
                this.CertPasswordCredential.SelectedValue = credential.StorageKey;
            }
        }