diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner')
3 files changed, 10 insertions, 125 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index 0bd8f8133..1f410d49c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -205,12 +205,10 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels List<ICollectionView> collections = new List<ICollectionView>(); + collections.Add(Adapter.ApplicationFirmwareVersionsViewSource); collections.Add(Adapter.ApplicationDisplayPanelVersionsViewSource); - collections.Add(Adapter.ApplicationVersionsViewSource); - collections.Add(Adapter.EmbeddedSoftwareVersionsViewSource); - collections.Add(Adapter.EmbeddedFirmwareVersionsViewSource); collections.Add(Adapter.ApplicationOsVersionsViewSource); - collections.Add(Adapter.ApplicationVersionsViewSource); + collections.Add(Adapter.EmbeddedFirmwareVersionsViewSource); collections.Add(Adapter.DispenserTypesViewSource); collections.Add(Adapter.CartridgeTypesViewSource); collections.Add(Adapter.LiquidTypesViewSource); @@ -274,16 +272,6 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } /// <summary> - /// Drops the application version. - /// </summary> - /// <param name="applicationVersion">The application version.</param> - public void DropApplicationVersion(ApplicationVersion applicationVersion) - { - Configuration.ApplicationVersion = applicationVersion; - Configuration.ApplicationVersionGuid = applicationVersion.Guid; - } - - /// <summary> /// Drops the hardware version. /// </summary> /// <param name="hardwareVersion">The hardware version.</param> @@ -304,23 +292,13 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } /// <summary> - /// Drops the embedded software. - /// </summary> - /// <param name="embeddedSoftwareVersion">The embedded software version.</param> - public void DropEmbeddedSoftware(EmbeddedSoftwareVersion embeddedSoftwareVersion) - { - Configuration.EmbeddedSoftwareVersion = embeddedSoftwareVersion; - Configuration.EmbeddedSoftwareVersionGuid = embeddedSoftwareVersion.Guid; - } - - /// <summary> /// Drops the application os version. /// </summary> /// <param name="applicationOsVersion">The application os version.</param> public void DropApplicationOsVersion(ApplicationOsVersion applicationOsVersion) { Configuration.ApplicationOsVersion = applicationOsVersion; - Configuration.ApplicationVersionGuid = applicationOsVersion.Guid; + Configuration.ApplicationOsVersionGuid = applicationOsVersion.Guid; } /// <summary> @@ -457,21 +435,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels errors.Add("Application operation system is required."); } - if (Configuration.ApplicationVersion == null) - { - errors.Add("Application version is required."); - } - if (Configuration.EmbeddedFirmwareVersion == null) { errors.Add("Embedded firmware is required."); } - if (Configuration.EmbeddedSoftwareVersion == null) - { - errors.Add("Embedded software is required."); - } - if (Configuration.HardwareVersion == null) { errors.Add("Hardware version is required."); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml index 79949405e..4e3e31326 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -130,7 +130,7 @@ </Border> </Grid> - <TextBlock Canvas.Left="532" FontStyle="Italic" Foreground="Gray" Canvas.Top="-22">Hardware</TextBlock> + <TextBlock Canvas.Left="532" FontStyle="Italic" Foreground="Gray" Canvas.Top="-22">Hardware Version</TextBlock> <Grid Width="97" Height="90" Canvas.Left="431" Canvas.Top="-13"> <Rectangle Stroke="Gray" VerticalAlignment="Top" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> @@ -293,22 +293,10 @@ </Grid> <Grid Width="61" IsHitTestVisible="True" SnapsToDevicePixels="True" ClipToBounds="True" Height="42" Canvas.Left="85" Canvas.Top="385"> - <Grid.RowDefinitions> - <RowDefinition Height="1*" /> - <RowDefinition Height="1*" /> - </Grid.RowDefinitions> - <StackPanel Orientation="Horizontal"> <Image Source="../Images/embedded.png" Width="10" VerticalAlignment="Center" Margin="1" RenderOptions.BitmapScalingMode="Fant"></Image> <TextBlock VerticalAlignment="Center" Padding="1" Foreground="Gainsboro" IsHitTestVisible="False" FontSize="5" TextAlignment="Center" TextWrapping="Wrap" Height="15" Margin="0,6,0,0" Width="47"><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Name}"/><Run Text=" "/><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Version}"/></TextBlock> </StackPanel> - <StackPanel Grid.Row="1" Orientation="Horizontal"> - <Image Source="../Images/embedded-software.png" Width="10" VerticalAlignment="Center" Margin="1" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="1" IsHitTestVisible="False" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="5" TextAlignment="Center" TextWrapping="Wrap" Height="14" Margin="0,6,0,1" Width="47"> - <Run Text="{Binding Configuration.EmbeddedSoftwareVersion.Name}"></Run> - <Run Text="{Binding Configuration.EmbeddedSoftwareVersion.Version}"></Run> - </TextBlock> - </StackPanel> </Grid> <TextBlock Canvas.Top="163" Canvas.Left="288" FontStyle="Italic" Foreground="Gray">Touch Panel</TextBlock> @@ -356,7 +344,6 @@ <RowDefinition Height="1*" /> <RowDefinition Height="1*" /> <RowDefinition Height="1*" /> - <RowDefinition Height="1*" /> </Grid.RowDefinitions> <StackPanel> @@ -367,16 +354,8 @@ </TextBlock> </StackPanel> - <StackPanel Grid.Row="2" > - <Image Source="../Images/app.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="Gainsboro" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> - <Run Text="{Binding Configuration.ApplicationVersion.Name}"></Run> - <Run Text="{Binding Configuration.ApplicationVersion.Version}"></Run> - </TextBlock> - </StackPanel> - - <StackPanel Grid.Row="3" > + <StackPanel Grid.Row="1" > <Image Source="../Images/application-firmware.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="Gainsboro" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> <Run Text="{Binding Configuration.ApplicationFirmwareVersion.Name}"></Run> @@ -384,7 +363,7 @@ </TextBlock> </StackPanel> - <StackPanel Grid.Row="1" > + <StackPanel Grid.Row="2" > <Image Source="../Images/android.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="Gainsboro" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> <Run Text="{Binding Configuration.ApplicationOsVersion.Name}"></Run> @@ -628,7 +607,7 @@ </ListBox> </Expander> <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> - <Expander HorizontalAlignment="Stretch" Header="Formulas"> + <Expander HorizontalAlignment="Stretch" Header="IDS Pack Formulas"> <ListBox ItemsSource="{Binding Adapter.IdsPackFormulasViewSource}" HorizontalContentAlignment="Stretch"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> @@ -708,33 +687,6 @@ </ListBox> </Expander> <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> - <Expander HorizontalAlignment="Stretch" Header="Application Softwares"> - <ListBox ItemsSource="{Binding Adapter.ApplicationVersionsViewSource}" HorizontalContentAlignment="Stretch"> - <ListBox.ItemContainerStyle> - <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> - <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> - <Setter Property="Padding" Value="1"></Setter> - </Style> - </ListBox.ItemContainerStyle> - <ListBox.ItemTemplate> - <DataTemplate> - <Grid Background="Transparent" IsHitTestVisible="True" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"> - <StackPanel Orientation="Horizontal" Margin="2 8"> - <Image IsHitTestVisible="False" Width="24" Height="24" Source="../Images/app.png" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant"></Image> - <StackPanel Margin="5 0 0 0" IsHitTestVisible="False"> - <TextBlock IsHitTestVisible="False" FontSize="10" Foreground="DimGray"><Run Text="{Binding Name}"></Run></TextBlock> - <TextBlock IsHitTestVisible="False" FontSize="10" Foreground="DimGray"><Run>v</Run><Run Text="{Binding Version}"></Run></TextBlock> - </StackPanel> - </StackPanel> - - <Rectangle Margin="0 10 0 0" VerticalAlignment="Bottom" Stroke="Gainsboro" StrokeThickness="1"></Rectangle> - </Grid> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> - </Expander> - <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> <Expander HorizontalAlignment="Stretch" Header="Application Firmwares"> <ListBox ItemsSource="{Binding Adapter.ApplicationFirmwareVersionsViewSource}" HorizontalContentAlignment="Stretch"> <ListBox.ItemContainerStyle> @@ -789,34 +741,7 @@ </ListBox> </Expander> <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> - <Expander HorizontalAlignment="Stretch" Header="Embedded Softwares"> - <ListBox ItemsSource="{Binding Adapter.EmbeddedSoftwareVersionsViewSource}" HorizontalContentAlignment="Stretch"> - <ListBox.ItemContainerStyle> - <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> - <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> - <Setter Property="Padding" Value="1"></Setter> - </Style> - </ListBox.ItemContainerStyle> - <ListBox.ItemTemplate> - <DataTemplate> - <Grid Background="Transparent" IsHitTestVisible="True" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"> - <StackPanel Orientation="Horizontal" Margin="2 8"> - <Image IsHitTestVisible="False" Width="24" Height="24" Source="../Images/embedded-software.png" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant"></Image> - <StackPanel Margin="5 0 0 0" IsHitTestVisible="False"> - <TextBlock IsHitTestVisible="False" FontSize="10" Foreground="DimGray"><Run Text="{Binding Name}"></Run></TextBlock> - <TextBlock IsHitTestVisible="False" FontSize="10" Foreground="DimGray"><Run>v</Run><Run Text="{Binding Version}"></Run></TextBlock> - </StackPanel> - </StackPanel> - - <Rectangle Margin="0 10 0 0" VerticalAlignment="Bottom" Stroke="Gainsboro" StrokeThickness="1"></Rectangle> - </Grid> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> - </Expander> - <Border Height="1" HorizontalAlignment="Stretch" Background="{DynamicResource MaterialDesignDivider}" SnapsToDevicePixels="True" /> - <Expander HorizontalAlignment="Stretch" Header="Hardwares"> + <Expander HorizontalAlignment="Stretch" Header="Hardware Versions"> <ListBox ItemsSource="{Binding Adapter.HardwareVersionsViewSource}" HorizontalContentAlignment="Stretch"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs index 67d42a350..9c7496484 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml.cs @@ -67,11 +67,11 @@ namespace Tango.MachineStudio.MachineDesigner.Views { SetHighlightRegion(hardwareGrid); } - else if (e.DataContext is ApplicationVersion || e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion || e.DataContext is ApplicationFirmwareVersion) + else if (e.DataContext is ApplicationOsVersion || e.DataContext is ApplicationDisplayPanelVersion || e.DataContext is ApplicationFirmwareVersion) { SetHighlightRegion(gridTablet); } - else if (e.DataContext is EmbeddedFirmwareVersion || e.DataContext is EmbeddedSoftwareVersion) + else if (e.DataContext is EmbeddedFirmwareVersion) { SetHighlightRegion(gridEmbedded); } @@ -123,10 +123,6 @@ namespace Tango.MachineStudio.MachineDesigner.Views { _vm.DropTouchPanel(e.Draggable.DataContext as ApplicationDisplayPanelVersion); } - else if (e.Draggable.DataContext is ApplicationVersion) - { - _vm.DropApplicationVersion(e.Draggable.DataContext as ApplicationVersion); - } else if (e.Draggable.DataContext is ApplicationOsVersion) { _vm.DropApplicationOsVersion(e.Draggable.DataContext as ApplicationOsVersion); @@ -143,10 +139,6 @@ namespace Tango.MachineStudio.MachineDesigner.Views { _vm.DropEmbeddedFirmware(e.Draggable.DataContext as EmbeddedFirmwareVersion); } - else if (e.Draggable.DataContext is EmbeddedSoftwareVersion) - { - _vm.DropEmbeddedSoftware(e.Draggable.DataContext as EmbeddedSoftwareVersion); - } } private void MachineDrop(object sender, DropEventArgs e) |
