Bulk Compare, Bulk Copy + bug fixes
This commit is contained in:
Mikael Karlsson
2021-07-05 18:25:33 +10:00
parent 1556c447c5
commit e66814055d
40 changed files with 1477 additions and 103 deletions

79
Xaml/BulkCompare.xaml Normal file
View File

@@ -0,0 +1,79 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5" Grid.IsSharedSizeScope='True'>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Name="grdImportProperties">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row='1' Margin="0,0,5,0">
<Label Content="Compare object" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the objects to compare e.g. compare exported files with existing objects or two existing objects based on name" />
</StackPanel>
<ComboBox Name="cbCompareProvider" Margin="0,5,0,0" MinWidth="250" Grid.Row='1' Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
</Grid>
<ContentControl Name="ccContentProviderOptions" Grid.Row="1" Grid.ColumnSpan="2" />
<Grid Grid.Row='2' VerticalAlignment="Stretch" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" Grid.Row='0'>
<Label Content="Save as" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specifies how the export csv should be saved. One file per ObjectType or one file for all objects." />
</StackPanel>
<ComboBox Name="cbCompareSave" Margin="0,5,0,0" MinWidth="250" Grid.Row='0' Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" Grid.Row='1' >
<Label Content="Comparison Type" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify how objects should be compared" />
</StackPanel>
<ComboBox Name="cbCompareType" Margin="0,5,0,0" MinWidth="250" Grid.Row='1' Grid.Column="1" HorizontalAlignment="Left"
DisplayMemberPath="Name" SelectedValuePath="Value" />
<Grid Margin="0,0,5,0" Grid.Row='2' >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Label Content="Objects to compare" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Select the object types that should be compared" />
</StackPanel>
</Grid>
<DataGrid Name="dgObjectsToCompare" Margin="0,5,0,5" Grid.Row='2' Grid.Column='1' CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White" />
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row='3' Grid.ColumnSpan='2' >
<Button Name="btnStartCompare" Content="Compare" Width='100' Margin="5,0,0,0" />
<Button Name="btnClose" Content="Close" Width='100' Margin="5,0,0,0" />
</StackPanel>
</Grid >

50
Xaml/BulkCopy.xaml Normal file
View File

@@ -0,0 +1,50 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5" Grid.IsSharedSizeScope='True'>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Name="grdImportProperties">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" >
<Label Content="Source object name pattern" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the pattern of the source objects e.g. Test -" />
</StackPanel>
<TextBox Text="" Name="txtCopyFromPattern" Grid.Column='1' Grid.Row='0' Margin="0,5,5,0" />
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" Grid.Row='1'>
<Label Content="Copy object name pattern" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the pattern of the new object e.g. Prod -" />
</StackPanel>
<TextBox Text="" Name="txtCopyToPattern" Grid.Column='1' Grid.Row='1' Margin="0,5,5,0" />
<Grid Margin="0,0,5,0" Grid.Row='2' >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Label Content="Objects to copy" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Select the object types that should be copied" />
</StackPanel>
</Grid>
<DataGrid Name="dgObjectsToCopy" Margin="0,5,0,5" Grid.Row='2' Grid.Column='1' CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White" />
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row='3' Grid.ColumnSpan='2' >
<Button Name="btnStartCopy" Content="Copy" Width='100' Margin="5,0,0,0" />
<Button Name="btnClose" Content="Close" Width='100' Margin="5,0,0,0" />
</StackPanel>
</Grid >

View File

@@ -45,7 +45,7 @@
<CheckBox Grid.Column='1' Grid.Row='1' Name='chkAddObjectType' VerticalAlignment="Center" IsEnabled="false" IsChecked="true" />
<StackPanel Orientation="Horizontal" Grid.Row='2' Margin="0,0,5,0">
<Label Content="ExportAssignments" />
<Label Content="Export Assignments" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Export object assignments" />
</StackPanel>
<CheckBox Grid.Column='1' Grid.Row='2' Name='chkExportAssignments' VerticalAlignment="Center" IsChecked="true" />

View File

@@ -0,0 +1,27 @@
<Grid Name="grdImportProperties" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" >
<Label Content="Export root" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="The root folder where exported files are stored. This sould be the Company Name folder if it was included in the export." />
</StackPanel>
<Grid Grid.Column='1' Grid.Row='0' Margin="0,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtExportPath" />
<Button Grid.Column="2" Name="browseExportPath" Padding="5,2,5,2" Width="50" ToolTip="Browse for folder">...</Button>
</Grid>
</Grid>

View File

@@ -0,0 +1,40 @@
<Grid Name="grdImportProperties" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" >
<Label Content="Source object name pattern" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the pattern of the source objects e.g. Test -" />
</StackPanel>
<TextBox Text="" Name="txtCompareSource" Grid.Column='1' Grid.Row='0' Margin="0,5,5,0" />
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" Grid.Row='1'>
<Label Content="Compare object name pattern" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the pattern of the objects that the source should be compared with e.g. Prod -" />
</StackPanel>
<TextBox Text="" Name="txtCompareWith" Grid.Column='1' Grid.Row='1' Margin="0,5,5,0" />
<StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row='2' >
<Label Content="Save folder" />
<Rectangle Style="{DynamicResource InfoIcon}" ToolTip="The folder where compare files will be saved. Default is the MyDocuments folder" />
</StackPanel>
<Grid Grid.Column='1' Grid.Row='2' Margin="0,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Text="" Name="txtSavePath" />
<Button Grid.Column="2" Name="browseSavePath" Padding="5,2,5,2" Width="50" ToolTip="Browse for folder">...</Button>
</Grid>
</Grid>

View File

@@ -34,6 +34,7 @@
<Menu Name="mnuMain" Padding="0,5,0,5" Grid.ColumnSpan="2" >
<MenuItem Header="_File" >
<MenuItem Header="_Settings" Name="mnuSettings" />
<MenuItem Header="_Release Notes" Name="mnuUpdates" />
<MenuItem Header="_About" Name="mnuAbout" />
<MenuItem Header="_Exit" Name="mnuExit" />
</MenuItem>

45
Xaml/UpdatesDialog.xaml Normal file
View File

@@ -0,0 +1,45 @@
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TabControl SelectedIndex="0" Margin="0,0,0,5">
<TabItem Header="Release Notes">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,5,0">
<TextBlock Name="txtReleaseNotes" />
</ScrollViewer>
</Grid>
</TabItem>
<TabItem Header="Local Release Notes" Name="tabLocalReleaseNotes">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,5,0">
<TextBlock Name="txtReleaseNotesLocal" />
</ScrollViewer>
</Grid>
</TabItem>
</TabControl>
<StackPanel Name="spCompareSubMenu" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row='1'>
<TextBlock Name="txtReleaseNotesMatch">
The local and GitHub versions of ReleaseNotes.md match.
</TextBlock>
<TextBlock Name="txtReleaseNotesNoMatch">
The local and GitHub versions of ReleaseNotes.md does not match. Download the latest version from
<Hyperlink Name="linkSource" NavigateUri="https://github.com/Micke-K/IntuneManagement">
GitHub
</Hyperlink>.
</TextBlock>
<Button Name="btnClose" Content="Close" Width='100' Margin="5,0,0,0" />
</StackPanel>
</Grid>