aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-08 15:22:18 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-08 15:22:18 +0300
commit32ff3d6cc46e121a221232c67515e2f58e737bf2 (patch)
tree76507b357a3d16ca02d32b1f4388815574e881cd /Software/Visual_Studio/PPC
parentd733552b94a565f3723c76ae531e4b04431ff085 (diff)
parent031fdf36d4b96c581860032e6539470e132dbd07 (diff)
downloadTango-32ff3d6cc46e121a221232c67515e2f58e737bf2.tar.gz
Tango-32ff3d6cc46e121a221232c67515e2f58e737bf2.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthToWeightConverter.cs4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs13
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml15
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml5
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs6
5 files changed, 30 insertions, 13 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthToWeightConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthToWeightConverter.cs
index e523ad73e..e36dd3c63 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthToWeightConverter.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthToWeightConverter.cs
@@ -17,8 +17,8 @@ namespace Tango.PPC.Jobs.Converters
{
double length = System.Convert.ToDouble(values[0]);
double coef = System.Convert.ToDouble(values[1]);
- int spools = System.Convert.ToInt32(values[2]);
- var weight = ((double)length * spools * coef) / (1000);//(g)
+ //int spools = System.Convert.ToInt32(values[2]);
+ var weight = ((double)length * coef) / (1000);//(g)
return weight;
}
catch (Exception ex)
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
index a02005776..14a09fe57 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
@@ -271,7 +271,17 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
}
-
+
+ private bool _showAdvanced;
+
+ public bool ShowAdvanced
+ {
+ get { return _showAdvanced; }
+ set { _showAdvanced = value;
+ RaisePropertyChangedAuto();}
+ }
+
+
#endregion
#region Commands
@@ -530,6 +540,7 @@ namespace Tango.PPC.Jobs.ViewModels
IsFullMode = true;
DyeCommand.RaiseCanExecuteChanged();
+ ShowAdvanced = Settings.ShowAdvancedOptions;
}
catch (Exception ex)
{
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
index e52433cfb..369544e9f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
@@ -959,7 +959,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<DockPanel x:Name="ColorPropertiesPanel" VerticalAlignment="Top" >
- <StackPanel x:Name="AdvansedOptions" DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Margin="0 5 18 0" Height="55" HorizontalAlignment="Right" Width="Auto">
+ <StackPanel x:Name="AdvansedOptions" DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Margin="0 5 18 0" Height="55" HorizontalAlignment="Right" Width="Auto" Visibility="{Binding ShowAdvanced, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock FontSize="20" VerticalAlignment="Center" >Advanced Options</TextBlock>
<touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGreenAccent}" Height="28" CornerRadius="14" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 0 0 0" Width="54" IsChecked="{Binding IsBasicMode, Converter={StaticResource BooleanInverseConverter}, Mode=TwoWay}"></touch:TouchToggleSlider>
</StackPanel>
@@ -1204,8 +1204,7 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" >
<Binding Path="JobModel.Length" Mode="OneWay"/>
<Binding Path="JobModel.GramPerLength" Mode="OneWay"/>
- <Binding Path="JobModel.NumberSpools" Mode="OneWay"/>
- </MultiBinding>
+ </MultiBinding>
</Run.Text>
</Run>
<Run Text="g" FontWeight="DemiBold"></Run>
@@ -1222,8 +1221,7 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" >
<Binding Path="JobModel.LengthIncludingNumberOfUnitsAndSpools" Mode="OneWay"/>
<Binding Path="JobModel.GramPerLength" Mode="OneWay"/>
- <Binding Path="JobModel.NumberSpools" Mode="OneWay"/>
- </MultiBinding>
+ </MultiBinding>
</Run.Text>
</Run>
<Run Text="g" FontWeight="DemiBold"></Run>
@@ -1267,8 +1265,7 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" >
<Binding Path="JobModel.Length" Mode="OneWay"/>
<Binding Path="JobModel.GramPerLength" Mode="OneWay"/>
- <Binding Path="JobModel.NumberSpools" Mode="OneWay"/>
- </MultiBinding>
+ </MultiBinding>
</Run.Text>
</Run>
<Run Text="g" FontWeight="DemiBold"></Run>
@@ -1289,8 +1286,7 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" >
<Binding Path="JobModel.LengthIncludingNumberOfUnitsAndSpools" Mode="OneWay"/>
<Binding Path="JobModel.GramPerLength" Mode="OneWay"/>
- <Binding Path="JobModel.NumberSpools" Mode="OneWay"/>
- </MultiBinding>
+ </MultiBinding>
</Run.Text>
</Run>
<Run Text="g" FontWeight="DemiBold"></Run>
@@ -1318,7 +1314,6 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" >
<Binding Path="JobModel.LengthIncludingNumberOfUnits" Mode="OneWay"/>
<Binding Path="JobModel.GramPerLength" Mode="OneWay"/>
- <Binding Path="JobModel.NumberSpools" Mode="OneWay"/>
</MultiBinding>
</Run.Text>
</Run>
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 2a7d968aa..6475869dd 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
@@ -460,6 +460,11 @@
<touch:TouchNumericTextBox Minimum="0" Maximum="10" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.FineTuningMinLimitdL}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90" HasDecimalPoint="True"></touch:TouchNumericTextBox>
</DockPanel>
+ <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
+ <TextBlock VerticalAlignment="Center">Show advanced options (Multi-segments &amp; Gradients) in the Job Editor</TextBlock>
+ <touch:TouchToggleSlider IsChecked="{Binding Settings.ShowAdvancedOptions}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider>
+ </DockPanel>
+
<DockPanel Margin="0 20 0 0">
<touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
<TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index 8a5c04588..41e103ca0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -355,6 +355,11 @@ namespace Tango.PPC.Common
public double FineTuningMinLimitdL { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether [show advanced options].
+ /// </summary>
+ public bool ShowAdvancedOptions { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether to force full screen mode on TwineX4.
/// </summary>
public bool ForceTouchMode { get; set; }
@@ -433,6 +438,7 @@ namespace Tango.PPC.Common
ScreenSaverStartDuration = 5;
EnableScreenSaver = true;
EnableRemoteJobUpload = true;
+ ShowAdvancedOptions = false;
}
}
}