Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #104 from StrangeRanger/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger authored Mar 18, 2024
2 parents 7c7553d + 691daec commit 0fbfadd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ private void CreateNewQueryFile(object _)
saveFileDialog.Filter = "Json files (*.json)|*.json|Text files (*.txt)|*.txt";
if (saveFileDialog.ShowDialog() == true)
{
File.WriteAllText(saveFileDialog.FileName, string.Empty);
QueryButtonStackPanel.Clear();
//File.WriteAllText(saveFileDialog.FileName, string.Empty);
_customQuery.CustomQueryFileLocation = saveFileDialog.FileName;
}
}
Expand Down Expand Up @@ -504,7 +505,7 @@ private void AddCommandComboBoxInQueryBuilder(object _)
private async void OutputExecutionResultsToTextFileAsync(object _)
{

if (_.GetType() == typeof(Button))
if (_ is not null)
{
var currentButton = _ as Button;
Query buttonQuery;
Expand Down Expand Up @@ -545,7 +546,7 @@ private async void OutputExecutionResultsToTextFileAsync(object _)
private async void OutputExecutionResultsToCsvFileAsync(object _)
{

if (_.GetType() == typeof(Button))
if (_ is not null)
{
var currentButton = _ as Button;
Query buttonQuery;
Expand Down Expand Up @@ -762,6 +763,8 @@ private void ClearQueryBuilder(object _)
// If the user selects yes, clear the console
if (result == MessageBoxResult.Yes)
{
QueryName = "";
QueryDescription = "";
SelectedCommandFromComboBoxInQueryBuilder = null;
DynamicallyAvailableADCommandParametersComboBox.Clear();
DynamicallyAvailableADCommandParameterValueTextBox.Clear();
Expand Down

0 comments on commit 0fbfadd

Please sign in to comment.