diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-22 17:05:24 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-22 17:05:24 +0300 |
| commit | ff6e448a675de210bb39ef68a7e021a9d62e0473 (patch) | |
| tree | fc69edfbd6e470f3544e9b36d0cb2c9168dad9a7 /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings | |
| parent | b9858454b21aa53f818a5a148e8ad1e75d13a83d (diff) | |
| download | Tango-ff6e448a675de210bb39ef68a7e021a9d62e0473.tar.gz Tango-ff6e448a675de210bb39ef68a7e021a9d62e0473.zip | |
Power Saving Mode.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs | 10 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs index f6b31d93c..ed855d7b0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs @@ -305,9 +305,13 @@ namespace Tango.PPC.MachineSettings.ViewModels public PowerDownTime SelectedIdleTime { get { return _selectedIdleTime; } - set { _selectedIdleTime = value; RaisePropertyChangedAuto(); } + set { _selectedIdleTime = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(PowerOffTimeVisible)); } + } + + public bool PowerOffTimeVisible + { + get { return SelectedIdleTime.Minutes != Common.PowerSavingModes.Never; } } - #endregion @@ -396,7 +400,7 @@ namespace Tango.PPC.MachineSettings.ViewModels await MachineProvider.MachineOperator.SetSpoolType((PMR.Printing.JobSpoolType)SelectedSpoolType.Code); } - if (MachineProvider.IsConnected) + if (MachineProvider.IsConnected && BuildProvider.IsEureka) { try { diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 3e2eff01c..9dd37ae73 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -370,8 +370,8 @@ <TextBlock VerticalAlignment="Center">Machine goes to idle mode automatically after</TextBlock> <touch:TouchComboBox VerticalAlignment="Top" HorizontalAlignment="Right" Width="250" ItemsSource="{Binding PowerSavingModes}" SelectedItem="{Binding SelectedIdleTime}" ValuePath="Minutes" DisplayMemberPath="Name"></touch:TouchComboBox> - <TextBlock VerticalAlignment="Center">Power off the machine when idle for</TextBlock> - <touch:TouchComboBox VerticalAlignment="Top" HorizontalAlignment="Right" Width="250" ItemsSource="{Binding PowerSavingModes}" SelectedItem="{Binding SelectedPowerOffTime}" ValuePath="Minutes" DisplayMemberPath="Name"></touch:TouchComboBox> + <TextBlock Visibility="{Binding PowerOffTimeVisible,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Center">Power off the machine when idle for</TextBlock> + <touch:TouchComboBox Visibility="{Binding PowerOffTimeVisible,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Right" Width="250" ItemsSource="{Binding PowerSavingModes}" SelectedItem="{Binding SelectedPowerOffTime}" ValuePath="Minutes" DisplayMemberPath="Name"></touch:TouchComboBox> </controls:TableGrid> <!--<DockPanel Margin="10 -50 0 0"> |
