aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-10-10 16:55:44 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-10-10 16:55:44 +0300
commit79eb19cbd10785a7dbc972bc0b26817932237419 (patch)
treee36176fc94ce6f26efc89b006d7e6faf7e4398cb /Software/Visual_Studio/MachineStudio
parentdf9197240ba5a643ce1599f36b7e3dd34aad6a60 (diff)
downloadTango-79eb19cbd10785a7dbc972bc0b26817932237419.tar.gz
Tango-79eb19cbd10785a7dbc972bc0b26817932237419.zip
Sign-out works !
Fixed issue where color conversion was busy while not in research module but research module in job view. Added new RealTimeGraphX !
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/DecimalPlacesToStringFormatConverter.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs84
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs97
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs121
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml15
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml105
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs160
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml91
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs174
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml9
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs16
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj2
42 files changed, 455 insertions, 633 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
index 87751f871..6c94271a2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.ColorLab</RootNamespace>
<AssemblyName>Tango.MachineStudio.ColorLab</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
index 33090a640..45749a6b5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
@@ -494,7 +494,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
if (LiquidsCalibrationData == null || _prevent_inverse_conversion) return;
//TODO: This is temporary because of out of range volumes.
- if (LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > 200)
+ if (LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > 100)
{
IsVolumesOutOfRange = true;
return;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
index 393c4e491..e719464f8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.DB</RootNamespace>
<AssemblyName>Tango.MachineStudio.DB</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
index 23c664067..7c1ffc843 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Tango.MachineStudio.DataCapture.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.DataCapture</RootNamespace>
<AssemblyName>Tango.MachineStudio.DataCapture</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
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 e4382bd5c..dca470eed 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
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Developer</RootNamespace>
<AssemblyName>Tango.MachineStudio.Developer</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
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 6c3e31325..1b9720335 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
@@ -782,7 +782,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
while (true)
{
- if (!_disable_gamut_check && IsJobVisible && ActiveJob != null && ActiveJob.Segments != null)
+ if (!_disable_gamut_check && IsJobVisible && IsVisible && ActiveJob != null && ActiveJob.Segments != null)
{
try
{
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
index 89942c6d6..6f65b40c0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.HardwareDesigner</RootNamespace>
<AssemblyName>Tango.MachineStudio.HardwareDesigner</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
index f3318f275..b81ba731d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Logging</RootNamespace>
<AssemblyName>Tango.MachineStudio.Logging</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj
index d17694b46..f6fa01ae7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Logging</RootNamespace>
<AssemblyName>Tango.MachineStudio.Logging</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
index 05331290b..3fa7c60cf 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.MachineDesigner</RootNamespace>
<AssemblyName>Tango.MachineStudio.MachineDesigner</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
index bd3d48f6d..24aec371a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
@@ -41,6 +41,14 @@
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
index 8d3f0cce2..64501b4fc 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.RML</RootNamespace>
<AssemblyName>Tango.MachineStudio.RML</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
index cb4985dd9..ea332221e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Stubs</RootNamespace>
<AssemblyName>Tango.MachineStudio.Stubs</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
index e8df35ba8..e76e9b81f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Synchronization</RootNamespace>
<AssemblyName>Tango.MachineStudio.Synchronization</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/DecimalPlacesToStringFormatConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/DecimalPlacesToStringFormatConverter.cs
new file mode 100644
index 000000000..a0f6863e6
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/DecimalPlacesToStringFormatConverter.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.MachineStudio.Technician.Converters
+{
+ public class DecimalPlacesToStringFormatConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ return $"F{int.Parse(value.ToString())}";
+ }
+
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
index dcba1e77b..22fd8eaa8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:localConverters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:controls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
@@ -14,6 +15,7 @@
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
<sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <localConverters:DecimalPlacesToStringFormatConverter x:Key="DecimalPlacesToStringFormatConverter"/>
<!--Theme-->
<SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
@@ -30,14 +32,7 @@
<!--Content-->
<Grid>
<!--<Viewbox Stretch="Fill">-->
- <controls:RealTimeGraphMultiControl x:Name="InnerGraph" UseAutoRange="{Binding UseAutoRange}" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" SensorUnits="{Binding TechMonitor.Units}">
- <controls:RealTimeGraphMultiControl.Style>
- <Style TargetType="controls:RealTimeGraphMultiControl">
- <Setter Property="Minimum" Value="{Binding Min,Mode=TwoWay}"></Setter>
- <Setter Property="Maximum" Value="{Binding Max,Mode=TwoWay}"></Setter>
- </Style>
- </controls:RealTimeGraphMultiControl.Style>
- </controls:RealTimeGraphMultiControl>
+ <controls:RealTimeGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}" />
<!--</Viewbox>-->
</Grid>
<!--Content-->
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
index a9eb9e9f4..ca2481de6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
@@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:localConverters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
@@ -14,6 +15,7 @@
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
<sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <localConverters:DecimalPlacesToStringFormatConverter x:Key="DecimalPlacesToStringFormatConverter"/>
<!--Theme-->
<SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
@@ -30,13 +32,8 @@
<!--Content-->
<Grid>
<!--<Viewbox Stretch="Fill">-->
- <controls:RealTimeGraphControl x:Name="InnerGraph" UseAutoRange="{Binding UseAutoRange}" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" Color="{Binding Color,Mode=OneWay}" SensorUnits="{Binding TechMonitor.Units}">
- <controls:RealTimeGraphControl.Style>
- <Style TargetType="controls:RealTimeGraphControl">
- <Setter Property="Minimum" Value="{Binding Min,Mode=TwoWay}"></Setter>
- <Setter Property="Maximum" Value="{Binding Max,Mode=TwoWay}"></Setter>
- </Style>
- </controls:RealTimeGraphControl.Style>
+ <controls:RealTimeGraphControl x:Name="InnerGraph" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" DisplayName="{Binding TechMonitor.Description}" DisplayUnits="{Binding TechMonitor.Units}" StringFormat="{Binding DecimalPlaces,Converter={StaticResource DecimalPlacesToStringFormatConverter}}">
+
</controls:RealTimeGraphControl>
<!--</Viewbox>-->
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml
index 2f5e677c4..8a3c7c25f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml
@@ -16,6 +16,7 @@
<UserControl.Resources>
<converters:MonitorsToMultiChannleMonitorsConverter x:Key="MonitorsToMultiChannleMonitorsConverter" />
<sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <converters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
@@ -34,6 +35,16 @@
<GroupBox Header="GRAPH" Margin="0 10 0 0">
<StackPanel>
+ <StackPanel Margin="0 10 0 0">
+ <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Foreground="Gray">
+ <Run>FIFO CAPACITY:</Run>
+ <Run Text="{Binding Duration,Converter={StaticResource SecondsToTimeSpanConverter},Mode=OneWay,StringFormat='hh\\:mm\\:ss'}"></Run>
+ </TextBlock>
+ <Slider Margin="0 5 0 0" Minimum="1" Maximum="3600" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding Duration}"></Slider>
+
+ <TextBlock FontSize="10" Margin="0 20 0 0">Decimal Places</TextBlock>
+ <mahapps:NumericUpDown Background="Transparent" Margin="0 5 0 0" HasDecimals="False" Minimum="0" Maximum="4" Value="{Binding DecimalPlaces}" HorizontalContentAlignment="Center" Foreground="Gray" />
+ </StackPanel>
<StackPanel Margin="0 10" IsEnabled="{Binding UseAutoRange,Converter={StaticResource BooleanInverseConverter}}">
<UniformGrid Columns="2" Margin="0 5 0 0" IsEnabled="{Binding UseMinMax}">
<StackPanel Margin="0 0 5 0">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
index 4acbd2fc1..a9d341b01 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
@@ -16,6 +16,7 @@
<UserControl.Resources>
<converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
<sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <converters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" />
@@ -34,6 +35,16 @@
<GroupBox Header="GRAPH" Margin="0 10 0 0">
<StackPanel>
+ <StackPanel Margin="0 10 0 0">
+ <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Foreground="Gray">
+ <Run>FIFO CAPACITY:</Run>
+ <Run Text="{Binding Duration,Converter={StaticResource SecondsToTimeSpanConverter},Mode=OneWay,StringFormat='hh\\:mm\\:ss'}"></Run>
+ </TextBlock>
+ <Slider Margin="0 5 0 0" Minimum="1" Maximum="3600" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding Duration}"></Slider>
+
+ <TextBlock FontSize="10" Margin="0 20 0 0">Decimal Places</TextBlock>
+ <mahapps:NumericUpDown Background="Transparent" Margin="0 5 0 0" HasDecimals="False" Minimum="0" Maximum="4" Value="{Binding DecimalPlaces}" HorizontalContentAlignment="Center" Foreground="Gray" />
+ </StackPanel>
<StackPanel Margin="0 10" IsEnabled="{Binding UseAutoRange,Converter={StaticResource BooleanInverseConverter}}">
<UniformGrid Columns="2" Margin="0 5 0 0" IsEnabled="{Binding UseMinMax}">
<StackPanel Margin="0 0 5 0">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
index 9bba3b43f..c507b84f6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Technician</RootNamespace>
<AssemblyName>Tango.MachineStudio.Technician</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
@@ -103,6 +103,7 @@
<Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Converters\DecimalPlacesToStringFormatConverter.cs" />
<Compile Include="Converters\MonitorsToMultiChannleMonitorsConverter.cs" />
<Compile Include="Converters\MonitorsToSingleChannleMonitorsConverter.cs" />
<Compile Include="Converters\SecondsToGraphPointsConverter.cs" />
@@ -251,6 +252,7 @@
<Compile Include="PropertiesTemplates\SingleGraphTemplate.xaml.cs">
<DependentUpon>SingleGraphTemplate.xaml</DependentUpon>
</Compile>
+ <Compile Include="TechGraphController.cs" />
<Compile Include="TechItems\BlowerItem.cs" />
<Compile Include="TechItems\BreakSensorItem.cs" />
<Compile Include="TechItems\ControllerItem.cs" />
@@ -500,6 +502,14 @@
<Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project>
<Name>RealTimeGraphEx</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj">
+ <Project>{99d233c5-fee7-418e-9c25-d4584cb52e28}</Project>
+ <Name>RealTimeGraphX.WPF</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX\RealTimeGraphX.csproj">
+ <Project>{6d55a3b8-46d3-493a-a143-aebd2b98d683}</Project>
+ <Name>RealTimeGraphX</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
<Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
<Name>Tango.BL</Name>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs
new file mode 100644
index 000000000..28c75f79f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs
@@ -0,0 +1,29 @@
+using RealTimeGraphX;
+using RealTimeGraphX.DataPoints;
+using RealTimeGraphX.Renderers;
+using RealTimeGraphX.WPF.DataSeries;
+using RealTimeGraphX.WPF.Painters;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Technician
+{
+ public class TechGraphController : GraphControllerBase<WpfDataSeries, TimeSpanDataPoint, DoubleDataPoint>
+ {
+ public TechGraphController(int refreshRate = 50)
+ {
+ var renderer = new GraphScrollingRenderer<WpfDataSeries, TimeSpanDataPoint, DoubleDataPoint>()
+ {
+ RefreshRate = TimeSpan.FromMilliseconds(refreshRate)
+ };
+
+ var painter = new WpfScrollingGraphPainter();
+
+ ConnectOutput(renderer);
+ renderer.ConnectOutput(painter);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
index a935ee5a6..377738d09 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
@@ -1,4 +1,5 @@
-using System;
+using RealTimeGraphX.DataPoints;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -41,24 +42,38 @@ namespace Tango.MachineStudio.Technician.TechItems
_techMonitor = value;
RaisePropertyChangedAuto();
- if (_techMonitor != old && Editor != null)
- {
- Editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame);
- Editor.InnerGraph.InvalidateGraph();
- }
-
ItemGuid = value != null ? value.Guid : null;
TechName = _techMonitor != null ? _techMonitor.Description : null;
}
}
+ private MultiGraphElementEditor _editor;
/// <summary>
/// Gets or sets the item editor.
/// </summary>
[XmlIgnore]
- public MultiGraphElementEditor Editor { get; set; }
+ public MultiGraphElementEditor Editor
+ {
+ get { return _editor; }
+ set
+ {
+ _editor = value;
+ SetEditorSettings();
+ }
+ }
+ private int _duration;
+ public int Duration
+ {
+ get { return _duration; }
+ set
+ {
+ _duration = value;
+ RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
+ }
private double _min;
/// <summary>
/// Gets or sets the minimum graph value.
@@ -66,7 +81,11 @@ namespace Tango.MachineStudio.Technician.TechItems
public double Min
{
get { return _min; }
- set { _min = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _min = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
}
private double _max;
@@ -76,7 +95,11 @@ namespace Tango.MachineStudio.Technician.TechItems
public double Max
{
get { return _max; }
- set { _max = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _max = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
}
private bool _useAutoRange;
@@ -86,7 +109,21 @@ namespace Tango.MachineStudio.Technician.TechItems
public bool UseAutoRange
{
get { return _useAutoRange; }
- set { _useAutoRange = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _useAutoRange = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
+ }
+
+ private int _decimalPlaces;
+ /// <summary>
+ /// Gets or sets the decimal places of y-axis.
+ /// </summary>
+ public int DecimalPlaces
+ {
+ get { return _decimalPlaces; }
+ set { _decimalPlaces = value; RaisePropertyChangedAuto(); }
}
private bool _isPaused;
@@ -100,11 +137,7 @@ namespace Tango.MachineStudio.Technician.TechItems
set
{
_isPaused = value; RaisePropertyChangedAuto();
-
- if (Editor != null)
- {
- Editor.InnerGraph.Controller.IsPaused = _isPaused;
- }
+ SetEditorSettings();
}
}
@@ -144,6 +177,9 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public MultiGraphItem() : base()
{
+ _useAutoRange = true;
+ DecimalPlaces = 1;
+ _duration = 10;
_timer = new DispatcherTimer();
_timer.Tick += _timer_Tick;
_timer.Interval = TimeSpan.FromSeconds(1);
@@ -173,6 +209,20 @@ namespace Tango.MachineStudio.Technician.TechItems
});
}
+ private void SetEditorSettings()
+ {
+ if (Editor != null)
+ {
+ var controller = Editor.InnerGraph.Controller;
+
+ controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration));
+ controller.Range.MinimumY = new DoubleDataPoint(_min);
+ controller.Range.MaximumY = new DoubleDataPoint(_max);
+ controller.Range.AutoY = _useAutoRange;
+ controller.IsPaused = _isPaused;
+ }
+ }
+
private void OnTechMonitorChanged()
{
if (TechMonitor != null)
@@ -233,6 +283,8 @@ namespace Tango.MachineStudio.Technician.TechItems
cloned.Min = Min;
cloned.Max = Max;
cloned.UseAutoRange = UseAutoRange;
+ cloned.Duration = Duration;
+ cloned.DecimalPlaces = DecimalPlaces;
return cloned;
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
index 87d971233..808dadb68 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
@@ -1,6 +1,8 @@
-using System;
+using RealTimeGraphX.DataPoints;
+using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
@@ -42,12 +44,6 @@ namespace Tango.MachineStudio.Technician.TechItems
_techMonitor = value;
RaisePropertyChangedAuto();
- if (_techMonitor != old && Editor != null)
- {
- Editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame);
- Editor.InnerGraph.InvalidateGraph();
- }
-
ItemGuid = value != null ? value.Guid : null;
TechName = _techMonitor != null ? _techMonitor.Description : null;
@@ -55,11 +51,32 @@ namespace Tango.MachineStudio.Technician.TechItems
}
}
+ private SingleGraphElementEditor _editor;
/// <summary>
/// Gets or sets the item editor.
/// </summary>
[XmlIgnore]
- public SingleGraphElementEditor Editor { get; set; }
+ public SingleGraphElementEditor Editor
+ {
+ get { return _editor; }
+ set
+ {
+ _editor = value;
+ SetEditorSettings();
+ }
+ }
+
+ private int _duration;
+ public int Duration
+ {
+ get { return _duration; }
+ set
+ {
+ _duration = value;
+ RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
+ }
private double _min;
/// <summary>
@@ -68,7 +85,11 @@ namespace Tango.MachineStudio.Technician.TechItems
public double Min
{
get { return _min; }
- set { _min = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _min = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
}
private double _max;
@@ -78,7 +99,11 @@ namespace Tango.MachineStudio.Technician.TechItems
public double Max
{
get { return _max; }
- set { _max = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _max = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
}
private bool _useAutoRange;
@@ -88,7 +113,21 @@ namespace Tango.MachineStudio.Technician.TechItems
public bool UseAutoRange
{
get { return _useAutoRange; }
- set { _useAutoRange = value; RaisePropertyChangedAuto(); }
+ set
+ {
+ _useAutoRange = value; RaisePropertyChangedAuto();
+ SetEditorSettings();
+ }
+ }
+
+ private int _decimalPlaces;
+ /// <summary>
+ /// Gets or sets the decimal places of y-axis.
+ /// </summary>
+ public int DecimalPlaces
+ {
+ get { return _decimalPlaces; }
+ set { _decimalPlaces = value; RaisePropertyChangedAuto(); }
}
private bool _isPaused;
@@ -102,11 +141,7 @@ namespace Tango.MachineStudio.Technician.TechItems
set
{
_isPaused = value; RaisePropertyChangedAuto();
-
- if (Editor != null)
- {
- Editor.InnerGraph.Controller.IsPaused = _isPaused;
- }
+ SetEditorSettings();
}
}
@@ -146,6 +181,9 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public SingleGraphItem() : base()
{
+ _useAutoRange = true;
+ DecimalPlaces = 1;
+ _duration = 10;
_timer = new DispatcherTimer();
_timer.Tick += _timer_Tick;
_timer.Interval = TimeSpan.FromSeconds(1);
@@ -175,6 +213,21 @@ namespace Tango.MachineStudio.Technician.TechItems
});
}
+ private void SetEditorSettings()
+ {
+ if (Editor != null)
+ {
+ var controller = Editor.InnerGraph.Controller;
+
+ controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration));
+ controller.Range.MinimumY = new DoubleDataPoint(_min);
+ controller.Range.MaximumY = new DoubleDataPoint(_max);
+ controller.Range.AutoY = _useAutoRange;
+ controller.IsPaused = _isPaused;
+ controller.DataSeriesCollection[0].Stroke = Color;
+ }
+ }
+
private void _timer_Tick(object sender, EventArgs e)
{
RecordingTime = DateTime.Now - _recording_start_time;
@@ -235,7 +288,19 @@ namespace Tango.MachineStudio.Technician.TechItems
cloned.Min = Min;
cloned.Max = Max;
cloned.UseAutoRange = UseAutoRange;
+ cloned.Duration = Duration;
+ cloned.DecimalPlaces = DecimalPlaces;
return cloned;
}
+
+ protected override void RaisePropertyChanged(string propName)
+ {
+ base.RaisePropertyChanged(propName);
+
+ if (propName == nameof(Color))
+ {
+ SetEditorSettings();
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
index 6fa00ae0a..54fbc8175 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
@@ -181,7 +181,7 @@ namespace Tango.MachineStudio.Technician.TechItems
set
{
_color = value;
- RaisePropertyChangedAuto();
+ RaisePropertyChanged(nameof(Color));
_colorNumber = ColorHelper.ColorToInteger(value);
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
index 2ca5aa43b..1e1638928 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs
@@ -35,6 +35,9 @@ using Tango.MachineStudio.Technician.Helpers;
using Tango.MachineStudio.Technician.Models;
using Tango.Logging;
using Microsoft.WindowsAPICodePack.Dialogs;
+using RealTimeGraphX;
+using RealTimeGraphX.WPF.DataSeries;
+using RealTimeGraphX.DataPoints;
namespace Tango.MachineStudio.Technician.ViewModels
{
@@ -47,8 +50,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
private List<PropertyInfo> _diagnoticsMonitorsDataProperties;
private IDiagnosticsFrameProvider _diagnosticsFrameProvider;
- private Dictionary<SingleGraphItem, GraphController> _singleControllers;
- private Dictionary<MultiGraphItem, GraphMultiController> _multiControllers;
+ private Dictionary<SingleGraphItem, TechGraphController> _singleControllers;
+ private Dictionary<MultiGraphItem, TechGraphController> _multiControllers;
private static object _elementsLock = new object();
private String _lastTechProjectFile;
private INotificationProvider _notification;
@@ -62,6 +65,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
private List<SingleTechRecordingData> _single_monitors_recordings;
private List<MultiTechRecordingData> _multi_monitors_recordings;
+ private DateTime _start_time = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
+ private DateTime _last_time = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
#region Properties
@@ -290,8 +295,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
_notification = notificationProvider;
_eventLogger = eventLogger;
- _singleControllers = new Dictionary<SingleGraphItem, GraphController>();
- _multiControllers = new Dictionary<MultiGraphItem, GraphMultiController>();
+ _singleControllers = new Dictionary<SingleGraphItem, TechGraphController>();
+ _multiControllers = new Dictionary<MultiGraphItem, TechGraphController>();
AvailableTechItems = TechItem.GetAvailableTechItems().ToObservableCollection();
SelectedTechItem = AvailableTechItems.FirstOrDefault();
_diagnoticsMonitorsDataProperties = typeof(DiagnosticsMonitors).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();
@@ -376,6 +381,10 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="data">The data.</param>
private void PopulateDiagnosticsData(StartDiagnosticsResponse data)
{
+ TimeSpan delta_base = DateTime.Now - _start_time;
+ double delta_mili = (DateTime.Now - _last_time).TotalMilliseconds;
+ _last_time = DateTime.Now;
+
if (DateTime.Now > _lastDiagnosticsResponseUpdate.AddMilliseconds(MIN_DIAGNOSTICS_UPDATE_MILI))
{
CurrentDiagnosticsResponse = data;
@@ -451,20 +460,21 @@ namespace Tango.MachineStudio.Technician.ViewModels
if (prop != null)
{
- GraphController controller = null;
+ TechGraphController controller = null;
if (_singleControllers.TryGetValue(graphItem, out controller))
{
var points = GetDataArray(graphItem.TechMonitor, prop.GetValue(data.Monitors));
- int maxPoints = (int)(_diagnosticsFrameProvider.FrameRate * GraphsDurationSeconds * points.Count);
+ List<TimeSpanDataPoint> times = new List<TimeSpanDataPoint>();
+ var dPoints = points.Select(x => new DoubleDataPoint(x)).ToList();
- InvokeUI(() =>
+ for (int i = 0; i < points.Count; i++)
{
- graphItem.Editor.InnerGraph.InnerGraph.MaxPoints = maxPoints;
- });
+ times.Add(delta_base.Add(TimeSpan.FromMilliseconds((delta_mili / points.Count) * i)));
+ }
- controller.PushData(points);
+ controller.PushData(times, dPoints);
var _graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.Tag == graphItem);
if (_graph_recording != null)
@@ -482,7 +492,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
if (prop != null)
{
- GraphMultiController controller = null;
+ TechGraphController controller = null;
if (_multiControllers.TryGetValue(graphItem, out controller))
{
@@ -490,15 +500,23 @@ namespace Tango.MachineStudio.Technician.ViewModels
if (points.Count > 0)
{
- int maxPoints = (int)(_diagnosticsFrameProvider.FrameRate * GraphsDurationSeconds * points[0].Count);
+ List<TimeSpanDataPoint> times = new List<TimeSpanDataPoint>();
+ var dPoints = points.Select(x => new List<DoubleDataPoint>(x.Select(y => new DoubleDataPoint(y)))).ToList();
- InvokeUI(() =>
+ for (int i = 0; i < points[0].Count; i++)
{
- graphItem.Editor.InnerGraph.InnerGraph.MaxPoints = maxPoints;
- });
- }
+ times.Add(delta_base.Add(TimeSpan.FromMilliseconds((delta_mili / points[0].Count) * i)));
+ }
+
+ List<List<TimeSpanDataPoint>> timesMat = new List<List<TimeSpanDataPoint>>();
- controller.PushData(points);
+ for (int i = 0; i < controller.DataSeriesCollection.Count; i++)
+ {
+ timesMat.Add(times);
+ }
+
+ controller.PushData(timesMat, dPoints);
+ }
var _graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.Tag == graphItem);
if (_graph_recording != null)
@@ -624,15 +642,15 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// </summary>
protected virtual void OnDisableRenderingChanged()
{
- foreach (var controller in _singleControllers)
- {
- controller.Value.ChangeRenderMode(!DisableRendering);
- }
+ //foreach (var controller in _singleControllers)
+ //{
+ // controller.Value.ChangeRenderMode(!DisableRendering);
+ //}
- foreach (var controller in _multiControllers)
- {
- controller.Value.ChangeRenderMode(!DisableRendering);
- }
+ //foreach (var controller in _multiControllers)
+ //{
+ // controller.Value.ChangeRenderMode(!DisableRendering);
+ //}
}
#endregion
@@ -956,36 +974,38 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
var graphItem = element.HostedElement as SingleGraphItem;
var editor = element as SingleGraphElementEditor;
- graphItem.Editor = editor;
- editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame);
- GraphController controller = new GraphController();
+ TechGraphController controller = new TechGraphController();
+ controller.AddDataSeries(new WpfDataSeries()
+ {
+ Stroke = Colors.DodgerBlue,
+ });
editor.InnerGraph.Controller = controller;
+ graphItem.Editor = editor;
+
_singleControllers.Add(graphItem, controller);
}
else if (element is MultiGraphElementEditor)
{
var graphItem = element.HostedElement as MultiGraphItem;
var editor = element as MultiGraphElementEditor;
- editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame);
- graphItem.Editor = editor;
-
- GraphMultiController controller = new GraphMultiController();
+ TechGraphController controller = new TechGraphController(500);
for (int i = 0; i < graphItem.TechMonitor.ChannelCount; i++)
{
- controller.AddSeries(new RealTimeGraphEx.DataSeries.DataYSeries()
+ controller.AddDataSeries(new WpfDataSeries()
{
- UseFillAndStroke = true,
+ Stroke = ColorHelper.GetRandomColor(),
Name = graphItem.TechMonitor.Name.First() + (i + 1).ToString(),
- Stroke = new SolidColorBrush(ColorHelper.GetRandomColor()),
});
}
editor.InnerGraph.Controller = controller;
+ graphItem.Editor = editor;
+
_multiControllers.Add(graphItem, controller);
}
else if (element is MotorElementEditor)
@@ -1300,12 +1320,21 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="editor">The editor.</param>
private void InitSingleGraphitem(SingleGraphItem item, SingleGraphElementEditor editor)
{
- editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame);
- item.Editor = editor;
+ TechGraphController controller = new TechGraphController();
+ controller.Range.AutoY = true;
+ controller.Range.MinimumY = item.TechMonitor.Min;
+ controller.Range.MaximumY = item.TechMonitor.Max;
+ controller.Range.MaximumX = TimeSpan.FromSeconds(10);
+
+ controller.AddDataSeries(new WpfDataSeries()
+ {
+ Stroke = Colors.DodgerBlue,
+ });
- GraphController controller = new GraphController();
editor.InnerGraph.Controller = controller;
+ item.Editor = editor;
+
_singleControllers.Add(item, controller);
item.RecordingStarted += () =>
@@ -1350,23 +1379,25 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="editor">The editor.</param>
private void InitMultiGraphItem(MultiGraphItem item, MultiGraphElementEditor editor)
{
- editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame);
- item.Editor = editor;
-
- GraphMultiController controller = new GraphMultiController();
+ TechGraphController controller = new TechGraphController(500);
+ controller.Range.AutoY = true;
+ controller.Range.MinimumY = item.TechMonitor.Min;
+ controller.Range.MaximumY = item.TechMonitor.Max;
+ controller.Range.MaximumX = TimeSpan.FromSeconds(10);
for (int i = 0; i < item.TechMonitor.ChannelCount; i++)
{
- controller.AddSeries(new RealTimeGraphEx.DataSeries.DataYSeries()
+ controller.AddDataSeries(new WpfDataSeries()
{
- UseFillAndStroke = true,
+ Stroke = ColorHelper.GetRandomColor(),
Name = item.TechMonitor.Name.First() + (i + 1).ToString(),
- Stroke = new SolidColorBrush(ColorHelper.GetRandomColor()),
});
}
editor.InnerGraph.Controller = controller;
+ item.Editor = editor;
+
_multiControllers.Add(item, controller);
item.RecordingStarted += () =>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index ac207fc55..2168018d1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -280,21 +280,6 @@
</StackPanel>
<Grid Grid.Row="1">
-
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Width="275" Margin="0 15 30 0">
- <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Foreground="Gray">
- <Run>GRAPHS FIFO CAPACITY:</Run>
- <Run Text="{Binding TempGraphsDurationSeconds,Converter={StaticResource SecondsToTimeSpanConverter},Mode=OneWay,StringFormat='hh\\:mm\\:ss'}"></Run>
- </TextBlock>
- <Slider Margin="0 5 0 0" Minimum="1" Maximum="3600" Value="{Binding TempGraphsDurationSeconds}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="PreviewMouseUp">
- <i:InvokeCommandAction Command="{Binding UpdateGraphsDurationCommand}"></i:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Slider>
- </StackPanel>
-
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="20 0 0 0">
<ListBox ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding AvailableTechItems}" SelectedItem="{Binding SelectedTechItem,Mode=TwoWay}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
index 48fe2b34c..5c0ff937c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Tango.MachineStudio.UsersAndRoles.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.UsersAndRoles</RootNamespace>
<AssemblyName>Tango.MachineStudio.UsersAndRoles</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs
index bf40d459e..dcf2cdf81 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs
@@ -1,5 +1,7 @@
using RealTimeGraphEx;
using RealTimeGraphEx.Controllers;
+using RealTimeGraphX;
+using RealTimeGraphX.WPF.DataSeries;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -13,7 +15,7 @@ namespace Tango.MachineStudio.Common.Controls
/// <summary>
/// Gets or sets the name of the sensor.
/// </summary>
- String SensorName { get; set; }
+ String DisplayName { get; set; }
/// <summary>
/// Gets or sets the tag.
@@ -23,31 +25,11 @@ namespace Tango.MachineStudio.Common.Controls
/// <summary>
/// Gets or sets the sensor units.
/// </summary>
- String SensorUnits { get; set; }
-
- /// <summary>
- /// Occurs when the graph remove button has been pressed.
- /// </summary>
- event EventHandler GraphRemoveButtonPressed;
-
- /// <summary>
- /// Occurs when the graph full screen button has been pressed.
- /// </summary>
- event EventHandler GraphFullScreenButtonPressed;
-
- /// <summary>
- /// Gets or sets the inner real-time graph control.
- /// </summary>
- RealTimeGraphExBase InnerGraph { get; set; }
+ String DisplayUnits { get; set; }
/// <summary>
/// Gets or sets the inner graph controller.
/// </summary>
- GraphControllerBase Controller { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether to enable toolbar buttons.
- /// </summary>
- bool EnableToolBar { get; set; }
+ IGraphController<WpfDataSeries> Controller { get; set; }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
index bf2e41afa..b5e809a3e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
@@ -5,6 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:graphEx="clr-namespace:RealTimeGraphEx.FastGraphs;assembly=RealTimeGraphEx"
+ xmlns:graphX="clr-namespace:RealTimeGraphX.WPF.Surfaces;assembly=RealTimeGraphX.WPF"
+ xmlns:componentsX="clr-namespace:RealTimeGraphX.WPF.Components;assembly=RealTimeGraphX.WPF"
xmlns:components="clr-namespace:RealTimeGraphEx.Components;assembly=RealTimeGraphEx"
xmlns:converters="clr-namespace:Tango.MachineStudio.Common.Converters"
xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls"
@@ -14,73 +16,50 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
- <!--RealTimeGraphEx-->
- <ResourceDictionary Source="pack://application:,,,/RealTimeGraphEx;component/Resources/Resources.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Resources/MaterialDesign.xaml"></ResourceDictionary>
-
- <ResourceDictionary>
- <Style TargetType="ContentControl" x:Key="graphContent">
- <Style.Setters>
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <Grid MouseEnter="Graph_MouseEnter" MouseLeave="Graph_MouseLeave" ClipToBounds="True">
- <ContentControl Content="{Binding}"></ContentControl>
- <Grid Opacity="0.8" HorizontalAlignment="Stretch" VerticalAlignment="Top" ClipToBounds="True" Height="35" Margin="0 -35 0 0">
- <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Top">
- <Button Margin="0 0 5 0" Click="OnGraphFullScreen" ToolTip="Full Screen" Width="24" Height="24" BorderBrush="Transparent" Background="{StaticResource AccentColorBrush}" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" >
- <materialDesign:PackIcon Kind="Fullscreen" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" />
- </Button>
- <Button Click="OnGraphRemove" ToolTip="Remove" Width="24" Height="24" BorderBrush="Transparent" Background="#FF7777" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" >
- <materialDesign:PackIcon Kind="CloseCircle" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" />
- </Button>
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
- <Grid>
- <!--Temperature-->
- <ContentControl Style="{StaticResource graphContent}" Margin="0 0 0 0" MinHeight="5">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40"/>
- <ColumnDefinition Width="438*"/>
- </Grid.ColumnDefinitions>
+ <Grid >
+ <Border Background="{DynamicResource graphBackground}" Padding="20" CornerRadius="5" BorderThickness="1" BorderBrush="DodgerBlue">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="41*"/>
+ <RowDefinition Height="30"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="55"/>
+ <ColumnDefinition Width="438*"/>
+ </Grid.ColumnDefinitions>
+
+ <Border BorderBrush="{StaticResource AccentColorBrush}" Margin="0 1 0 2">
+ <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Vertical" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=StringFormat}" />
+ </Border>
+ <Border Grid.Column="1" BorderThickness="1" BorderBrush="#43A0E7FF" Margin="1 0 0 0">
+ <Grid>
+
+ <componentsX:GraphGridLines Foreground="#9B545454" />
+
+ <graphX:WpfGraphSurface x:Name="Graph" x:FieldModifier="public">
+
+ </graphX:WpfGraphSurface>
+
+ <Grid>
+ <Label Style="{StaticResource graphLabel}">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayName,FallbackValue='Dispenser Motor'}"></TextBlock>
+ <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayUnits,FallbackValue='(hz)'}"></TextBlock>
+ </StackPanel>
+ </Label>
+ </Grid>
+ </Grid>
+ </Border>
- <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="#E1151515">
- <StackPanel Orientation="Horizontal">
- <components:YAxisScroll x:Name="yAxis" Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="Gainsboro" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
- <components:YAxisTicks x:Name="yAxisTicks" SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks>
- </StackPanel>
- </Border>
- <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="1 0 0 0">
- <graphEx:RealTimeGraphExLineScroll x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum,Mode=TwoWay}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum,Mode=TwoWay}">
- <graphEx:RealTimeGraphExLineScroll.Components>
- <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" />
- <components:GridLines Rows="6" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
- </graphEx:RealTimeGraphExLineScroll.Components>
- <graphEx:RealTimeGraphExLineScroll.InnerContent>
- <Grid>
- <Label Style="{StaticResource graphLabel}">
- <StackPanel Orientation="Horizontal">
- <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorName,FallbackValue='Dispenser Motor'}"></TextBlock>
- <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorUnits,FallbackValue='(hz)'}"></TextBlock>
- </StackPanel>
- </Label>
- </Grid>
- </graphEx:RealTimeGraphExLineScroll.InnerContent>
- </graphEx:RealTimeGraphExLineScroll>
- </Border>
- </Grid>
- </ContentControl>
+ <Border BorderBrush="{StaticResource AccentColorBrush}" Grid.Row="1" Grid.Column="1" Margin="3 0 2 0">
+ <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Horizontal" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="hh\:mm\:ss" />
+ </Border>
+ </Grid>
+ </Border>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
index 2341c21c1..f82196fed 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
@@ -16,6 +16,8 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using RealTimeGraphEx;
using RealTimeGraphEx.Controllers;
+using RealTimeGraphX;
+using RealTimeGraphX.WPF.DataSeries;
namespace Tango.MachineStudio.Common.Controls
{
@@ -24,166 +26,52 @@ namespace Tango.MachineStudio.Common.Controls
/// </summary>
public partial class RealTimeGraphControl : UserControl, IRealTimeGraph
{
- private Grid headerGrid;
-
#region Properties
- /// <summary>
- /// Gets or sets the name of the sensor.
- /// </summary>
- public String SensorName
- {
- get { return (String)GetValue(SensorNameProperty); }
- set { SetValue(SensorNameProperty, value); }
- }
- public static readonly DependencyProperty SensorNameProperty =
- DependencyProperty.Register("SensorName", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the sensor units.
- /// </summary>
- public String SensorUnits
- {
- get { return (String)GetValue(SensorUnitsProperty); }
- set { SetValue(SensorUnitsProperty, value); }
- }
- public static readonly DependencyProperty SensorUnitsProperty =
- DependencyProperty.Register("SensorUnits", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null));
-
-
-
- public double Minimum
+ public String DisplayName
{
- get { return (double)GetValue(MinimumProperty); }
- set { SetValue(MinimumProperty, value); }
+ get { return (String)GetValue(DisplayNameProperty); }
+ set { SetValue(DisplayNameProperty, value); }
}
- public static readonly DependencyProperty MinimumProperty =
- DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphControl), new PropertyMetadata(0.0));
-
+ public static readonly DependencyProperty DisplayNameProperty =
+ DependencyProperty.Register("DisplayName", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null));
-
- public double Maximum
+ public String DisplayUnits
{
- get { return (double)GetValue(MaximumProperty); }
- set { SetValue(MaximumProperty, value); }
+ get { return (String)GetValue(DisplayUnitsProperty); }
+ set { SetValue(DisplayUnitsProperty, value); }
}
- public static readonly DependencyProperty MaximumProperty =
- DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphControl), new PropertyMetadata(100.0));
-
-
+ public static readonly DependencyProperty DisplayUnitsProperty =
+ DependencyProperty.Register("DisplayUnits", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null));
- public Color Color
+ public String StringFormat
{
- get { return (Color)GetValue(ColorProperty); }
- set { SetValue(ColorProperty, value); }
+ get { return (String)GetValue(StringFormatProperty); }
+ set { SetValue(StringFormatProperty, value); }
}
- public static readonly DependencyProperty ColorProperty =
- DependencyProperty.Register("Color", typeof(Color), typeof(RealTimeGraphControl), new PropertyMetadata(Colors.DodgerBlue));
+ public static readonly DependencyProperty StringFormatProperty =
+ DependencyProperty.Register("StringFormat", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata("0.0"));
- public bool UseAutoRange
+ public IGraphController<WpfDataSeries> Controller
{
- get { return (bool)GetValue(UseAutoRangeProperty); }
- set { SetValue(UseAutoRangeProperty, value); }
+ get { return (IGraphController<WpfDataSeries>)GetValue(ControllerProperty); }
+ set { SetValue(ControllerProperty, value); }
}
- public static readonly DependencyProperty UseAutoRangeProperty =
- DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphControl), new PropertyMetadata(false));
-
-
+ public static readonly DependencyProperty ControllerProperty =
+ DependencyProperty.Register("Controller", typeof(IGraphController<WpfDataSeries>), typeof(RealTimeGraphControl), new PropertyMetadata(null,(d,e) => (d as RealTimeGraphControl).OnControllerChanged()));
- public void InvalidateGraph()
+ private void OnControllerChanged()
{
- InnerGraph.Clear();
- yAxis.Render(InnerGraph);
- yAxisTicks.Render(InnerGraph);
+ Controller.Output.Output.ConnectOutput(Graph);
}
- /// <summary>
- /// Gets or sets the inner real-time graph control.
- /// </summary>
- public RealTimeGraphExBase InnerGraph { get; set; }
-
- /// <summary>
- /// Gets or sets the inner graph controller.
- /// </summary>
- public GraphControllerBase Controller { get; set; }
-
-
- private bool _enableToolbar;
- /// <summary>
- /// Gets or sets a value indicating whether to enable toolbar buttons.
- /// </summary>
- public bool EnableToolBar
- {
- get { return _enableToolbar; }
- set
- {
- _enableToolbar = value;
-
- if (!value)
- {
- if (headerGrid != null)
- {
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, -35, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
- }
- }
- }
-
-
- #endregion
-
- #region Events
-
- public event EventHandler GraphRemoveButtonPressed;
- public event EventHandler GraphFullScreenButtonPressed;
-
#endregion
public RealTimeGraphControl()
{
InitializeComponent();
- EnableToolBar = true;
- InnerGraph = Graph;
- Controller = new GraphController();
}
-
- private void OnGraphFullScreen(object sender, RoutedEventArgs e)
- {
- GraphFullScreenButtonPressed?.Invoke(this, new EventArgs());
- }
-
- private void Graph_MouseEnter(object sender, MouseEventArgs e)
- {
- if (EnableToolBar)
- {
- Grid mainGrid = sender as Grid;
- headerGrid = mainGrid.Children.OfType<Grid>().ToList().First();
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, 0, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
- }
-
- private void Graph_MouseLeave(object sender, MouseEventArgs e)
- {
- Grid mainGrid = sender as Grid;
- headerGrid = mainGrid.Children.OfType<Grid>().ToList().First();
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, -35, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
-
- private void OnGraphRemove(object sender, RoutedEventArgs e)
- {
- GraphRemoveButtonPressed?.Invoke(this, new EventArgs());
- }
-
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml
deleted file mode 100644
index 4976739e4..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml
+++ /dev/null
@@ -1,91 +0,0 @@
-<UserControl x:Class="Tango.MachineStudio.Common.Controls.RealTimeGraphMultiControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:graphEx="clr-namespace:RealTimeGraphEx.FastGraphs;assembly=RealTimeGraphEx"
- xmlns:components="clr-namespace:RealTimeGraphEx.Components;assembly=RealTimeGraphEx"
- xmlns:converters="clr-namespace:Tango.MachineStudio.Common.Converters"
- xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls"
- mc:Ignorable="d"
- d:DesignHeight="150" d:DesignWidth="300">
-
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <!--RealTimeGraphEx-->
- <ResourceDictionary Source="pack://application:,,,/RealTimeGraphEx;component/Resources/Resources.xaml"></ResourceDictionary>
- <ResourceDictionary Source="../Resources/MaterialDesign.xaml"></ResourceDictionary>
-
- <ResourceDictionary>
- <Style TargetType="ContentControl" x:Key="graphContent">
- <Style.Setters>
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <Grid MouseEnter="Graph_MouseEnter" MouseLeave="Graph_MouseLeave" ClipToBounds="True">
- <ContentControl Content="{Binding}"></ContentControl>
- <Grid Opacity="0.8" HorizontalAlignment="Stretch" VerticalAlignment="Top" ClipToBounds="True" Height="35" Margin="0 -35 0 0">
- <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Top">
- <Button Margin="0 0 5 0" Click="OnGraphFullScreen" ToolTip="Full Screen" Width="24" Height="24" BorderBrush="Transparent" Background="{StaticResource AccentColorBrush}" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" >
- <materialDesign:PackIcon Kind="Fullscreen" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" />
- </Button>
- <Button Click="OnGraphRemove" ToolTip="Remove" Width="24" Height="24" BorderBrush="Transparent" Background="#FF7777" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" >
- <materialDesign:PackIcon Kind="CloseCircle" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" />
- </Button>
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style.Setters>
- </Style>
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <!--Temperature-->
- <ContentControl Style="{StaticResource graphContent}" Margin="0 0 0 0" MinHeight="5">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40"/>
- <ColumnDefinition Width="438*"/>
- </Grid.ColumnDefinitions>
-
- <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="#E1151515">
- <StackPanel Orientation="Horizontal">
- <components:YAxisScroll x:Name="yAxis" Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="Gainsboro" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
- <components:YAxisTicks x:Name="yAxisTicks" SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks>
- </StackPanel>
- </Border>
- <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="1 0 0 0">
- <graphEx:RealTimeGraphExMultiLineScroll x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" FillGraph="False" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum,Mode=TwoWay}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum,Mode=TwoWay}" Stroke="DodgerBlue">
- <graphEx:RealTimeGraphExMultiLineScroll.Components>
- <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" />
- <components:GridLines Rows="6" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
- </graphEx:RealTimeGraphExMultiLineScroll.Components>
- <graphEx:RealTimeGraphExMultiLineScroll.InnerContent>
- <Grid>
- <Label Style="{StaticResource graphLabel}">
- <StackPanel Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center" FontSize="11" Foreground="Gainsboro" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorName,FallbackValue='Dispensers Motors'}"></TextBlock>
- <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorUnits,FallbackValue='(hz)'}"></TextBlock>
- </StackPanel>
- </Label>
- </Grid>
- </graphEx:RealTimeGraphExMultiLineScroll.InnerContent>
- </graphEx:RealTimeGraphExMultiLineScroll>
- </Border>
-
- <Border Grid.Column="2" Margin="5 0 0 0" HorizontalAlignment="Right" Opacity="0.8">
- <components:YAxisLegends VerticalAlignment="Center" Margin="0 0 5 0" Graph="{Binding ElementName=Graph}" Width="70" FlowDirection="RightToLeft" LegendTemplate="{StaticResource graphLegendTemplate}">
- </components:YAxisLegends>
- </Border>
- </Grid>
- </ContentControl>
- </Grid>
-</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs
deleted file mode 100644
index 21054d94e..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs
+++ /dev/null
@@ -1,174 +0,0 @@
-using RealTimeGraphEx;
-using RealTimeGraphEx.Controllers;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace Tango.MachineStudio.Common.Controls
-{
- /// <summary>
- /// Interaction logic for RealTimeGraphControl.xaml
- /// </summary>
- public partial class RealTimeGraphMultiControl : UserControl , IRealTimeGraph
- {
- private Grid headerGrid;
-
- #region Properties
-
- /// <summary>
- /// Gets or sets the name of the sensor.
- /// </summary>
- public String SensorName
- {
- get { return (String)GetValue(SensorNameProperty); }
- set { SetValue(SensorNameProperty, value); }
- }
- public static readonly DependencyProperty SensorNameProperty =
- DependencyProperty.Register("SensorName", typeof(String), typeof(RealTimeGraphMultiControl), new PropertyMetadata(null));
-
- /// <summary>
- /// Gets or sets the sensor units.
- /// </summary>
- public String SensorUnits
- {
- get { return (String)GetValue(SensorUnitsProperty); }
- set { SetValue(SensorUnitsProperty, value); }
- }
- public static readonly DependencyProperty SensorUnitsProperty =
- DependencyProperty.Register("SensorUnits", typeof(String), typeof(RealTimeGraphMultiControl), new PropertyMetadata(null));
-
- public double Minimum
- {
- get { return (double)GetValue(MinimumProperty); }
- set { SetValue(MinimumProperty, value); }
- }
- public static readonly DependencyProperty MinimumProperty =
- DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphMultiControl), new PropertyMetadata(0.0));
-
-
-
- public double Maximum
- {
- get { return (double)GetValue(MaximumProperty); }
- set { SetValue(MaximumProperty, value); }
- }
- public static readonly DependencyProperty MaximumProperty =
- DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphMultiControl), new PropertyMetadata(100.0));
-
-
-
- public bool UseAutoRange
- {
- get { return (bool)GetValue(UseAutoRangeProperty); }
- set { SetValue(UseAutoRangeProperty, value); }
- }
- public static readonly DependencyProperty UseAutoRangeProperty =
- DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphMultiControl), new PropertyMetadata(false));
-
-
-
- public void InvalidateGraph()
- {
- InnerGraph.Clear();
- yAxis.Render(InnerGraph);
- yAxisTicks.Render(InnerGraph);
- }
-
- /// <summary>
- /// Gets or sets the inner real-time graph control.
- /// </summary>
- public RealTimeGraphExBase InnerGraph { get; set; }
-
- /// <summary>
- /// Gets or sets the inner graph controller.
- /// </summary>
- public GraphControllerBase Controller { get; set; }
-
- private bool _enableToolbar;
- /// <summary>
- /// Gets or sets a value indicating whether to enable toolbar buttons.
- /// </summary>
- public bool EnableToolBar
- {
- get { return _enableToolbar; }
- set
- {
- _enableToolbar = value;
-
- if (!value)
- {
- if (headerGrid != null)
- {
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, -35, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
- }
- }
- }
-
- #endregion
-
- #region Events
-
- public event EventHandler GraphRemoveButtonPressed;
- public event EventHandler GraphFullScreenButtonPressed;
-
- #endregion
-
- public RealTimeGraphMultiControl()
- {
- InitializeComponent();
- EnableToolBar = true;
- InnerGraph = Graph;
- Controller = new GraphMultiController();
- }
-
- private void OnGraphFullScreen(object sender, RoutedEventArgs e)
- {
- GraphFullScreenButtonPressed?.Invoke(this, new EventArgs());
- }
-
- private void Graph_MouseEnter(object sender, MouseEventArgs e)
- {
- if (EnableToolBar)
- {
- Grid mainGrid = sender as Grid;
- headerGrid = mainGrid.Children.OfType<Grid>().ToList().First();
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, 0, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
- }
-
- private void Graph_MouseLeave(object sender, MouseEventArgs e)
- {
- Grid mainGrid = sender as Grid;
- headerGrid = mainGrid.Children.OfType<Grid>().ToList().First();
- ThicknessAnimation ani = new ThicknessAnimation();
- ani.To = new Thickness(0, -35, 0, 0);
- ani.Duration = TimeSpan.FromSeconds(0.2);
- headerGrid.BeginAnimation(Grid.MarginProperty, ani);
- }
-
- private void OnGraphRemove(object sender, RoutedEventArgs e)
- {
- GraphRemoveButtonPressed?.Invoke(this, new EventArgs());
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs
index 990300143..3cac8b673 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core;
namespace Tango.MachineStudio.Common.Modules
{
@@ -20,12 +21,12 @@ namespace Tango.MachineStudio.Common.Modules
/// <summary>
/// Gets all loaded modules.
/// </summary>
- ObservableCollection<IStudioModule> AllModules { get; }
+ SynchronizedObservableCollection<IStudioModule> AllModules { get; }
/// <summary>
/// Gets all the user permitted modules.
/// </summary>
- ObservableCollection<IStudioModule> UserModules { get; }
+ SynchronizedObservableCollection<IStudioModule> UserModules { get; }
/// <summary>
/// Gets the studio module of type T if loaded.
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 acddeec6e..c274b96ab 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
@@ -8,6 +8,14 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources">
<ResourceDictionary.MergedDictionaries>
+
+ <!--WPF Extended Toolkit-->
+ <!--<ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic/Brushes.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic/Buttons.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic/Common.xaml"/>
+
+ <ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/TimeSpanUpDown/Themes/Generic.xaml"/>-->
+
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml">
@@ -67,6 +75,7 @@
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" />
<SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" />
</ResourceDictionary>
+
<!--Fonts-->
<ResourceDictionary>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
index 640922a87..551ec93c0 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
@@ -8,7 +8,7 @@
<OutputType>library</OutputType>
<RootNamespace>Tango.MachineStudio.Common</RootNamespace>
<AssemblyName>Tango.MachineStudio.Common</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
@@ -86,9 +86,6 @@
</Compile>
<Compile Include="Controls\IRealTimeGraph.cs" />
<Compile Include="Controls\LoadingPanel.cs" />
- <Compile Include="Controls\RealTimeGraphMultiControl.xaml.cs">
- <DependentUpon>RealTimeGraphMultiControl.xaml</DependentUpon>
- </Compile>
<Compile Include="Controls\RealTimeGraphControl.xaml.cs">
<DependentUpon>RealTimeGraphControl.xaml</DependentUpon>
</Compile>
@@ -152,10 +149,6 @@
<Compile Include="Navigation\INavigationManager.cs" />
<Compile Include="Navigation\NavigationView.cs" />
<Compile Include="Notifications\INotificationProvider.cs" />
- <Page Include="Controls\RealTimeGraphMultiControl.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Controls\RealTimeGraphControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -204,6 +197,14 @@
<Project>{b9ae25d6-be35-492f-9079-21a7f3e6f7cc}</Project>
<Name>RealTimeGraphEx</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\SideChains\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj">
+ <Project>{99d233c5-fee7-418e-9c25-d4584cb52e28}</Project>
+ <Name>RealTimeGraphX.WPF</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\SideChains\RealTimeGraphX\RealTimeGraphX.csproj">
+ <Project>{6d55a3b8-46d3-493a-a143-aebd2b98d683}</Project>
+ <Name>RealTimeGraphX</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj">
<Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project>
<Name>Tango.AutoComplete</Name>
@@ -300,7 +301,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj
index e86b3ddf0..c462c21f4 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Tango.MachineStudio.Publisher</RootNamespace>
<AssemblyName>Tango.MachineStudio.Publisher</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
index 0395c36bb..6f1fcffc2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
@@ -115,6 +115,10 @@
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
index 13c3d6779..0def3c943 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs
@@ -32,8 +32,8 @@ namespace Tango.MachineStudio.UI.Modules
public DefaultStudioModuleLoader(IAuthenticationProvider authenticationProvider)
{
_authenticationProvider = authenticationProvider;
- AllModules = new ObservableCollection<IStudioModule>();
- UserModules = new ObservableCollection<IStudioModule>();
+ AllModules = new SynchronizedObservableCollection<IStudioModule>();
+ UserModules = new SynchronizedObservableCollection<IStudioModule>();
_authenticationProvider.CurrentUserChanged += _authenticationProvider_CurrentUserChanged;
}
@@ -47,21 +47,21 @@ namespace Tango.MachineStudio.UI.Modules
LoadModules();
}
- private ObservableCollection<IStudioModule> _allModules;
+ private SynchronizedObservableCollection<IStudioModule> _allModules;
/// <summary>
/// Gets all loaded modules.
/// </summary>
- public ObservableCollection<IStudioModule> AllModules
+ public SynchronizedObservableCollection<IStudioModule> AllModules
{
get { return _allModules; }
private set { _allModules = value; RaisePropertyChangedAuto(); }
}
- private ObservableCollection<IStudioModule> _userModules;
+ private SynchronizedObservableCollection<IStudioModule> _userModules;
/// <summary>
/// Gets all the user permitted modules.
/// </summary>
- public ObservableCollection<IStudioModule> UserModules
+ public SynchronizedObservableCollection<IStudioModule> UserModules
{
get { return _userModules; }
private set { _userModules = value; RaisePropertyChangedAuto(); }
@@ -121,13 +121,13 @@ namespace Tango.MachineStudio.UI.Modules
_loaded = true;
}
- AllModules = AllModules.OrderBy(x => x.GetType().GetCustomAttribute<StudioModuleAttribute>().Index).ToObservableCollection();
+ AllModules = AllModules.OrderBy(x => x.GetType().GetCustomAttribute<StudioModuleAttribute>().Index).ToSynchronizedObservableCollection();
UserModules.Clear();
if (_authenticationProvider.CurrentUser != null)
{
- UserModules = AllModules.Where(x => _authenticationProvider.CurrentUser.HasPermission(x.Permission)).ToObservableCollection();
+ UserModules = AllModules.Where(x => _authenticationProvider.CurrentUser.HasPermission(x.Permission)).ToSynchronizedObservableCollection();
}
ModulesLoaded?.Invoke(this, new EventArgs());
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index 1803e82c5..003a7f194 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Tango.MachineStudio.UI</RootNamespace>
<AssemblyName>Tango.MachineStudio.UI</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index cbd58134d..b3d896d53 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -412,6 +412,7 @@ namespace Tango.MachineStudio.UI.ViewModels
private void SignOut()
{
_authenticationProvider.Logout();
+ Home();
_navigation.NavigateTo(NavigationView.LoginView);
CurrentModule = null;
IsMenuOpened = false;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj
index 8e9d60541..40cc6fb3c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj
@@ -12,7 +12,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tango.MachineStudio.UpdateService</RootNamespace>
<AssemblyName>Tango.MachineStudio.UpdateService</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<UseIISExpress>true</UseIISExpress>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj
index db6fcb52f..fd1b61f1a 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Tango.MachineStudio.Updater.csproj
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Tango.MachineStudio.Updater</RootNamespace>
<AssemblyName>Tango.MachineStudio.Updater</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>