diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
2 files changed, 172 insertions, 48 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 621ce550b..34a4ff470 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 @@ -7,6 +7,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.Common.StudioApplication; using Tango.SharedUI; @@ -14,6 +15,8 @@ namespace Tango.MachineStudio.Developer.ViewModels { public class MainViewVM : ViewModel { + private INotificationProvider _notification; + public IStudioApplicationManager ApplicationManager { get; set; } public ObservablesEntitiesAdapter Adapter { get; set; } @@ -34,18 +37,43 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); } } - private ObservableCollection<RmlsProcessParametersTable> _rmlProcessParametersTables; + private ProcessParametersTablesGroup _rmlProcessParametersTablesGroup; + + public ProcessParametersTablesGroup RmlProcessParametersTableGroup + { + get { return _rmlProcessParametersTablesGroup; } + set { _rmlProcessParametersTablesGroup = value; RaisePropertyChangedAuto(); } + } + + private ProcessParametersTablesGroup _selectedGroupHistory; + + public ProcessParametersTablesGroup SelectedGroupHistory + { + get { return _selectedGroupHistory; } + set { _selectedGroupHistory = value; RaisePropertyChangedAuto(); OnSelectedGroupHistoryChanged(); } + } + + private void OnSelectedGroupHistoryChanged() + { + if (SelectedGroupHistory != null) + { + RmlProcessParametersTableGroup = SelectedGroupHistory.CloneGroup(); + } + } + + private ObservableCollection<ProcessParametersTablesGroup> _groupsHistory; - public ObservableCollection<RmlsProcessParametersTable> RmlProcessParametersTables + public ObservableCollection<ProcessParametersTablesGroup> GroupsHistory { - get { return _rmlProcessParametersTables; } - set { _rmlProcessParametersTables = value; RaisePropertyChangedAuto(); } + get { return _groupsHistory; } + set { _groupsHistory = value; RaisePropertyChangedAuto(); } } - private DBViewContextWrapper<Rml> _selectedRML; - public DBViewContextWrapper<Rml> SelectedRML + private Rml _selectedRML; + + public Rml SelectedRML { get { return _selectedRML; } set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateLiquidFactorsAndProcessTables(); InvalidateRelayCommands(); } @@ -66,24 +94,48 @@ namespace Tango.MachineStudio.Developer.ViewModels public RelayCommand ToggleSideBarCommand { get; set; } + public RelayCommand SaveProcessParametersCommand { get; set; } + + public RelayCommand SaveLiquidFactorsCommand { get; set; } + public MainViewVM() { IsSideBarOpened = true; } [PreferredConstructor] - public MainViewVM(IStudioApplicationManager applicationManager) + public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider) { + _notification = notificationProvider; Adapter = ObservablesEntitiesAdapter.Instance; EditMachineCommand = new RelayCommand(EditMachine, (x) => SelectedMachine != null); ApplicationManager = applicationManager; EditRMLCommand = new RelayCommand(EditRML, (x) => SelectedRML != null); ToggleSideBarCommand = new RelayCommand(() => IsSideBarOpened = !IsSideBarOpened); + SaveProcessParametersCommand = new RelayCommand(SaveProcessParameters); + SaveLiquidFactorsCommand = new RelayCommand(SaveLiquidFactors); + } + + private async void SaveLiquidFactors() + { + if (SelectedRML != null) + { + using (_notification.PushTaskItem("Saving Liquid Factors...")) + { + String machineGuid = SelectedMachine.Guid; + String rmlGuid = SelectedRML.Guid; + + await SelectedRML.SaveAsync(); + + SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid); + SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid); + } + } } private void EditRML() { - ApplicationManager.RequestModule("Data Base", SelectedRML.EditEntity); + ApplicationManager.RequestModule("Data Base", SelectedRML); } private void EditMachine() @@ -96,12 +148,60 @@ namespace Tango.MachineStudio.Developer.ViewModels InvalidateLiquidFactorsAndProcessTables(); } + private async void SaveProcessParameters() + { + var response = _notification.ShowTextInput("Enter Group Name", "Group Name"); + + if (response == null) return; + + using (_notification.PushTaskItem("Saving Parameters Group...")) + { + ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); + + List<ProcessParametersTable> tables = new List<ProcessParametersTable>(); + foreach (var table in RmlProcessParametersTableGroup.ProcessParametersTables) + { + var newTable = table.CloneEntity(); + newTable.ProcessParametersTablesGroups = group; + tables.Add(newTable); + } + + group.Active = true; + group.ProcessParametersTables = tables.ToObservableCollection(); + group.Rml = SelectedRML; + group.Name = response; + group.SaveDate = DateTime.UtcNow; + + foreach (var g in SelectedRML.ProcessParametersTablesGroups) + { + g.Active = false; + } + + String machineGuid = SelectedMachine.Guid; + String rmlGuid = SelectedRML.Guid; + + SelectedRML.ProcessParametersTablesGroups.Add(group); + await SelectedRML.SaveAsync(); + + SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid); + SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid); + } + } + private void InvalidateLiquidFactorsAndProcessTables() { if (SelectedRML != null && SelectedMachine != null) { - LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.EditEntity.Guid).ToList(); - RmlProcessParametersTables = SelectedRML.EditEntity.RmlsProcessParametersTables.ToObservableCollection(); + LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); + RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.SingleOrDefault(x => x.Active); + + if (RmlProcessParametersTableGroup != null) + { + RmlProcessParametersTableGroup = RmlProcessParametersTableGroup.CloneGroup(); + RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToObservableCollection(); + } + + GroupsHistory = SelectedRML.ProcessParametersTablesGroups.OrderByDescending(x => x.SaveDate).OrderBy(x => !x.Active).ToObservableCollection(); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index d6cba4914..fa6cbbd76 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -77,18 +77,45 @@ <Expander Header="PROCESS PARAMETERS" IsExpanded="True"> <Grid> <Grid Height="250"> - <StackPanel Orientation="Horizontal" Margin="20 0 0 0"> - <ItemsControl ItemsSource="{Binding RmlProcessParametersTables}"> + <StackPanel Orientation="Horizontal" Margin="25 0 0 0"> + + <Border Width="140" Margin="0 0 10 0" Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver"> + <DockPanel> + <TextBlock DockPanel.Dock="Top" VerticalAlignment="Center" Padding="2">HISTORY</TextBlock> + <ListBox Margin="0 10 0 0" ItemsSource="{Binding GroupsHistory}" SelectedItem="{Binding SelectedGroupHistory}"> + <ListBox.ItemTemplate> + <DataTemplate> + <StackPanel> + <TextBlock Text="{Binding Name}" FontSize="11" FontWeight="Bold"> + <TextBlock.Style> + <Style TargetType="TextBlock"> + <Style.Triggers> + <DataTrigger Binding="{Binding Active}" Value="True"> + <Setter Property="Foreground" Value="#FF5F5F"></Setter> + <Setter Property="FontStyle" Value="Italic"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </TextBlock.Style> + </TextBlock> + <TextBlock Text="{Binding SaveDate}" FontStyle="Italic" Foreground="Gray" FontSize="10"></TextBlock> + </StackPanel> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </DockPanel> + </Border> + <ItemsControl ItemsSource="{Binding RmlProcessParametersTableGroup.ProcessParametersTables}" IsEnabled="{Binding RmlProcessParametersTableGroup.Active}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"></WrapPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> - <DataTemplate DataType="{x:Type observables:RmlsProcessParametersTable}"> + <DataTemplate DataType="{x:Type observables:ProcessParametersTable}"> <Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver" Height="250" Margin="0 0 10 0"> <DockPanel> - <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding ProcessParametersTables.Name}"></TextBox> + <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox> <WrapPanel Orientation="Vertical" Margin="0 5 0 0"> <WrapPanel.Resources> <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}"> @@ -105,98 +132,98 @@ <Setter Property="Margin" Value="5"></Setter> <Setter Property="CornerRadius" Value="3"></Setter> </Style> - - + + </WrapPanel.Resources> <Border> <StackPanel> <TextBlock>Dyeing Speed:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Min Ink Uptake:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.MinInkUptake,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MinInkUptake,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Mixer Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.MixerTemp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MixerTemp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Head Zone1 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Head Zone2 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Head Zone3 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Head Air Flow:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Feeder Tension:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.FeederTension,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding FeederTension,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Puller Tension:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.PullerTension,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding PullerTension,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Dryer Buffer Length:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerBufferLength,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerBufferLength,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Dryer Zone1 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Dryer Zone2 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Dryer Zone3 Temp:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> @@ -204,28 +231,14 @@ <Border> <StackPanel> <TextBlock>Dryer Air Flow:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> <Border> <StackPanel> <TextBlock>Winder Tension:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown> - </StackPanel> - </Border> - - <Border> - <StackPanel> - <TextBlock>Lubrication NL/CM:</TextBlock> - <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.LubricationNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown> - </StackPanel> - </Border> - - <Border> - <StackPanel> - <TextBlock>Lubrication:</TextBlock> - <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ProcessParametersTables.Lubrication}"></ToggleButton> + <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </Border> </WrapPanel> @@ -234,10 +247,14 @@ </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> + + <StackPanel Margin="5 0 0 10" VerticalAlignment="Bottom"> + <Button Command="{Binding SaveProcessParametersCommand}">SAVE GROUP</Button> + </StackPanel> </StackPanel> </Grid> - <Grid Height="150"> + <Grid Background="White"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Visibility" Value="Visible"></Setter> @@ -324,7 +341,7 @@ <Expander Header="MEDIA" Background="{StaticResource SideBarBackground}" IsExpanded="True"> <StackPanel> - <ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML,Converter={StaticResource DbRmlViewToEntityConverter}}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Thread" Margin="40 0 40 0"> + <ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Thread" Margin="40 0 40 0"> <ComboBox.ItemTemplate> <DataTemplate> <StackPanel> @@ -382,9 +399,16 @@ </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> + + <Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Margin="0 10 -20 20" Style="{StaticResource MaterialDesignFlatButton}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon> + <TextBlock Margin="10 0 0 0">SAVE</TextBlock> + </StackPanel> + </Button> </StackPanel> - <Grid Height="150"> + <Grid Height="150" Background="{StaticResource SideBarBackground}"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Visibility" Value="Visible"></Setter> |
