aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-12 16:40:03 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-12 16:40:03 +0300
commit9d5cbb678c593f2150ea28d23cdc505cab21f004 (patch)
treea2e38eba662b84e2adf2191c51ec3c5b9a0c2d73 /Software
parente278b58a84234d66e49f1d261fe5ae68e6907b77 (diff)
downloadTango-9d5cbb678c593f2150ea28d23cdc505cab21f004.tar.gz
Tango-9d5cbb678c593f2150ea28d23cdc505cab21f004.zip
Machine Studio v1.0.0.13
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin1572864 -> 1572864 bytes
-rw-r--r--Software/Graphics/repeat.pngbin0 -> 1084 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/repeat.pngbin0 -> 1084 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml16
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs33
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs64
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs5
-rw-r--r--Software/Visual_Studio/Versioning/MachineStudio.cs4
16 files changed, 116 insertions, 45 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 4b4f9a441..21120ec4c 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 39cd69c13..3da391e2c 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/repeat.png b/Software/Graphics/repeat.png
new file mode 100644
index 000000000..b7b8dea1d
--- /dev/null
+++ b/Software/Graphics/repeat.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/repeat.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/repeat.png
new file mode 100644
index 000000000..b7b8dea1d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/repeat.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
index 52a18a168..f8f121dff 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
@@ -346,5 +346,8 @@
<ItemGroup>
<Resource Include="Images\seamless-grid.jpg" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\repeat.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
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 0e414fddc..dacbc89b1 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
@@ -1045,6 +1045,12 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
};
+ _jobHandler.UnitCompleted += (x, unit) =>
+ {
+ _speech.SpeakInfo(String.Format("{0} Units Completed.", unit + 1));
+ _eventLogger.Log(String.Format("{0} Units Completed.", unit + 1));
+ };
+
_jobHandler.Failed += (x, ex) =>
{
LogManager.Log(ex, String.Format("Job {0} has failed.", RunningJob.Name));
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index fde7ff275..fc62c0128 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -346,7 +346,7 @@
</StackPanel>
</Grid>
- <StackPanel Orientation="Horizontal" Margin="10 20 0 0" MaxWidth="1160" HorizontalAlignment="Left">
+ <StackPanel Orientation="Horizontal" Margin="10 20 0 0" MaxWidth="1360" HorizontalAlignment="Left">
<Border Style="{StaticResource JobFieldBorder}">
<StackPanel Margin="5" Width="140">
<StackPanel Orientation="Horizontal">
@@ -419,7 +419,17 @@
</StackPanel>
</Border>
- <Border Style="{StaticResource JobFieldBorder}" Height="90" Width="200">
+ <Border Style="{StaticResource JobFieldBorder}">
+ <StackPanel Margin="20 5 5 5" Width="140">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/repeat.png" Width="32"></Image>
+ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Units</TextBlock>
+ </StackPanel>
+ <mahapps:NumericUpDown Width="70" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" Margin="0 5 0 0" HideUpDownButtons="True" Minimum="1" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveJob.NumberOfUnits,Mode=TwoWay}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </Border>
+
+ <Border Style="{StaticResource JobFieldBorder}" Height="82" Width="200" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<StackPanel Width="200">
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<Image Source="../Images/description.png" Width="32"></Image>
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 3e76ccbd0..2ece5c76b 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
@@ -199,6 +199,8 @@
<TextBlock FontSize="14">
<Run Text="{Binding RunningJob.Length,Mode=OneWay,StringFormat=N2}"></Run>
<Run FontSize="13" Text="m"></Run>
+ <Run></Run>
+ <Run Foreground="#FF6464">x</Run><Run Foreground="#FF6464" FontSize="16" FontWeight="SemiBold" Text="{Binding RunningJobStatus.RemainingUnits}"></Run>
</TextBlock>
<materialDesign:PackIcon HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" Kind="FlagCheckered" Width="20" Height="20">
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 a1da10db9..3a0191be4 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
@@ -506,6 +506,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
errors.Add(String.Format("Formula type is required on IDS pack '{0}'.", pack.Name));
}
+
+ pack.IsEmpty = false;
}
else
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
index ca0685f3c..07818269b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
@@ -3,6 +3,7 @@
xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources">
<ResourceDictionary.MergedDictionaries>
@@ -65,7 +66,7 @@
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" />
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" />
</ResourceDictionary>
-
+
<!--Fonts-->
<ResourceDictionary>
<FontFamily x:Key="digital-7">../Fonts/#digital-7</FontFamily>
@@ -181,7 +182,7 @@
</Setter>
</Style>
-
+
<!--Extensions-->
<FontFamily x:Key="FontName">Segoe UI</FontFamily>
@@ -391,8 +392,8 @@
</Setter.Value>
</Setter>
</Style>
-
-
+
+
<!--Drag & Drop-->
<Style x:Key="draggableGrid" TargetType="Grid">
<Setter Property="RenderTransform">
@@ -476,6 +477,13 @@
<!--Extensions-->
+ <Style TargetType="{x:Type mahApps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahApps:NumericUpDown}}">
+ <Style.Resources>
+ <Style TargetType="TextBox"/>
+ </Style.Resources>
+ </Style>
+
+
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
index a45353555..00bd895f3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/MainWindowVM.cs
@@ -130,6 +130,11 @@ namespace Tango.MachineStudio.Publisher
private void Publish()
{
+ if (!ShowQuestion("Did you remember to synchronize production database ?"))
+ {
+ return;
+ }
+
MaxProgress = 100;
Progress = 0;
@@ -222,6 +227,11 @@ namespace Tango.MachineStudio.Publisher
MessageBox.Show(message, "Machine Studio Publisher", MessageBoxButton.OK, MessageBoxImage.Information);
}
+ private bool ShowQuestion(String message)
+ {
+ return MessageBox.Show(message, "Machine Studio Publisher", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes;
+ }
+
protected override void RaisePropertyChangedAuto([CallerMemberName] string caller = null)
{
base.RaisePropertyChangedAuto(caller);
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
index 66ca876c6..40f8c54f4 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
@@ -1 +1 @@
-Thu 07/12/2018 14:40:14.74
+Thu 07/12/2018 16:28:40.38
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index 02579b20a..5502f52cc 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -18,6 +18,7 @@ namespace Tango.Integration.Operation
private Action _cancelAction;
private List<Segment> _effectiveSegments;
private String _lastStatusMessage;
+ private int _last_unit;
#region Events
@@ -51,6 +52,11 @@ namespace Tango.Integration.Operation
/// </summary>
public event EventHandler<Segment> SegmentCompleted;
+ /// <summary>
+ /// Occurs when a unit completes.
+ /// </summary>
+ public event EventHandler<int> UnitCompleted;
+
#endregion
#region Properties
@@ -179,7 +185,8 @@ namespace Tango.Integration.Operation
Status.Progress = s.Progress;
Status.RemainingTime = Status.TotalTime - Job.TranslateProgressToTime(Status.Progress, ProcessParameters);
Status.RemainingProgress = Status.TotalProgress - Status.Progress;
- Status.RemainingUnits = Job.NumberOfUnits - (int)((Job.LengthIncludingNumberOfUnits / Status.CurrentUnitTotalProgress) * Status.Progress / Status.TotalProgress);
+ Status.CurrentUnit = (int)((Job.LengthIncludingNumberOfUnits / Status.CurrentUnitTotalProgress) * Status.Progress / Status.TotalProgress);
+ Status.RemainingUnits = Job.NumberOfUnits - Status.CurrentUnit;
Status.CurrentUnitProgress = s.Progress - (Status.CurrentUnitTotalProgress * (Job.NumberOfUnits - Status.RemainingUnits));
if (s.Message != _lastStatusMessage && s.Message != String.Empty)
@@ -196,14 +203,32 @@ namespace Tango.Integration.Operation
StatusChanged?.Invoke(this, Status);
//Segments Completion
+
+ if (Status.CurrentUnit > _last_unit)
+ {
+ foreach (var segment in _effectiveSegments)
+ {
+ segment.Started = false;
+ segment.Completed = false;
+ }
+
+ if (Job.NumberOfUnits > 1)
+ {
+ UnitCompleted?.Invoke(this, _last_unit);
+ }
+ }
+
+ _last_unit = Status.CurrentUnit;
+
+
for (int i = 0; i < _effectiveSegments.Count; i++)
{
Segment segment = _effectiveSegments[i];
double previousSegmentsLengthWithThis = _effectiveSegments.Take(i + 1).Sum(x => x.Length);
TimeSpan segmentsDuration = Job.TranslateProgressToTime(previousSegmentsLengthWithThis, ProcessParameters);
- TimeSpan segmentRemainingTime = segmentsDuration - Job.TranslateProgressToTime(Status.Progress, ProcessParameters);
+ TimeSpan segmentRemainingTime = segmentsDuration - Job.TranslateProgressToTime(Status.CurrentUnitProgress, ProcessParameters);
- if (i == 0 && Status.Progress > 0)
+ if (i == 0 && Status.CurrentUnitProgress > 0)
{
if (!segment.Started)
{
@@ -212,7 +237,7 @@ namespace Tango.Integration.Operation
}
}
- if (Status.Progress >= previousSegmentsLengthWithThis)
+ if (Status.CurrentUnitProgress >= previousSegmentsLengthWithThis)
{
if (!segment.Completed)
{
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 18a5cf268..3a02006fd 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -690,39 +690,39 @@ namespace Tango.Integration.Operation
LogRequestSent(request);
bool responseLogged = false;
- SendContinuousRequest<JobRequest, JobResponse>(request,null,TimeSpan.FromSeconds(2)).Subscribe((response) =>
- {
- handler.RaiseStatusReceived(response.Message.Status);
+ SendContinuousRequest<JobRequest, JobResponse>(request, null, TimeSpan.FromSeconds(2)).Subscribe((response) =>
+ {
+ handler.RaiseStatusReceived(response.Message.Status);
- if (!responseLogged)
- {
- Status = MachineStatuses.Printing;
- PrintingStarted?.Invoke(this, handler);
- responseLogged = true;
- LogResponseReceived(response.Message);
- }
- }, (ex) =>
- {
- if (!(ex is ContinuousResponseAbortedException))
- {
- if (!handler.IsCanceled)
- {
- Status = MachineStatuses.Error;
- PrintingFailed?.Invoke(this, ex);
- handler.RaiseFailed(ex);
- LogRequestFailed(request, ex);
- }
- }
- else
- {
- Status = MachineStatuses.ReadyToDye;
- }
- }, () =>
- {
- Status = MachineStatuses.ReadyToDye;
- PrintingCompleted?.Invoke(this, new EventArgs());
- handler.RaiseCompleted();
- });
+ if (!responseLogged)
+ {
+ Status = MachineStatuses.Printing;
+ PrintingStarted?.Invoke(this, handler);
+ responseLogged = true;
+ LogResponseReceived(response.Message);
+ }
+ }, (ex) =>
+ {
+ if (!(ex is ContinuousResponseAbortedException))
+ {
+ if (!handler.IsCanceled)
+ {
+ Status = MachineStatuses.Error;
+ PrintingFailed?.Invoke(this, ex);
+ handler.RaiseFailed(ex);
+ LogRequestFailed(request, ex);
+ }
+ }
+ else
+ {
+ Status = MachineStatuses.ReadyToDye;
+ }
+ }, () =>
+ {
+ Status = MachineStatuses.ReadyToDye;
+ PrintingCompleted?.Invoke(this, new EventArgs());
+ handler.RaiseCompleted();
+ });
return handler;
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
index 17e5f3a40..f9ce1d4ae 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
@@ -37,6 +37,11 @@ namespace Tango.Integration.Operation
public double RemainingProgress { get; set; }
/// <summary>
+ /// Gets or sets the current unit number.
+ /// </summary>
+ public int CurrentUnit { get; set; }
+
+ /// <summary>
/// Gets or sets the remaining units if it is an embroidery job.
/// </summary>
public int RemainingUnits { get; set; }
diff --git a/Software/Visual_Studio/Versioning/MachineStudio.cs b/Software/Visual_Studio/Versioning/MachineStudio.cs
index df70e81bb..d5a870a5d 100644
--- a/Software/Visual_Studio/Versioning/MachineStudio.cs
+++ b/Software/Visual_Studio/Versioning/MachineStudio.cs
@@ -9,5 +9,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("Copyright © Twine LTD 2017")]
[assembly: AssemblyTrademark("Twine LTD")]
-[assembly: AssemblyVersion("1.0.0.12")]
-[assembly: AssemblyFileVersion("1.0.0.12")]
+[assembly: AssemblyVersion("1.0.0.13")]
+[assembly: AssemblyFileVersion("1.0.0.13")]