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

Commit

Permalink
Browse files Browse the repository at this point in the history
…l-Tool into dev
  • Loading branch information
J0seph0 committed Mar 7, 2024
2 parents 4401dc8 + b795e41 commit be55cdd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
6 changes: 5 additions & 1 deletion ActiveDirectoryQuerier/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@
<!-- TextBox as Console Output -->
<TextBox Text="{Binding PowerShellOutput}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"/>
</Grid>
<!-- Menu options -->
<!-- TextBox as Active Directory Output -->
<TextBox Text="{Binding ActiveDirectoryInfoOutput}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"/>
</Grid>

<!-- Menu options -->
<Menu Grid.Row="0" x:Name="OptionsMenu" Width="Auto" Height="20" Margin="10,15,934,64">

Check failure on line 199 in ActiveDirectoryQuerier/MainWindow.xaml

View workflow job for this annotation

GitHub Actions / build (x64)

The object 'TabItem' already has a child and cannot add 'Menu'. 'TabItem' can accept only one child. Line 199 Position 116.

Check failure on line 199 in ActiveDirectoryQuerier/MainWindow.xaml

View workflow job for this annotation

GitHub Actions / build (x64)

The object 'TabItem' already has a child and cannot add 'Menu'. 'TabItem' can accept only one child. Line 199 Position 116.
<MenuItem Header="Options">
<MenuItem Header="Add New Command Slot"
Expand Down
28 changes: 25 additions & 3 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ namespace ActiveDirectoryQuerier;
/// </summary>
public sealed class MainWindowViewModel : INotifyPropertyChanged
{
// [ Fields ]-------------------------------------------------------------------- //
// [ Fields ] ------------------------------------------------------------------- //
// [[ Event handler property ]] ------------------------------------------------- //

public event PropertyChangedEventHandler? PropertyChanged;

// [[ Backing fields for properties ]] ------------------------------------------ //

private string _powerShellOutput;
private string _activeDirectoryInfoOutput; // Pieter TODO
private string _queryName;
private string _queryDescription;
private bool _editingEnabled;
Expand Down Expand Up @@ -68,6 +69,16 @@ public string PowerShellOutput
}
}

// Pieter TODO
public string ActiveDirectoryInfoOutput
{
get => _activeDirectoryInfoOutput;
set {
_activeDirectoryInfoOutput = value;
OnPropertyChanged(nameof(ActiveDirectoryInfoOutput));
}
}

/// <summary>
/// The name of the query.
/// </summary>
Expand Down Expand Up @@ -108,7 +119,7 @@ public Command? SelectedComboBoxCommand
_selectedComboBoxCommand = value;
OnPropertyChanged(nameof(SelectedComboBoxCommand));
// No need to load parameters if the command is null.
if (value is not null)
if (value is not null)
{
LoadCommandParametersAsync(value); // TODO: TODO: Maybe change this method to synchronous...
}
Expand Down Expand Up @@ -148,7 +159,7 @@ public Command? SelectedComboBoxCommand
public ICommand SaveCustomQueriesRelay { get; }

/// <summary>
/// This is the command tied to Clear Query calls the ClearQueryBuilder method
/// This is the command tied to Clear Query calls the ClearQueryBuilder method
/// </summary>
public ICommand ClearQueryBuilderRelay { get; }

Expand Down Expand Up @@ -244,6 +255,17 @@ public MainWindowViewModel()
/// This method will edit the Query and fill out the field with the desired query and you can edit the query
/// </summary>
/// <param name="sender">This is the object that is clicked when executing</param>

///Pieter TODO (New Code)
/*public void ActiveDirectoryInfo()
{
PowerShellExecutor powerShell = new PowerShellExecutor();
Command command = new Command("Get-ADUser");
command.Parameters.Add("Filter", "*");
Collection<PSObject> ReturnValue results = powerShell.ExecuteCommand(command);
}*/

private void EditCustomQuery(object sender)
{
// Get the button that we are editing
Expand Down

0 comments on commit be55cdd

Please sign in to comment.