aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben Shabat <roy.mail.net@gmail.com>2025-08-24 18:50:28 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-08-24 18:50:28 +0300
commit7a222e41a3b28e6fff6917b711b794644fa04a34 (patch)
tree39381d6058770d45faa484fc08920663676d2eac /Software/Visual_Studio/MachineStudio/Modules
parentc19a442f0f110a69a1b93065ea417155510b81cd (diff)
downloadTango-7a222e41a3b28e6fff6917b711b794644fa04a34.tar.gz
Tango-7a222e41a3b28e6fff6917b711b794644fa04a34.zip
Machine Designer Improved outline.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml45
2 files changed, 50 insertions, 35 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 073f79a97..d262e154e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -240,7 +240,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
get
{
- if (Settings.UsePreferredLiquidVolumeIndex)
+ if (Settings != null && Settings.UsePreferredLiquidVolumeIndex)
{
return LiquidTypesRmls.OrderBy(x => x.LiquidType.PreferredIndex).ToList();
}
@@ -1091,26 +1091,26 @@ namespace Tango.MachineStudio.Developer.ViewModels
private void MachineOperator_ResumingJob(object sender, ResumingJobEventArgs e)
{
- if (_notification.ShowQuestion("Machine studio has detected a job in progress. Would you like to try and continue from there you were?"))
- {
- var job = _machineDbContext.Jobs.SingleOrDefault(x => x.Guid == e.JobGuid);
+ //if (_notification.ShowQuestion("Machine studio has detected a job in progress. Would you like to try and continue from there you were?"))
+ //{
+ // var job = _machineDbContext.Jobs.SingleOrDefault(x => x.Guid == e.JobGuid);
- if (job != null)
- {
- _msNavigation.NavigateToModule<DeveloperModule>();
- SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == job.MachineGuid);
- SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == job.Guid);
- LoadSelectedJob(() =>
- {
- StartJob(e.Approve);
- });
- }
- else
- {
- LogManager.Log($"Could not resume job. The running job with guid '{e.JobGuid}' was not found.");
- _notification.ShowError("Could not resume job. The running job was not found.");
- }
- }
+ // if (job != null)
+ // {
+ // _msNavigation.NavigateToModule<DeveloperModule>();
+ // SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == job.MachineGuid);
+ // SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == job.Guid);
+ // LoadSelectedJob(() =>
+ // {
+ // StartJob(e.Approve);
+ // });
+ // }
+ // else
+ // {
+ // LogManager.Log($"Could not resume job. The running job with guid '{e.JobGuid}' was not found.");
+ // _notification.ShowError("Could not resume job. The running job was not found.");
+ // }
+ //}
}
private void MachineEventsStateProvider_NewEvents(object sender, IEnumerable<MachinesEvent> events)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml
index 5278d1780..8b561db7e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml
@@ -72,7 +72,7 @@
<Grid>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
+ <ColumnDefinition Width="300"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
@@ -82,15 +82,6 @@
<RowDefinition Height="631*"/>
</Grid.RowDefinitions>
- <Grid ClipToBounds="False">
- <Button Margin="200 40 0 0" Background="{StaticResource RedBrush300}" ToolTip="Upgrade this machine configuration to GEN 2" BorderBrush="{StaticResource RedBrush300}" Width="200" Height="45" VerticalAlignment="Top" HorizontalAlignment="Left" Command="{Binding UpgradeToGen2Command}" Visibility="{Binding IsGen1Machine,Converter={StaticResource BoolToVisConverter}}">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Beta" Width="24" Height="24" />
- <TextBlock VerticalAlignment="Center" Margin="5 0 0 0">UPGRADE TO GEN 2</TextBlock>
- </StackPanel>
- </Button>
- </Grid>
-
<Viewbox MaxWidth="1200" Grid.Row="1" >
<Grid VerticalAlignment="Top">
@@ -377,23 +368,47 @@
<StackPanel Margin="20 0 0 0">
<StackPanel Orientation="Horizontal" Margin="0 3 0 3">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/injection.png" Width="12" VerticalAlignment="Center"></Image>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"><Run FontWeight="Bold">Dispenser:</Run> <Run FontStyle="Italic" Text="{Binding Dispenser.SerialNumber}"></Run></TextBlock>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
+ <Run FontWeight="Bold">Dispenser:</Run>
+ <Run FontStyle="Italic" Text="{Binding Dispenser.SerialNumber}"/>
+ </TextBlock>
+ <ComboBox Margin="5 0 0 0" VerticalAlignment="Center" DisplayMemberPath="Name" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.ActiveMachineAdapter.DispenserTypes}" SelectedItem="{Binding Dispenser.DispenserType}" Style="{x:Null}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 3 0 3">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/tank.png" Width="12" VerticalAlignment="Center"></Image>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"><Run FontWeight="Bold">Mid Tank:</Run> <Run FontStyle="Italic" Text="{Binding MidTankType.Name}"></Run></TextBlock>
+ <DockPanel Margin="5 0 0 0">
+ <TextBlock VerticalAlignment="Center" FontWeight="Bold">Mid Tank:</TextBlock>
+ <ComboBox Margin="5 0 0 0" VerticalAlignment="Center" DisplayMemberPath="Name"
+ ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.ActiveMachineAdapter.MidTankTypes}"
+ SelectedItem="{Binding MidTankType}" Style="{x:Null}"/>
+ </DockPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 3 0 3">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/cartridge.png" Width="12" VerticalAlignment="Center"></Image>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"><Run FontWeight="Bold">Cartridge:</Run> <Run FontStyle="Italic" Text="{Binding CartridgeType.Name}"></Run></TextBlock>
+ <DockPanel Margin="5 0 0 0">
+ <TextBlock VerticalAlignment="Center" FontWeight="Bold">Cartridge:</TextBlock>
+ <ComboBox Margin="5 0 0 0" VerticalAlignment="Center" DisplayMemberPath="Name"
+ ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.ActiveMachineAdapter.CartridgeTypes}"
+ SelectedItem="{Binding CartridgeType}" Style="{x:Null}"/>
+ </DockPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 3 0 3">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/liquid.png" Width="12" VerticalAlignment="Center"></Image>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"><Run FontWeight="Bold">Liquid:</Run> <Run FontStyle="Italic" Text="{Binding LiquidType.Name}"></Run></TextBlock>
+ <DockPanel Margin="5 0 0 0">
+ <TextBlock VerticalAlignment="Center" FontWeight="Bold">Liquid:</TextBlock>
+ <ComboBox Margin="19 0 0 0" VerticalAlignment="Center" DisplayMemberPath="Name"
+ ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.ActiveMachineAdapter.LiquidTypes}"
+ SelectedItem="{Binding LiquidType}" Style="{x:Null}"/>
+ </DockPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 3 0 3">
<Image RenderOptions.BitmapScalingMode="Fant" Source="../Images/formula.png" Width="12" VerticalAlignment="Center"></Image>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center"><Run FontWeight="Bold">Formula:</Run> <Run FontStyle="Italic" Text="{Binding IdsPackFormula.Name}"></Run></TextBlock>
+ <DockPanel Margin="5 0 0 0">
+ <TextBlock VerticalAlignment="Center" FontWeight="Bold">Formula:</TextBlock>
+ <ComboBox Margin="10 0 0 0" VerticalAlignment="Center" DisplayMemberPath="Name"
+ ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.ActiveMachineAdapter.IdsPackFormulas}"
+ SelectedItem="{Binding IdsPackFormula}" Style="{x:Null}"/>
+ </DockPanel>
</StackPanel>
</StackPanel>
</StackPanel>