aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-03 12:14:39 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-03 12:14:39 +0300
commita4955b69fbbec89a80418ed8e8271e56db61bf32 (patch)
tree53ce5cf60f03b909e815475c1087ddcfad87af81 /Software/Visual_Studio
parent0f546e28ff310f93da65ec6a8e7fd53ae19c0988 (diff)
parent251cf705409697f339828359b6770534116dca5f (diff)
downloadTango-a4955b69fbbec89a80418ed8e8271e56db61bf32.tar.gz
Tango-a4955b69fbbec89a80418ed8e8271e56db61bf32.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip6
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnkbin1471 -> 1455 bytes
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnkbin1516 -> 1516 bytes
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnkbin1464 -> 1448 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml72
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs26
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml98
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml100
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj227
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config46
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpgbin0 -> 62359 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.pngbin0 -> 2191 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.pngbin0 -> 315399 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs63
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj182
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs325
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml286
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs51
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml65
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/SecondsToTimeSpanConverter.cs23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml64
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml75
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml265
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml236
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml.cs110
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml167
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml.cs103
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml251
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml221
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml75
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/csv.pngbin0 -> 1650 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/heater-controller.pngbin0 -> 1136 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/temperature.pngbin0 -> 1827 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/MultiTechRecordingData.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/SingleTechRecordingData.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/TechRecordingData.cs23
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProject.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProjectTab.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml35
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj51
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs15
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs103
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs131
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs20
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs20
-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/MachineTechTabVM.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs472
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml517
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml24
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml111
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config28
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs33
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs33
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs19
-rw-r--r--Software/Visual_Studio/Tango.BL/Dispensing/DispensingCalcBase.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs22
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs101
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs10
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs1
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs22
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs32
-rw-r--r--Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs6
-rw-r--r--Software/Visual_Studio/Tango.BL/Enumerations/TechHeaters.cs47
-rw-r--r--Software/Visual_Studio/Tango.BL/LiquidVolume.cs12
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesContext.cs8
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs38
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesStaticCollections.cs1
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs38
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj2
-rw-r--r--Software/Visual_Studio/Tango.CSV/CsvFile.cs11
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx39
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram149
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs24
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj5
-rw-r--r--Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml12
-rw-r--r--Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs12
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs92
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs17
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs74
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs63
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs21
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs45
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterState.cs303
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterType.cs51
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateRequest.cs218
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateResponse.cs131
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateRequest.cs218
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateResponse.cs131
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs43
-rw-r--r--Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj8
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/IView.cs5
-rw-r--r--Software/Visual_Studio/Tango.sln55
-rw-r--r--Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs23
133 files changed, 6604 insertions, 1173 deletions
diff --git a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip
index d135588ab..1ff055c03 100644
--- a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip
+++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip
@@ -11,10 +11,10 @@
<ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
<ROW Property="Manufacturer" Value="Twine"/>
- <ROW Property="ProductCode" Value="1033:{A45E864B-497A-42B6-9A4E-3A1D94CB3EBA} " Type="16"/>
+ <ROW Property="ProductCode" Value="1033:{6D7682A8-9375-4C40-8D10-46602F725A7D} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="Machine Studio"/>
- <ROW Property="ProductVersion" Value="3.3.38" Type="32"/>
+ <ROW Property="ProductVersion" Value="3.4.43" Type="32"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
<ROW Property="UpgradeCode" Value="{CBEE5CAE-7C5A-4280-98DE-AA98113764E4}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
@@ -366,7 +366,7 @@
<ROW Action="AI_DetectSoftware" Sequence="101"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
- <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Machine Studio\Release" PackageFileName="Machine Studio Installer_v3.3.38" Languages="en" InstallationType="4" UseLargeSchema="true"/>
+ <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Machine Studio\Release" PackageFileName="Machine Studio Installer_v3.4.43" Languages="en" InstallationType="4" UseLargeSchema="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
index 72aadc5cf..bcc3c888a 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
Binary files differ
diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
index 20fa67369..80ea2f09d 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
Binary files differ
diff --git a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
index edc2f528f..8472e8003 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
Binary files differ
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 7e8a9e126..18d51aa09 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
@@ -74,10 +74,14 @@
</Compile>
<Compile Include="ViewModelLocator.cs" />
<Compile Include="ViewModels\CalibrationDataPointVM.cs" />
+ <Compile Include="ViewModels\CalibrationDataViewVM.cs" />
<Compile Include="ViewModels\CalibrationDataVM.cs" />
<Compile Include="ViewModels\LiquidVolumeVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
<Compile Include="ViewModels\RgbVM.cs" />
+ <Compile Include="Views\CalibrationDataView.xaml.cs">
+ <DependentUpon>CalibrationDataView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
@@ -157,6 +161,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <Page Include="Views\CalibrationDataView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\MainView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -179,7 +187,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/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs
new file mode 100644
index 000000000..c9c83dde0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataViewVM.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Common;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.ColorLab.ViewModels
+{
+ public class CalibrationDataViewVM : ViewModel
+ {
+ private ObservableCollection<CalibrationDataVM> _liquidsCalibrationData;
+ /// <summary>
+ /// Gets or sets the liquids calibration data.
+ /// </summary>
+ public ObservableCollection<CalibrationDataVM> LiquidsCalibrationData
+ {
+ get { return _liquidsCalibrationData; }
+ set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class.
+ /// </summary>
+ public CalibrationDataViewVM()
+ {
+ LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CalibrationDataViewVM"/> class.
+ /// </summary>
+ /// <param name="liquidsCalibrationData">The liquids calibration data.</param>
+ public CalibrationDataViewVM(ObservableCollection<CalibrationDataVM> liquidsCalibrationData)
+ {
+ LiquidsCalibrationData = liquidsCalibrationData;
+ }
+ }
+}
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 02f496b1f..d0fa80a20 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
@@ -150,6 +150,13 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); }
}
+ private CalibrationDataViewVM _calibrationDataViewVM;
+ public CalibrationDataViewVM CalibrationDataViewVM
+ {
+ get { return _calibrationDataViewVM; }
+ set { _calibrationDataViewVM = value; RaisePropertyChangedAuto(); }
+ }
+
private RgbVM _sourceColor;
/// <summary>
/// Gets or sets the color of the source.
@@ -566,6 +573,7 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
//RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active);
LiquidsCalibrationData = new ObservableCollection<CalibrationDataVM>();
+ CalibrationDataViewVM = new CalibrationDataViewVM(LiquidsCalibrationData);
LiquidsCalibrationData.EnableCrossThreadOperations();
foreach (var idsPack in SelectedMachine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex))
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml
new file mode 100644
index 000000000..28279bd50
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml
@@ -0,0 +1,72 @@
+<UserControl x:Class="Tango.MachineStudio.ColorLab.Views.CalibrationDataView"
+ 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:global="clr-namespace:Tango.MachineStudio.ColorLab"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.ColorLab.ViewModels"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.ColorLab.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:CalibrationDataViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ <converters:ColorComponentToOpacityConverter x:Key="ColorComponentToOpacityConverter" />
+ <converters:ColorToComponentsConverter x:Key="ColorToComponentsConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Rows="1" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel Width="220">
+
+ <StackPanel DockPanel.Dock="Top">
+
+ <StackPanel DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0 0 5 0">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Import from excel" Width="30">
+ <materialDesign:PackIcon Kind="Download" Foreground="Black" />
+ </Button>
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Export to excel" Width="30">
+ <materialDesign:PackIcon Kind="Upload" Foreground="Black" />
+ </Button>
+ </StackPanel>
+ <Border Padding="2" Margin="5" CornerRadius="3">
+ <Border.Background>
+ <SolidColorBrush Opacity="0.4" Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </Border.Background>
+ <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Black"></TextBlock>
+ </Border>
+ </StackPanel>
+
+ <Grid Margin="0 0 0 5">
+ <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="#202020" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="False">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
+ <Setter Property="FlowDirection" Value="RightToLeft"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="DimGray" FontSize="11" />
+ <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/>
+ <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs
new file mode 100644
index 000000000..26100f16d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/CalibrationDataView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.ColorLab.Views
+{
+ /// <summary>
+ /// Interaction logic for CalibrationDataView.xaml
+ /// </summary>
+ public partial class CalibrationDataView : UserControl
+ {
+ public CalibrationDataView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml
index 78eaf04e8..4e8703a6e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml
@@ -360,44 +360,8 @@
<TextBlock FontSize="20" Margin="0 20 0 0" TextAlignment="Center">CALIBRATION DATA</TextBlock>
</Grid>
- <Grid Margin="0 20 0 0">
- <ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Rows="1" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
-
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <DockPanel>
- <Border Padding="2" Margin="5" CornerRadius="3" DockPanel.Dock="Top">
- <Border.Background>
- <SolidColorBrush Opacity="0.4" Color="{Binding Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </Border.Background>
- <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Black"></TextBlock>
- </Border>
-
- <Grid Margin="0 0 0 5">
- <DataGrid Background="#BBFFFFFF" AlternatingRowBackground="#CCE1E1E1" BorderThickness="1" BorderBrush="#202020" Margin="5 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" CanUserSortColumns="True">
- <DataGrid.CellStyle>
- <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
- <Setter Property="FlowDirection" Value="RightToLeft"></Setter>
- </Style>
- </DataGrid.CellStyle>
- <DataGrid.Columns>
- <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="DimGray" FontSize="11" />
- <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*"/>
- <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" />
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </DockPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
+ <Grid Margin="0 20 0 0" IsEnabled="{Binding IsFree}">
+ <local:CalibrationDataView DataContext="{Binding CalibrationDataViewVM}"></local:CalibrationDataView>
</Grid>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
new file mode 100644
index 000000000..e59141e7f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.BL;
+using Tango.BL.Enumerations;
+
+namespace Tango.MachineStudio.Developer.Converters
+{
+ public class LiquidVolumesToLubricantLiquidVolume : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ IEnumerable<LiquidVolume> liquid_volumes = value as IEnumerable<LiquidVolume>;
+ return liquid_volumes.SingleOrDefault(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.Lubricant.ToInt32());
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
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 dc96f7112..cbaec81eb 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
@@ -102,6 +102,7 @@
<Compile Include="Converters\InkVolumeToLiquidRmlFactor.cs" />
<Compile Include="Converters\JobProgressToPositionConverter.cs" />
<Compile Include="Converters\JobToColumnDefinitionsConverter.cs" />
+ <Compile Include="Converters\LiquidVolumesToLubricantLiquidVolume.cs" />
<Compile Include="Converters\MillisecondsToTimeSpanConverter.cs" />
<Compile Include="Converters\ObjectsNotEqualToBooleanConveter.cs" />
<Compile Include="Converters\OneToPercentConverter.cs" />
@@ -359,7 +360,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/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index e04b1539a..6c3e31325 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
@@ -657,6 +657,12 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// Gets or sets to running job command.
/// </summary>
public RelayCommand ToRunningJobCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the reset process parameters command.
+ /// </summary>
+ public RelayCommand ResetProcessParametersCommand { get; set; }
+
#endregion
#region Constructors
@@ -713,6 +719,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
ImportEmbroideryFileCommand = new RelayCommand(ImportEmbroideryFile, () => SelectedMachine != null && CanWork);
DisplayJobEmbroideryFileCommand = new RelayCommand<Job>(DisplayJobEmbroideryFile, () => CanWork);
ReloadMachinesCommand = new RelayCommand(() => LoadMachine(), () => CanWork && SelectedMachine != null);
+ ResetProcessParametersCommand = new RelayCommand(ResetProcessParameters);
ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged;
@@ -1491,6 +1498,29 @@ namespace Tango.MachineStudio.Developer.ViewModels
CanWork = true;
}
+ /// <summary>
+ /// Resets the process parameters.
+ /// </summary>
+ private async void ResetProcessParameters()
+ {
+ if (_notification.ShowQuestion("This will reset the process parameters. Are you sure?"))
+ {
+ using (_notification.PushTaskItem("Resetting process parameters..."))
+ {
+ try
+ {
+ await ApplicationManager.ConnectedMachine.UploadProcessParameters(new ProcessParametersTable());
+ _notification.ShowInfo("Heaters are turned off.");
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error resetting process parameters.");
+ _notification.ShowError("Error resetting process parameters." + Environment.NewLine + ex.Message);
+ }
+ }
+ }
+ }
+
#endregion
#region Active Job Management
@@ -1575,6 +1605,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments);
SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending));
+ foreach (var segment in ActiveJob.Segments)
+ {
+ SetSegmentBrushStopsLiquidVolumes(segment);
+ }
+
SelectedSegment = _selectedSegment;
UIHelper.DoEvents();
@@ -1810,7 +1845,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
LogManager.LogFormat("Adding new segment to job {0}...", ActiveJob.Name);
Segment seg = new Segment();
seg.Job = ActiveJob;
- seg.Name = "Untitled Segment";
+ seg.Name = "SEGMENT";
seg.Length = 10;
if (ActiveJob.Segments.Count > 0)
@@ -1878,7 +1913,9 @@ namespace Tango.MachineStudio.Developer.ViewModels
newJob.Machine = SelectedMachine;
SelectedMachine.Jobs.Add(newJob);
- newJob.AddSolidSegment();
+ var segment = newJob.AddSolidSegment();
+ segment.BrushStops[0].SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8);
+
LogManager.Log("Saving selected machine to database...");
await SelectedMachine.SaveAsync(_machineDbContext);
SelectedMachineJob = newJob;
@@ -1933,6 +1970,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
stop.Segment = SelectedSegment;
stop.ColorSpace = ColorSpaces.FirstOrDefault();
stop.Color = Colors.Black;
+ stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8);
stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable);
SelectedSegment.BrushStops.Add(stop);
SelectedSegment.BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged());
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index ba7c80f5b..3f1f3b486 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -71,6 +71,8 @@
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
<converters:IsNotConverter x:Key="IsNotConverter" />
<converters:ObjectToObjectTypeConverter x:Key="ObjectToObjectTypeConverter" />
+ <converters:MathOperatorConverter x:Key="MathOperatorConverter" />
+ <localConverters:LiquidVolumesToLubricantLiquidVolume x:Key="LiquidVolumesToLubricantLiquidVolume" />
<ObjectDataProvider x:Key="dispenserDivisions" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
@@ -351,11 +353,6 @@
</Polygon>
<Border Height="100" Padding="5" IsHitTestVisible="False">
<Grid>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontStyle="Italic">
- <Run>#</Run>
- <Run>SEGMENT</Run>
- <Run Text="{Binding SegmentIndex}"></Run>
- </TextBlock>
<Rectangle VerticalAlignment="Bottom" Height="8">
<Rectangle.Fill>
<MultiBinding Converter="{StaticResource SegmentToBrushConverterMulti}">
@@ -369,6 +366,21 @@
</Grid>
</Border>
+ <Grid Margin="20 10 10 10" TextElement.FontSize="16" TextElement.FontStyle="Italic" >
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <TextBlock FontWeight="SemiBold">#</TextBlock>
+ <TextBlock FontWeight="SemiBold" Margin="5 0 0 0" Text="{Binding SegmentIndex}"></TextBlock>
+ </StackPanel>
+
+
+ <TextBox Grid.Column="1" VerticalAlignment="Center" Width="200" HorizontalContentAlignment="Center" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Name}"></TextBox>
+ </Grid>
+
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
@@ -729,16 +741,28 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Width="60" Height="60" Margin="10 0 0 0">
- <ContentControl.Foreground>
- <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
- </ContentControl.Foreground>
- <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
- <mahapps:NumericUpDown.Resources>
- <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </ContentControl>
+ <Border>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IdsPack.IdsPackFormula.Name}" Value="Lubricant">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="60" Height="60">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown FontSize="{StaticResource NumbersFontSize}" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
@@ -749,7 +773,9 @@
</StackPanel>
</StackPanel>
- <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" FontSize="16" FontStyle="Italic" Foreground="Gray">
+ <materialDesign:PackIcon Kind="ChevronDoubleLeft" Margin="40 2 0 0" VerticalAlignment="Center" Foreground="Gray" />
+
+ <TextBlock VerticalAlignment="Center" FontSize="16" Margin="5 0 0 0" FontStyle="Italic" Foreground="Gray">
<Run>Total:</Run>
<Run Text="{Binding TotalLiquidVolume,Mode=OneWay,StringFormat=0}"></Run><Run>%</Run>
<Run>(</Run>
@@ -757,6 +783,29 @@
<Run FontSize="12">nl</Run>
<Run>)</Run>
</TextBlock>
+
+ <Border Margin="60 0 0 0" DataContext="{Binding LiquidVolumes,Converter={StaticResource LiquidVolumesToLubricantLiquidVolume}}" BorderBrush="#E6E6E6" BorderThickness="1 0 0 0">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Converter={StaticResource NullObjectToBooleanConverter}}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <ContentControl Focusable="False" Style="{StaticResource numberBorder}" Margin="10 0 0 0" Width="55" Height="55">
+ <ContentControl.Foreground>
+ <SolidColorBrush Color="{Binding IdsPack.LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"></SolidColorBrush>
+ </ContentControl.Foreground>
+ <mahapps:NumericUpDown Foreground="#515151" FontSize="20" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Volume, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="1000" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown.Resources>
+ <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ </ContentControl>
+ </Border>
</StackPanel>
</Setter.Value>
</Setter>
@@ -1001,7 +1050,7 @@
<DataGridTemplateColumn Header="IDX">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <TextBlock Text="{Binding IdsPack.PackIndex}" VerticalAlignment="Center" HorizontalAlignment="Center" />
+ <TextBlock Text="{Binding IdsPack.PackIndex,Converter={StaticResource MathOperatorConverter},ConverterParameter='+1'}" VerticalAlignment="Center" HorizontalAlignment="Center" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -1009,7 +1058,7 @@
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center">
- <Run Text="{Binding IdsPack.DispenserType.NlPerPulse,StringFormat='0.00'}"></Run>
+ <Run Text="{Binding NanoliterPerStep,Mode=OneWay,StringFormat='0.00'}"></Run>
<Run Text="(nl)" FontSize="9" Foreground="Gray"></Run>
</TextBlock>
</DataTemplate>
@@ -1018,7 +1067,7 @@
<DataGridTemplateColumn Header="STEP">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}">
+ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Setter Property="Background" Value="#ECECEC"></Setter>
@@ -1419,8 +1468,8 @@
<Grid Background="Transparent" Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessParameterDropped" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=editors:ParameterizedEditor},Path=DraggingSurface}">
<ContentControl>
<StackPanel>
- <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="10"></TextBlock>
- <mahapps:NumericUpDown FontSize="16" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
+ <mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</ContentControl>
</Grid>
@@ -1471,6 +1520,11 @@
</ListBox>
<StackPanel Margin="10 20" VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button Height="40" Width="105" Command="{Binding ResetProcessParametersCommand}" Background="Transparent" BorderBrush="#202020" Foreground="#202020" Margin="0 2 10 0" ToolTip="Resets the current process parameters in the embedded device">
+ <TextBlock TextWrapping="Wrap" TextAlignment="Center">
+ RESET
+ </TextBlock>
+ </Button>
<Button Height="40" Command="{Binding SaveProcessParametersCommand}" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ContentSave"></materialDesign:PackIcon>
@@ -1519,7 +1573,7 @@
<Button Background="Transparent" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 0 -50 0">
<Border Background="#F1F1F1" CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="#383838">
<Grid>
- <TextBlock Foreground="#FF7272" Text="CONFIGURATION" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <TextBlock Foreground="#FF7272" Text="PROCESS PARAMETERS" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock.LayoutTransform>
<RotateTransform Angle="270"></RotateTransform>
</TextBlock.LayoutTransform>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
index 11c60c1ef..fe04cead7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
@@ -14,15 +14,103 @@
<UserControl.Resources>
<converters:DateTimeUTCToStringConverter x:Key="DateTimeUTCToStringConverter" />
</UserControl.Resources>
-
- <Grid>
- <Grid Margin="40">
+
+ <Grid Margin="40">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="900*" MinHeight="50" />
+ <RowDefinition Height="5"/>
+ <RowDefinition Height="743*" MinHeight="170"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
<DockPanel>
- <StackPanel Margin="0 20 0 0" Orientation="Horizontal" DockPanel.Dock="Top">
- <materialDesign:PackIcon Kind="Settings" Width="60" Height="60" />
- <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Job Status</TextBlock>
+ <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top">
+ <materialDesign:PackIcon Kind="Settings" Width="40" Height="40" />
+ <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Status</TextBlock>
</StackPanel>
+ <DataGrid x:Name="gridSegments" SelectionMode="Single" SelectionChanged="DataGrid_SelectionChanged" SelectionUnit="FullRow" RowHeight="40" GridLinesVisibility="None" ItemsSource="{Binding RunningJobStatus.Segments}" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding RunningJobStatus.CurrentSegment}" Background="Transparent" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" IsReadOnly="True" AutoGenerateColumns="False">
+ <DataGrid.RowStyle>
+ <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Foreground" Value="White"></Setter>
+ <Setter Property="Background">
+ <Setter.Value>
+ <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
+ <GradientStop Color="#FFFF7A7A"/>
+ <GradientStop Color="Transparent" Offset="1"/>
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="BorderThickness" Value="1"></Setter>
+ <Setter Property="BorderBrush" Value="White"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.RowStyle>
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="White"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Width="Auto" Header="#" Binding="{Binding SegmentIndex}" />
+ <DataGridTemplateColumn Header="Status">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <materialDesign:PackIcon VerticalAlignment="Center" HorizontalAlignment="Center">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Kind" Value="PauseCircle"></Setter>
+ <Setter Property="Foreground" Value="Gray"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Started}" Value="True">
+ <Setter Property="Kind" Value="ClockFast"></Setter>
+ <Setter Property="Foreground" Value="White"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Completed}" Value="True">
+ <Setter Property="Kind" Value="CheckCircle"></Setter>
+ <Setter Property="Foreground" Value="#29B31D"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn>
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <Rectangle Width="80" Fill="{Binding SegmentBrush}" Stroke="Gray"></Rectangle>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}" />
+ <DataGridTextColumn Header="Length" Binding="{Binding Length,StringFormat={}{0:F2} m}" />
+ <DataGridTextColumn Header="Progress" Binding="{Binding Progress,StringFormat={}{0:F2} m}" />
+ <DataGridTextColumn Header="Estimated Duration" Binding="{Binding EstimatedDuration,StringFormat='hh\\:mm\\:ss'}" />
+ <DataGridTextColumn Header="Remaining Time" Binding="{Binding RemainingTime,StringFormat='hh\\:mm\\:ss'}" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </DockPanel>
+ </Grid>
+ <GridSplitter Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="5" Background="Black" />
+ <Grid Grid.Row="2" Margin="0 40 0 0">
+ <DockPanel>
+ <StackPanel Margin="0 0 0 0" Orientation="Horizontal" DockPanel.Dock="Top">
+ <materialDesign:PackIcon Kind="Settings" Width="40" Height="40" />
+ <TextBlock FontSize="30" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0">Events</TextBlock>
+ </StackPanel>
<Grid DockPanel.Dock="Bottom" Height="40">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0">
<Button Command="{Binding BackToJobCommand}" Style="{StaticResource MaterialDesignFlatButton}" FontSize="16">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml.cs
index 74ace554e..5579870f6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml.cs
@@ -24,5 +24,13 @@ namespace Tango.MachineStudio.Developer.Views
{
InitializeComponent();
}
+
+ private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (gridSegments.SelectedItem != null)
+ {
+ gridSegments.ScrollIntoView(gridSegments.SelectedItem);
+ }
+ }
}
}
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
new file mode 100644
index 000000000..1c2b96de8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Tango.MachineStudio.Logging_5q2jsctg_wpftmp.csproj
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{1674F726-0E66-414F-B9FD-C6F20D7F07C7}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.Logging</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.Logging</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="ControlledObservableCollection.cs" />
+ <Compile Include="Controls\TimelineScrollViewer.cs" />
+ <Compile Include="Controls\TimeRuler.cs" />
+ <Compile Include="Converters\DateIsInListToBooleanConverter.cs" />
+ <Compile Include="Converters\EventsToTimeRulerTicksConverter.cs" />
+ <Compile Include="Converters\LogItemToMessageConverter.cs" />
+ <Compile Include="Converters\MachineEventToXConverter.cs" />
+ <Compile Include="Converters\SecondsToWidthConverter.cs" />
+ <Compile Include="Converters\StringToFirstLineConverter.cs" />
+ <Compile Include="Converters\TimeSpanToXConverter.cs" />
+ <Compile Include="Helpers\TimelineHelper.cs" />
+ <Compile Include="LoggingModule.cs" />
+ <Compile Include="Navigation\LoggingNavigationManager.cs" />
+ <Compile Include="Navigation\LoggingNavigationView.cs" />
+ <Compile Include="Parsing\ApplicationLogFileParser.cs" />
+ <Compile Include="Parsing\EmbeddedLogFileParser.cs" />
+ <Compile Include="Parsing\ILogFileParser.cs" />
+ <Compile Include="Parsing\LogFile.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\EmbeddedLogsViewVM.cs" />
+ <Compile Include="ViewModels\ApplicationLogsViewVM.cs" />
+ <Compile Include="ViewModels\EventDetailsViewVM.cs" />
+ <Compile Include="ViewModels\HomeViewVM.cs" />
+ <Compile Include="ViewModels\EventsViewVM.cs" />
+ <Compile Include="ViewModels\LogDetailsViewVM.cs" />
+ <Compile Include="ViewModels\TimelineEventGroup.cs" />
+ <Compile Include="ViewModels\TimelineViewVM.cs" />
+ <Compile Include="Views\EmbeddedLogDetailsView.xaml.cs">
+ <DependentUpon>EmbeddedLogDetailsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\EmbeddedLogsView.xaml.cs">
+ <DependentUpon>EmbeddedLogsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\ApplicationLogDetailsView.xaml.cs">
+ <DependentUpon>ApplicationLogDetailsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\EventDetailsView.xaml.cs">
+ <DependentUpon>EventDetailsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\ApplicationLogsView.xaml.cs">
+ <DependentUpon>ApplicationLogsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\EventsView.xaml.cs">
+ <DependentUpon>EventsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\HomeView.xaml.cs">
+ <DependentUpon>HomeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\TimelineView.xaml.cs">
+ <DependentUpon>TimelineView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\TimelineWrapperView.xaml.cs">
+ <DependentUpon>TimelineWrapperView.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj">
+ <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project>
+ <Name>Tango.AutoComplete</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj">
+ <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project>
+ <Name>Tango.Integration</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj">
+ <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project>
+ <Name>Tango.Settings</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <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" />
+ </VisualStudio>
+ </ProjectExtensions>
+ <ItemGroup>
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\Microsoft.CSharp.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationCore.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\PresentationFramework.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.ComponentModel.DataAnnotations.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Core.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Data.DataSetExtensions.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Data.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Net.Http.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xaml.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xml.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Xml.Linq.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\SideChains\Tango.AutoComplete\bin\Debug\Tango.AutoComplete.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.BL.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Core.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Integration.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Logging.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Machine Studio\Debug\Tango.MachineStudio.Common.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.PMR.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Settings.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.SharedUI.dll" />
+ <ReferencePath Include="D:\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Transport.dll" />
+ <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\WindowsBase.dll" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EmbeddedLogDetailsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EmbeddedLogsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\ApplicationLogDetailsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EventDetailsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\ApplicationLogsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\EventsView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\HomeView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\MainView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\TimelineView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\Views\TimelineWrapperView.g.cs" />
+ <Compile Include="D:\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.Logging\obj\Debug\GeneratedInternalTypeHelper.g.cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml
index e2dd7c5a9..1ea8d2a74 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineView.xaml
@@ -88,6 +88,17 @@
<materialDesign:PackIcon Kind="Minus" Width="24" Height="24"></materialDesign:PackIcon>
</Button>
+ <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="8" TextElement.FontSize="9">
+ <TextBlock HorizontalAlignment="Center">1</TextBlock>
+ <TextBlock HorizontalAlignment="Center">2</TextBlock>
+ <TextBlock HorizontalAlignment="Center">3</TextBlock>
+ <TextBlock HorizontalAlignment="Center">4</TextBlock>
+ <TextBlock HorizontalAlignment="Center">5</TextBlock>
+ <TextBlock HorizontalAlignment="Center">6</TextBlock>
+ <TextBlock HorizontalAlignment="Center">7</TextBlock>
+ <TextBlock HorizontalAlignment="Center">8</TextBlock>
+ </UniformGrid>
+
<Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420">
<ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemContainerStyle>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
index e12f85cdf..e25a64c5e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml
@@ -158,6 +158,16 @@
<materialDesign:PackIcon Kind="Minus" Width="24" Height="24"></materialDesign:PackIcon>
</Button>
+ <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" Rows="1" Columns="8" TextElement.FontSize="9">
+ <TextBlock HorizontalAlignment="Center">1</TextBlock>
+ <TextBlock HorizontalAlignment="Center">2</TextBlock>
+ <TextBlock HorizontalAlignment="Center">3</TextBlock>
+ <TextBlock HorizontalAlignment="Center">4</TextBlock>
+ <TextBlock HorizontalAlignment="Center">5</TextBlock>
+ <TextBlock HorizontalAlignment="Center">6</TextBlock>
+ <TextBlock HorizontalAlignment="Center">7</TextBlock>
+ <TextBlock HorizontalAlignment="Center">8</TextBlock>
+ </UniformGrid>
<Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420">
<ListBox ItemsSource="{Binding Configuration.IdsPacks}" SelectedItem="{Binding SelectedIds}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemContainerStyle>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
new file mode 100644
index 000000000..bd3d48f6d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.config
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ </configSections>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <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>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs
new file mode 100644
index 000000000..7431f1ef1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Contracts/IMainView.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.Contracts
+{
+ public enum RmlNavigationView
+ {
+ RmlsView,
+ RmlView,
+ }
+
+ public interface IMainView : IView
+ {
+ void NavigateTo(RmlNavigationView view);
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg
new file mode 100644
index 000000000..7999c88fd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/rml-module.jpg
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png
new file mode 100644
index 000000000..36533fbeb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/thread_128px.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
new file mode 100644
index 000000000..86eb0b335
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..062f0ace5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/AssemblyInfo.cs
@@ -0,0 +1,19 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+[assembly: AssemblyTitle("Tango - Machine Studio RML Module")]
+[assembly: AssemblyVersion("2.0.11.1737")]
+
+[assembly: ComVisible(false)]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..fb62b4ba4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.RML.Properties {
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if ((resourceMan == null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.RML.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..30784c8b0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.RML.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs
new file mode 100644
index 000000000..fdd8cb124
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/RMLModule.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media.Imaging;
+using Tango.BL.Enumerations;
+using Tango.MachineStudio.RML.Views;
+using Tango.MachineStudio.Common;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.ColorLab
+{
+ [StudioModule(7)]
+ public class RMLModule : StudioModuleBase
+ {
+ public override string Name
+ {
+ get
+ {
+ return "RML";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Create and manage twine's recommended media list (RML). Configure RML's default calibration data and process parameters";
+ }
+ }
+
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/rml-module.jpg");
+ }
+ }
+
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunColorLabModule;
+ }
+ }
+
+ public override void Dispose()
+ {
+
+ }
+ }
+}
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
new file mode 100644
index 000000000..99b0a3c19
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{D0186AC0-0FCF-4D3B-9619-54812B6E524B}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.RML</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.RML</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
+ <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignColors, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="Contracts\IMainView.cs" />
+ <Compile Include="RMLModule.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\RmlsView.xaml.cs">
+ <DependentUpon>RmlsView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\RmlView.xaml.cs">
+ <DependentUpon>RmlView.xaml</DependentUpon>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.CSV\Tango.CSV.csproj">
+ <Project>{58e8825f-0c96-449c-b320-1e82b0aa876b}</Project>
+ <Name>Tango.CSV</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Documents\Tango.Documents.csproj">
+ <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project>
+ <Name>Tango.Documents</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj">
+ <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
+ <Name>Tango.DragAndDrop</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj">
+ <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project>
+ <Name>Tango.Settings</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Tango.MachineStudio.ColorLab\Tango.MachineStudio.ColorLab.csproj">
+ <Project>{4d183aca-552b-4135-ae81-7c5a8e5fc3b1}</Project>
+ <Name>Tango.MachineStudio.ColorLab</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\rml-module.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\RmlsView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\RmlView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\threads.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\thread_128px.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs
new file mode 100644
index 000000000..9c2bf2c6b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModelLocator.cs
@@ -0,0 +1,29 @@
+using Tango.Core.DI;
+using Tango.MachineStudio.RML.ViewModels;
+using Tango.MachineStudio.RML.Views;
+
+namespace Tango.MachineStudio.RML
+{
+ /// <summary>
+ /// This class contains static references to all the view models in the
+ /// application and provides an entry point for the bindings.
+ /// </summary>
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<MainViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..b7e7859ac
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -0,0 +1,325 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.BL;
+using Tango.BL.Builders;
+using Tango.BL.Entities;
+using Tango.Core.Commands;
+using Tango.MachineStudio.ColorLab.ViewModels;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.RML.Contracts;
+
+namespace Tango.MachineStudio.RML.ViewModels
+{
+ public class MainViewVM : StudioViewModel<IMainView>
+ {
+ private INotificationProvider _notification;
+
+ private ObservablesContext _rmls_context;
+ private ObservablesContext _active_context;
+
+ private ObservableCollection<Rml> _rmls;
+ public ObservableCollection<Rml> Rmls
+ {
+ get { return _rmls; }
+ set { _rmls = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaMaterial> _materials;
+ public ObservableCollection<MediaMaterial> Materials
+ {
+ get { return _materials; }
+ set { _materials = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaColor> _colors;
+ public ObservableCollection<MediaColor> Colors
+ {
+ get { return _colors; }
+ set { _colors = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaPurpos> _purposes;
+ public ObservableCollection<MediaPurpos> Purposes
+ {
+ get { return _purposes; }
+ set { _purposes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<MediaCondition> _conditions;
+ public ObservableCollection<MediaCondition> Conditions
+ {
+ get { return _conditions; }
+ set { _conditions = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<LinearMassDensityUnit> _linearMassDensityUnits;
+ public ObservableCollection<LinearMassDensityUnit> LinearMassDensityUnits
+ {
+ get { return _linearMassDensityUnits; }
+ set { _linearMassDensityUnits = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<FiberShape> _fiberShapes;
+ public ObservableCollection<FiberShape> FiberShapes
+ {
+ get { return _fiberShapes; }
+ set { _fiberShapes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<FiberSynth> _fiberSynths;
+ public ObservableCollection<FiberSynth> FiberSynths
+ {
+ get { return _fiberSynths; }
+ set { _fiberSynths = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Rml _selectedRML;
+ public Rml SelectedRML
+ {
+ get { return _selectedRML; }
+ set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private Rml _activeRML;
+ public Rml ActiveRML
+ {
+ get { return _activeRML; }
+ set { _activeRML = value; RaisePropertyChangedAuto(); }
+ }
+
+ private CalibrationDataViewVM _calibrationDataViewVM;
+ public CalibrationDataViewVM CalibrationDataViewVM
+ {
+ get { return _calibrationDataViewVM; }
+ set { _calibrationDataViewVM = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ObservableCollection<LiquidTypesRml> _liquidTypesRmls;
+ public ObservableCollection<LiquidTypesRml> LiquidTypesRmls
+ {
+ get { return _liquidTypesRmls; }
+ set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ProcessParametersTablesGroup _activeProcessParametersGroup;
+ public ProcessParametersTablesGroup ActiveProcessParametersGroup
+ {
+ get { return _activeProcessParametersGroup; }
+ set { _activeProcessParametersGroup = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ICollectionView _activeProcessParametersTableView;
+ public ICollectionView ActiveProcessParametersTableView
+ {
+ get { return _activeProcessParametersTableView; }
+ set { _activeProcessParametersTableView = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ /// <summary>
+ /// Gets or sets the manage RML command.
+ /// </summary>
+ public RelayCommand ManageRmlCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the add RML command.
+ /// </summary>
+ public RelayCommand AddRmlCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the remove RML command.
+ /// </summary>
+ public RelayCommand RemoveRmlCommand { get; set; }
+
+ public RelayCommand AddProcessParametersTableCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the back to RMLS command.
+ /// </summary>
+ public RelayCommand BackToRmlsCommand { get; set; }
+
+ public MainViewVM(INotificationProvider notificationProvider)
+ {
+ _notification = notificationProvider;
+ ManageRmlCommand = new RelayCommand(() => LoadActiveRML(SelectedRML.Guid), () => SelectedRML != null);
+ RemoveRmlCommand = new RelayCommand(RemoveSelectedRml);
+ AddRmlCommand = new RelayCommand(AddNewRml);
+ BackToRmlsCommand = new RelayCommand(BackToRmls);
+ AddProcessParametersTableCommand = new RelayCommand(AddProcessParametersTable);
+ }
+
+ public override void OnApplicationReady()
+ {
+ LoadRmls();
+ }
+
+ private async void LoadRmls()
+ {
+ using (_rmls_context = ObservablesContext.CreateDefault())
+ {
+ await Task.Factory.StartNew(() =>
+ {
+ Rmls = _rmls_context.Rmls.ToList().ToObservableCollection();
+ });
+ }
+ }
+
+ private async void LoadActiveRML(String guid)
+ {
+ using (_notification.PushTaskItem("Loading RML..."))
+ {
+ IsFree = false;
+
+ if (_active_context != null)
+ {
+ _active_context.Dispose();
+ }
+
+ _active_context = ObservablesContext.CreateDefault();
+
+ LoadRmlProperties();
+
+ ActiveRML = await new RmlBuilder(_active_context)
+ .Set(guid)
+ .WithActiveParametersGroup()
+ .WithLiquidFactors()
+ .WithMediaProperties()
+ .BuildAsync();
+
+ ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault();
+ ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables);
+ ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending));
+
+ CalibrationDataViewVM = new CalibrationDataViewVM();
+ LiquidTypesRmls = ActiveRML.LiquidTypesRmls;
+
+ foreach (var liquidTypeRml in LiquidTypesRmls)
+ {
+ CalibrationDataVM catVM = new CalibrationDataVM();
+ catVM.Name = liquidTypeRml.LiquidType.Name;
+ catVM.Color = liquidTypeRml.LiquidType.Color;
+
+ if (liquidTypeRml.DefaultCatData != null)
+ {
+ catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection();
+ }
+
+ CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM);
+ }
+
+
+ View.NavigateTo(RmlNavigationView.RmlView);
+
+ IsFree = true;
+ }
+ }
+
+ private void LoadRmlProperties()
+ {
+ Materials = _active_context.MediaMaterials.ToObservableCollection();
+ Colors = _active_context.MediaColors.ToObservableCollection();
+ Purposes = _active_context.MediaPurposes.ToObservableCollection();
+ Conditions = _active_context.MediaConditions.ToObservableCollection();
+ LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection();
+ FiberShapes = _active_context.FiberShapes.ToObservableCollection();
+ FiberSynths = _active_context.FiberSynths.ToObservableCollection();
+ }
+
+ private async void AddNewRml()
+ {
+ var name = _notification.ShowTextInput("Please enter RML name", "Name");
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ if (Rmls.ToList().Exists(x => x.Name == name))
+ {
+ _notification.ShowError("The specified RML name already exists. Please select a different name.");
+ return;
+ }
+
+ using (_notification.PushTaskItem("Creating new RML..."))
+ {
+ IsFree = false;
+
+ if (_active_context != null)
+ {
+ _active_context.Dispose();
+ }
+
+ LoadRmlProperties();
+
+ Rml rml = new Rml();
+ rml.Name = name;
+ rml.Manufacturer = "Twine";
+ rml.Code = Rmls.Max(x => x.Code) + 1;
+ rml.MediaMaterial = Materials.FirstOrDefault();
+ rml.MediaColor = Colors.FirstOrDefault();
+ rml.MediaPurpose = Purposes.FirstOrDefault();
+ rml.MediaCondition = Conditions.FirstOrDefault();
+ rml.LinearMassDensityUnit = LinearMassDensityUnits.FirstOrDefault();
+ rml.FiberShape = FiberShapes.FirstOrDefault();
+ rml.FiberSynth = FiberSynths.FirstOrDefault();
+ _active_context.Rmls.Add(rml);
+ await _active_context.SaveChangesAsync();
+ LoadActiveRML(rml.Guid);
+
+ IsFree = true;
+ }
+ }
+ }
+
+ private void RemoveSelectedRml()
+ {
+
+ }
+
+ private void AddProcessParametersTable()
+ {
+ var name = _notification.ShowTextInput("Enter table name", "Name");
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ _active_context.ProcessParametersTables.Add(new ProcessParametersTable()
+ {
+ ProcessParametersTablesGroup = ActiveProcessParametersGroup,
+ Name = name,
+ TableIndex = ActiveProcessParametersGroup.ProcessParametersTables.Max(x => x.TableIndex) + 1,
+ });
+ }
+ }
+
+ public void OnProcessParametersTableDropped(ProcessParametersTable dragged, ProcessParametersTable dropped)
+ {
+ if (dragged.TableIndex > dropped.TableIndex)
+ {
+ dragged.TableIndex = dropped.TableIndex - 1;
+ }
+ else
+ {
+ dragged.TableIndex = dropped.TableIndex + 1;
+ }
+
+ int index = 0;
+
+ foreach (var table in ActiveProcessParametersGroup.ProcessParametersTables.OrderBy(x => x.TableIndex))
+ {
+ table.TableIndex = index++;
+ }
+
+ ActiveProcessParametersTableView.Refresh();
+ }
+
+ private void BackToRmls()
+ {
+ View.NavigateTo(RmlNavigationView.RmlsView);
+ LoadRmls();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
new file mode 100644
index 000000000..ab5207722
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
@@ -0,0 +1,18 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.MainView"
+ 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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ <Grid>
+ <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
+ <local:RmlsView />
+ <local:RmlView/>
+ </controls:NavigationControl>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs
new file mode 100644
index 000000000..20ff4c076
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Core.DI;
+using Tango.MachineStudio.RML.Contracts;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl, IMainView
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ TangoIOC.Default.Register<IMainView>(this);
+ }
+
+ public void NavigateTo(RmlNavigationView view)
+ {
+ navigationControl.NavigateTo(view.ToString());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
new file mode 100644
index 000000000..e77663de4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -0,0 +1,286 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.RmlView"
+ 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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
+ xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorLabViews="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ </UserControl.Resources>
+
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal">
+ <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToRmlsCommand}">
+ <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="#202020" ToolTip="Back to RML list" />
+ </Button>
+ <TextBlock Text="{Binding ActiveRML.Name}" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34"></TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid DockPanel.Dock="Bottom">
+
+ </Grid>
+
+ <Grid Margin="0 20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="78*" MinWidth="100" />
+ <ColumnDefinition Width="5"/>
+ <ColumnDefinition Width="357*" MinWidth="400" />
+ </Grid.ColumnDefinitions>
+ <Grid>
+ <materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch">
+ <Grid>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">PROPERTIES</TextBlock>
+ <controls:TableGrid RowHeight="35" Margin="20 0">
+ <TextBlock Text="Name:" ></TextBlock>
+ <TextBox Text="{Binding ActiveRML.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+
+ <TextBlock Text="Manufacturer:" ></TextBlock>
+ <TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox>
+
+ <TextBlock Text="Material:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Materials}" SelectedItem="{Binding ActiveRML.MediaMaterial,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Color:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Colors}" SelectedItem="{Binding ActiveRML.MediaColor,Mode=TwoWay}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Rectangle Width="16" Height="16" VerticalAlignment="Center">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ </StackPanel>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+
+ <TextBlock Text="Purpose:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Purposes}" SelectedItem="{Binding ActiveRML.MediaPurpose,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Condition:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Conditions}" SelectedItem="{Binding ActiveRML.MediaCondition,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Linear Mass Density Unit:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding LinearMassDensityUnits}" SelectedItem="{Binding ActiveRML.LinearMassDensityUnit,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Shape:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding FiberShapes}" SelectedItem="{Binding ActiveRML.FiberShape,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Syntheses:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding FiberSynths}" SelectedItem="{Binding ActiveRML.FiberSynth,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
+
+ <TextBlock Text="Fiber Size:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.FiberSize,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Fibers Count:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.NumberOfFibers,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Plies Per Fiber:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.PliesPerFiber,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Plies Per Thread:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.PliesPerThread,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Tensile Strength:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.TensileStrength,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Elongation Break Percentage:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.ElongationAtBreakPercentage,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Estimated Thread Diameter:" ></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ActiveRML.EstimatedThreadDiameter,Mode=TwoWay}"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Twisted:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Twisted}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+
+ <TextBlock Text="Air Entanglement:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.AirEntanglement}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+
+ <TextBlock Text="Lubricant:" ></TextBlock>
+ <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ActiveRML.Lubricant}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
+ </controls:TableGrid>
+ </DockPanel>
+ </Grid>
+ </materialDesign:Card>
+ </Grid>
+
+ <GridSplitter Grid.Column="1" HorizontalAlignment="Center" Width="5" VerticalAlignment="Stretch" />
+
+ <Grid Grid.Column="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="416*"/>
+ <RowDefinition Height="490"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
+ <Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <Grid>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 20">
+ <ItemsControl ItemsSource="{Binding ActiveProcessParametersTableView}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <Button DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" VerticalAlignment="Bottom" ToolTip="Remove table" Width="30" Margin="10 0 0 10">
+ <materialDesign:PackIcon Kind="Delete" Width="24" Height="24" Foreground="#FF7D7D" />
+ </Button>
+
+ <Grid Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessTableDropped">
+ <Border Padding="5" BorderThickness="1" Margin="20 5 0 5" BorderBrush="#101010" Background="#B9FFFFFF">
+ <Grid>
+ <DockPanel Width="300">
+ <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
+
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="5">
+ <editors:ParameterizedEditor ParameterizedObject="{Binding}">
+ <editors:ParameterizedEditor.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel IsItemsHost="True" />
+ </ItemsPanelTemplate>
+ </editors:ParameterizedEditor.ItemsPanel>
+ <editors:ParameterizedEditor.DoubleTemplate>
+ <DataTemplate>
+ <DockPanel>
+ <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
+ <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
+ </DockPanel>
+ </DataTemplate>
+ </editors:ParameterizedEditor.DoubleTemplate>
+ </editors:ParameterizedEditor>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Border>
+
+ <dragAndDrop:DragThumb Background="Transparent" Cursor="SizeAll" ToolTip="Drag and drop" Margin="0 3 -1 0" HorizontalAlignment="Right" VerticalAlignment="Top">
+ <materialDesign:PackIcon HorizontalAlignment="Right" VerticalAlignment="Top" IsHitTestVisible="False" Kind="Drag" Width="32" Height="32" Background="Transparent" />
+ </dragAndDrop:DragThumb>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
+ <dragAndDrop:DraggingSurface x:Name="draggingSurface" />
+ </Grid>
+ </DockPanel>
+ </Grid>
+
+
+ <Grid Grid.Row="1">
+
+ <DockPanel>
+
+ <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="120"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <Grid Margin="0 0 0 0">
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">LIQUID FACTORS</TextBlock>
+
+ <Button ToolTip="Add new liquid factor" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" VerticalAlignment="Bottom" Width="30" Padding="0">
+ <materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
+ </Button>
+ </Grid>
+ </Border>
+ <ItemsControl ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid IsItemsHost="True" Rows="1"></UniformGrid>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
+ <Grid Margin="20 0 20 0">
+
+ <Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Delete liquid factor" Width="30">
+ <materialDesign:PackIcon Kind="Delete" Foreground="#FF7D7D" />
+ </Button>
+
+ <StackPanel Margin="0 0 10 0">
+ <TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="DimGray" Text="{Binding LiquidType.Name}"></TextBlock>
+ <Grid Width="58" Height="48" Margin="0 5 0 0">
+ <shapes:Hexagon StrokeThickness="1" Stroke="Gray">
+ <shapes:Hexagon.Fill>
+ <LinearGradientBrush Opacity="0.7" >
+ <GradientStop Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
+ <GradientStop Color="White" Offset="1"/>
+ </LinearGradientBrush>
+ </shapes:Hexagon.Fill>
+ </shapes:Hexagon>
+
+ <TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontStyle="Italic"></TextBox>
+ </Grid>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </DockPanel>
+ </Grid>
+
+ <Grid Grid.Row="2">
+ <DockPanel>
+
+ <Border DockPanel.Dock="Top" Background="#E9FFFFFF" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">CALIBRATION DATA</TextBlock>
+ </Border>
+
+ <colorLabViews:CalibrationDataView Margin="0 10 0 0" DataContext="{Binding CalibrationDataViewVM}" />
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
+ </Grid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
new file mode 100644
index 000000000..c1bc9ad4a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.BL.Entities;
+using Tango.DragAndDrop;
+using Tango.MachineStudio.RML.ViewModels;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for RmlView.xaml
+ /// </summary>
+ public partial class RmlView : UserControl
+ {
+ private MainViewVM _vm;
+
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(RmlView), new PropertyMetadata(null));
+
+
+ public RmlView()
+ {
+ InitializeComponent();
+ DraggingSurface = draggingSurface;
+ Loaded += (_, __) => { _vm = DataContext as MainViewVM; };
+ }
+
+ private void OnProcessTableDropped(object sender, DropEventArgs e)
+ {
+ ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable;
+ ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable;
+ _vm.OnProcessParametersTableDropped(dragged, dropped);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
new file mode 100644
index 000000000..b597c1dd2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
@@ -0,0 +1,65 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.RmlsView"
+ 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:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel Margin="100" MaxWidth="1200">
+ <Grid DockPanel.Dock="Top">
+ <Image Source="../Images/threads.png" Width="300" Margin="10" />
+ </Grid>
+ <Grid DockPanel.Dock="Bottom">
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveRmlCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddRmlCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">NEW RML</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button Margin="50 0 0 0" MinWidth="200" Height="60" Command="{Binding ManageRmlCommand}">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock FontSize="18" VerticalAlignment="Center">MANAGE</TextBlock>
+ <materialDesign:PackIcon Margin="5 0 0 0" Kind="ChevronRight" Width="30" Height="30" />
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ </Grid>
+ <Grid>
+ <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="NAME" Binding="{Binding Name}" Width="1*" />
+ <DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="1*" />
+ <DataGridTextColumn Header="MANUFACTURER" Binding="{Binding Manufacturer}" Width="1*" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs
new file mode 100644
index 000000000..66f52d8c8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for RmlsView.xaml
+ /// </summary>
+ public partial class RmlsView : UserControl
+ {
+ public RmlsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config
new file mode 100644
index 000000000..d8e0c7e97
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="EntityFramework" version="6.0.0" targetFramework="net472" />
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net472" />
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net472" />
+ <package id="MaterialDesignColors" version="1.1.2" targetFramework="net472" />
+ <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net472" />
+</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/SecondsToTimeSpanConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/SecondsToTimeSpanConverter.cs
new file mode 100644
index 000000000..8098c6751
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/SecondsToTimeSpanConverter.cs
@@ -0,0 +1,23 @@
+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 SecondsToTimeSpanConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return TimeSpan.FromSeconds(System.Convert.ToDouble(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/BlowerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml
index e06d1f559..e5545ca61 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml
@@ -2,13 +2,15 @@
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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
- mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:BlowerItem, IsDesignTimeCreatable=False}" Height="99.188" Width="163.459">
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:BlowerItem, IsDesignTimeCreatable=False}" Height="101.188" Width="352.459">
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
@@ -29,7 +31,65 @@
<!--Content-->
<Grid>
- <Image Source="../Images/blower-big.png"></Image>
+ <Viewbox Stretch="Uniform">
+ <Border Width="352" Height="101" Background="#151515" CornerRadius="5" BorderThickness="1" BorderBrush="#434343" Padding="5">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="25"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <TextBlock FontFamily="digital-7" Text="Blower Controller" FontSize="16" Foreground="#7CC924" HorizontalAlignment="Left" Width="123"></TextBlock>
+
+ <Grid Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="19*"/>
+ <ColumnDefinition Width="39*"/>
+ <ColumnDefinition Width="27*"/>
+ </Grid.ColumnDefinitions>
+
+ <visuals:AnalogSwitch HorizontalAlignment="Left" Cursor="Hand" RenderTransformOrigin="0.5,0.5" IsChecked="{Binding IsActive,Mode=TwoWay}">
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="PreviewMouseUp">
+ <i:InvokeCommandAction Command="{Binding ToggleActiveCommand}"></i:InvokeCommandAction>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </visuals:AnalogSwitch>
+
+ <Border Background="#202020" Margin="8" CornerRadius="3" Padding="5" Grid.Column="1">
+ <Grid>
+ <mahapps:NumericUpDown Style="{x:Null}" InterceptMouseWheel="True" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HasDecimals="True" Minimum="0" Maximum="10000" Padding="0" Value="{Binding HardwareBlower.Voltage,FallbackValue='0.0',Mode=TwoWay}" VerticalAlignment="Center" FontSize="44" FontFamily="digital-7" Foreground="#FFD400" Margin="0 0 16 0">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox">
+
+ </Style>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ <TextBlock ToolTip="Setting Value" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="9" Foreground="Gainsboro">MV</TextBlock>
+ </Grid>
+ </Border>
+
+ <Button Style="{x:Null}" Grid.Column="2" Margin="8" Cursor="Hand" Command="{Binding SetCommand}">
+ <Button.Template>
+ <ControlTemplate TargetType="Button">
+ <Grid Background="#404040">
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="16" FontWeight="SemiBold">SET</TextBlock>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsPressed" Value="True">
+ <Setter Property="Opacity" Value="0.7"></Setter>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </Grid>
+ </Grid>
+ </Border>
+ </Viewbox>
<Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
<TextBlock Text="{Binding HardwareBlowerType.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml
index de604625d..999c03e78 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ControllerElementEditor.xaml
@@ -8,8 +8,9 @@
xmlns:gauge="clr-namespace:Tango.CircularGauge;assembly=Tango.CircularGauge"
xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
- mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}" Height="245.074" Width="321.75">
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:ControllerItem, IsDesignTimeCreatable=False}" Height="245.074" Width="500.75">
<UserControl.Resources>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
@@ -30,15 +31,17 @@
<!--Content-->
<Grid ClipToBounds="False">
<Border>
- <Viewbox>
+ <Viewbox Stretch="Uniform">
<Grid>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="100" />
+ <ColumnDefinition Width="269*" />
+ <ColumnDefinition Width="240"/>
+ <ColumnDefinition Width="90" />
</Grid.ColumnDefinitions>
<Grid>
- <gauge:CircularGaugeControl
+ <Viewbox>
+ <gauge:CircularGaugeControl
Margin="10"
Radius="150"
ScaleRadius="110"
@@ -73,20 +76,62 @@
DialTextColor="Black"
>
- </gauge:CircularGaugeControl>
+ </gauge:CircularGaugeControl>
+ </Viewbox>
</Grid>
+ <Grid Grid.Column="1" Margin="10 15">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="64*"/>
+ <RowDefinition Height="70*"/>
+ <RowDefinition Height="90*"/>
+ </Grid.RowDefinitions>
+ <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5">
+ <Grid>
+ <TextBlock Text="{Binding EffectiveValue,StringFormat=0.0,FallbackValue='0.0'}" Foreground="#FF6F78" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="44" FontFamily="digital-7" Margin="0 0 12 0">
+
+ </TextBlock>
+ <TextBlock HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="9" Foreground="Gainsboro">PV</TextBlock>
+ </Grid>
+ </Border>
+
+ <Border Background="#202020" Grid.Row="1" Margin="0 10 0 0" CornerRadius="3" Padding="5">
+ <Grid>
+ <mahapps:NumericUpDown Style="{x:Null}" InterceptMouseWheel="True" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" StringFormat="0.0" HasDecimals="True" Minimum="{Binding ElementName=fader,Path=Minimum}" Maximum="{Binding ElementName=fader,Path=Maximum}" Padding="0" Value="{Binding Value,Mode=TwoWay,StringFormat=0.0,FallbackValue=0.0}" VerticalAlignment="Center" FontSize="44" FontFamily="digital-7" Foreground="#FFD400" Margin="0 0 12 0">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox">
+
+ </Style>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ <TextBlock HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="9" Foreground="Gainsboro">SV</TextBlock>
+ </Grid>
+ </Border>
+
+ <Button Style="{x:Null}" Grid.Row="2" VerticalAlignment="Bottom" Height="60" Cursor="Hand" Command="{Binding SetCommand}">
+ <Button.Template>
+ <ControlTemplate TargetType="Button">
+ <Grid Background="#404040">
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="16" FontWeight="SemiBold">SET</TextBlock>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsPressed" Value="True">
+ <Setter Property="Opacity" Value="0.7"></Setter>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </Grid>
- <Grid Grid.Column="1" HorizontalAlignment="Right">
- <visuals:Fader x:Name="fader" FaderLightBrush="DodgerBlue" Margin="10" Minimum="{Binding TechController.Min}" Maximum="{Binding TechController.Max}" Value="{Binding Value,Delay=500}">
-
- </visuals:Fader>
- <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" FontFamily="../Fonts/#digital-7" TextAlignment="Right" Margin="-80 10 0 0" FontSize="30" Text="{Binding ElementName=fader,Path=Value,StringFormat=0.0,FallbackValue=100}">
- <TextBlock.Foreground>
- <SolidColorBrush Color="{Binding Color,FallbackValue=White}" />
- </TextBlock.Foreground>
- </TextBlock>
+ <Grid Grid.Column="2" HorizontalAlignment="Right">
+ <visuals:Fader x:Name="fader" FaderLightBrush="DodgerBlue" Margin="10" Minimum="{Binding TechController.Min}" Maximum="{Binding TechController.Max}" Value="{Binding Value,Mode=TwoWay}">
+
+ </visuals:Fader>
</Grid>
</Grid>
</Viewbox>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml
index 1fa1c6c48..630dddec7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DispenserElementEditor.xaml
@@ -32,7 +32,7 @@
<Grid x:Key="gridDefault">
<Viewbox Stretch="Fill">
- <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
+ <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
</Viewbox>
<Button Click="OnHomingStarted" Style="{StaticResource emptyButton}" Cursor="Hand" Background="Transparent" BorderThickness="0"></Button>
@@ -45,205 +45,106 @@
<Grid>
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="100*"/>
- <ColumnDefinition Width="20*"/>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="100*" />
- <RowDefinition Height="30*" />
- </Grid.RowDefinitions>
+ <Viewbox Stretch="Uniform">
+ <Grid Margin="5" Width="400" Height="280">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="20*"/>
+ <ColumnDefinition Width="100*"/>
+ <ColumnDefinition Width="20*"/>
+ </Grid.ColumnDefinitions>
- <Grid Grid.Column="1">
- <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5">
- <Border.Background>
- <ImageBrush ImageSource="../Images/black-screen.jpg" Opacity="0.1" />
- </Border.Background>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100*" />
+ <RowDefinition Height="30*" />
+ </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="63*"/>
- <ColumnDefinition Width="88*"/>
- </Grid.ColumnDefinitions>
- <Image Source="../Images/dispenser-line.png" Grid.ColumnSpan="2" Stretch="Fill"></Image>
+ <Grid Grid.Column="1">
+ <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5" Background="#252525">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="63*"/>
+ <ColumnDefinition Width="88*"/>
+ </Grid.ColumnDefinitions>
+ <Image Source="../Images/dispenser-line.png" Grid.ColumnSpan="2" Stretch="Fill"></Image>
- <Path RenderTransformOrigin="0.5,0.5" Margin="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Data="M728.4 312.2l-198.1-63.4c-0.5-5.9-1.6-11.6-3.4-17c8.4-2.8 17-5.9 25.7-9.2c78.8-29.7 124.3-63 135-98.8 c7.2-23.8-0.5-47.5-22.6-70.3c-17.5-18-56.2-44.9-57.8-46c-6.2-4.3-14.7-2.8-19.1 3.3L465.5 180.8c-3.2-0.4-6.4-0.6-9.6-0.6 c-2.2 0-4.5 0.1-6.7 0.3c-0.5-62.6-8.3-142.4-41.1-178.6c-12.7-14.1-28.3-21.2-46.1-21.2c0 0 0 0 0 0c-12.3 0-25.6 3.5-39.7 10.4 c-17.4 8.6-43.8 27.5-55.6 36.2c-3.5 2.6-5.7 4.2-6.1 4.5c-3.7 2.8-5.6 7.2-5.4 11.6c0.1 2.6 1 5.3 2.7 7.5l128.9 175.8 c-1.4 3.5-2.6 7.1-3.4 10.8c-42.1-13.7-94.9-27.4-138.4-27.4c-34.2 0-59.1 8.6-73.8 25.7c-13 15-17.7 35.8-14 61.7 c3.6 24.8 19.1 69.3 19.7 71.2c2 5.7 7.3 9.3 13 9.3c1.4 0 2.9-0.2 4.3-0.7L404 308.3c2.3 2.3 4.8 4.4 7.4 6.3 c-7.3 10-14.8 20.7-22.3 32c-46.3 70.4-63.5 124-51.1 159.3c8.2 23.5 28.3 38.2 59.6 43.6c16.2 2.8 41.8 3.4 60.4 3.4 c8.1 0 13.5-0.1 13.5-0.1c7.5-0.2 13.5-6.3 13.5-13.9L484 323.8c4.1-1.7 8.1-3.7 11.8-6.1c6.1 8.3 12.6 16.9 19.5 25.6 c52.2 65.4 97.5 98.6 134.8 98.6c17.6 0 42.4-7.5 61.3-43.3c11.7-22.2 25.4-67.3 25.9-69.2C739.5 322.2 735.5 314.5 728.4 312.2z M455.9 293c-21.1 0-38.3-17.1-38.3-38.3s17.1-38.3 38.3-38.3c21.1 0 38.3 17.1 38.3 38.3C494.2 275.9 477 293 455.9 293z">
- <Path.Fill>
- <LinearGradientBrush>
- <GradientStop Color="Black"/>
- <GradientStop Color="{Binding Color}" Offset="0.8"/>
- </LinearGradientBrush>
- </Path.Fill>
- <Path.RenderTransform>
- <RotateTransform x:Name="propRotate" Angle="0" />
- </Path.RenderTransform>
- </Path>
- <!--<Image RenderTransformOrigin="0.5,0.5" Margin="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Source="../Images/prop.png" RenderOptions.BitmapScalingMode="Fant">
+ <Path RenderTransformOrigin="0.5,0.5" Margin="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Data="M728.4 312.2l-198.1-63.4c-0.5-5.9-1.6-11.6-3.4-17c8.4-2.8 17-5.9 25.7-9.2c78.8-29.7 124.3-63 135-98.8 c7.2-23.8-0.5-47.5-22.6-70.3c-17.5-18-56.2-44.9-57.8-46c-6.2-4.3-14.7-2.8-19.1 3.3L465.5 180.8c-3.2-0.4-6.4-0.6-9.6-0.6 c-2.2 0-4.5 0.1-6.7 0.3c-0.5-62.6-8.3-142.4-41.1-178.6c-12.7-14.1-28.3-21.2-46.1-21.2c0 0 0 0 0 0c-12.3 0-25.6 3.5-39.7 10.4 c-17.4 8.6-43.8 27.5-55.6 36.2c-3.5 2.6-5.7 4.2-6.1 4.5c-3.7 2.8-5.6 7.2-5.4 11.6c0.1 2.6 1 5.3 2.7 7.5l128.9 175.8 c-1.4 3.5-2.6 7.1-3.4 10.8c-42.1-13.7-94.9-27.4-138.4-27.4c-34.2 0-59.1 8.6-73.8 25.7c-13 15-17.7 35.8-14 61.7 c3.6 24.8 19.1 69.3 19.7 71.2c2 5.7 7.3 9.3 13 9.3c1.4 0 2.9-0.2 4.3-0.7L404 308.3c2.3 2.3 4.8 4.4 7.4 6.3 c-7.3 10-14.8 20.7-22.3 32c-46.3 70.4-63.5 124-51.1 159.3c8.2 23.5 28.3 38.2 59.6 43.6c16.2 2.8 41.8 3.4 60.4 3.4 c8.1 0 13.5-0.1 13.5-0.1c7.5-0.2 13.5-6.3 13.5-13.9L484 323.8c4.1-1.7 8.1-3.7 11.8-6.1c6.1 8.3 12.6 16.9 19.5 25.6 c52.2 65.4 97.5 98.6 134.8 98.6c17.6 0 42.4-7.5 61.3-43.3c11.7-22.2 25.4-67.3 25.9-69.2C739.5 322.2 735.5 314.5 728.4 312.2z M455.9 293c-21.1 0-38.3-17.1-38.3-38.3s17.1-38.3 38.3-38.3c21.1 0 38.3 17.1 38.3 38.3C494.2 275.9 477 293 455.9 293z">
+ <Path.Fill>
+ <LinearGradientBrush>
+ <GradientStop Color="Black"/>
+ <GradientStop Color="{Binding Color}" Offset="0.8"/>
+ </LinearGradientBrush>
+ </Path.Fill>
+ <Path.RenderTransform>
+ <RotateTransform x:Name="propRotate" Angle="0" />
+ </Path.RenderTransform>
+ </Path>
+ <!--<Image RenderTransformOrigin="0.5,0.5" Margin="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Source="../Images/prop.png" RenderOptions.BitmapScalingMode="Fant">
<Image.RenderTransform>
<RotateTransform x:Name="propRotate" Angle="0" />
</Image.RenderTransform>
</Image>-->
-
- </Grid>
- </Border>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -40 -80">
- <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="5000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="12" VerticalAlignment="Center" Foreground="Black" Margin="0 -10 0 0"></mahapps:NumericUpDown>
- <visuals:Knob Width="50" Height="50" TicksHighlightBrush="Black" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" />
- </StackPanel>
- </Grid>
-
- <Grid>
- <Border BorderBrush="Gray" Cursor="Hand" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ </Grid>
+ </Border>
+ </Grid>
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
+ <Grid>
+ <Border BorderBrush="Gray" Cursor="Hand" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased" Style="{StaticResource TechWidgetBorderLeft}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
+ </Viewbox>
+ </Border>
+ </Grid>
- <Grid Grid.Column="2">
- <Border BorderBrush="Gray" Cursor="Hand" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="0" />
- <GradientStop Color="#FFEEEEEE" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ <Grid Grid.Column="2">
+ <Border BorderBrush="Gray" Cursor="Hand" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased" Style="{StaticResource TechWidgetBorderRight}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
+ </Viewbox>
+ </Border>
+ </Grid>
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
+ <Grid Grid.Column="1" Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="20*"/>
+ <ColumnDefinition Width="115*"/>
+ <ColumnDefinition Width="20*"/>
+ </Grid.ColumnDefinitions>
- <Grid Grid.Column="1" Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="115*"/>
- <ColumnDefinition Width="20*"/>
- </Grid.ColumnDefinitions>
+ <Grid Grid.Column="1">
+ <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20" Style="{StaticResource TechWidgetBorderCenter}">
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content" Value="{StaticResource gridDefault}">
- <Grid Grid.Column="1">
- <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#979797" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsHoming}" Value="True">
+ <Setter Property="Content" Value="{StaticResource gridHoming}">
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
- <Grid>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content" Value="{StaticResource gridDefault}">
+ </ContentControl>
+ </Grid>
+ </Border>
+ </Grid>
+ </Grid>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsHoming}" Value="True">
- <Setter Property="Content" Value="{StaticResource gridHoming}">
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- </ContentControl>
- </Grid>
- </Border>
- </Grid>
</Grid>
+ </Viewbox>
-
- </Grid>
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -65 5">
+ <Border Background="#202020" CornerRadius="3" Padding="3">
+ <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="5000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="#FF8585" FontFamily="digital-7"></mahapps:NumericUpDown>
+ </Border>
+ <visuals:Knob Width="50" Height="50" TicksHighlightBrush="#FF8585" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" />
+ </StackPanel>
<!--Content-->
<Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml
new file mode 100644
index 000000000..3ffeaaa77
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml
@@ -0,0 +1,236 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.HeaterElementEditor"
+ 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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:HeaterItem, IsDesignTimeCreatable=False}" Height="284.188" Width="243.459">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid>
+
+ <Viewbox>
+ <Border CornerRadius="5" Background="#151515" BorderBrush="#3B3B3B" BorderThickness="1" Padding="15">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="16"/>
+ <RowDefinition Height="74"/>
+ <RowDefinition Height="63"/>
+ <RowDefinition Height="37"/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <TextBlock FontFamily="digital-7" Text="Heater Controller" FontSize="16" Foreground="#7CC924" HorizontalAlignment="Left" Width="123"></TextBlock>
+ <TextBlock HorizontalAlignment="Right" Text="TEMPERATURE" FontSize="9" VerticalAlignment="Bottom" Foreground="Gainsboro" Height="12" Width="58"></TextBlock>
+ </Grid>
+
+ <Grid Grid.Row="1">
+ <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5">
+ <Grid>
+ <TextBlock Text="{Binding HeaterState.CurrentValue,StringFormat=0.0,FallbackValue='0.0'}" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="80" FontFamily="digital-7" Margin="0 0 12 0">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Foreground" Value="#FF6F78"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HeaterState.IsInSetPoint}" Value="True">
+ <Setter Property="Foreground" Value="#7CC924"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ <TextBlock ToolTip="Process Value" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="9" Foreground="Gainsboro">PV</TextBlock>
+ </Grid>
+ </Border>
+ </Grid>
+
+ <Grid Grid.Row="2" Margin="0 5 0 0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="49"/>
+ <ColumnDefinition Width="162"/>
+ </Grid.ColumnDefinitions>
+
+ <Image Source="../Images/temperature.png" Margin="0 10 20 10" RenderOptions.BitmapScalingMode="Fant"></Image>
+
+ <Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5" Grid.Column="1">
+ <Grid>
+ <mahapps:NumericUpDown Style="{x:Null}" InterceptMouseWheel="True" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HorizontalContentAlignment="Right" HideUpDownButtons="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HasDecimals="True" Minimum="0" Maximum="400" Padding="0" Value="{Binding SetPoint,FallbackValue='0.0',Mode=TwoWay}" VerticalAlignment="Center" FontSize="44" FontFamily="digital-7" Foreground="#FFD400" Margin="0 0 12 0">
+ <mahapps:NumericUpDown.Resources>
+ <Style TargetType="TextBox">
+
+ </Style>
+ </mahapps:NumericUpDown.Resources>
+ </mahapps:NumericUpDown>
+ <TextBlock ToolTip="Setting Value" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="9" Foreground="Gainsboro">SV</TextBlock>
+ </Grid>
+ </Border>
+ </Grid>
+
+ <Grid Grid.Row="3" Margin="0 5 0 0">
+ <StackPanel Orientation="Horizontal" TextElement.Foreground="Gray" TextElement.FontSize="9">
+ <StackPanel>
+ <TextBlock>ACTIVE</TextBlock>
+ <Ellipse Width="12" Height="12" Margin="0 4 0 0" Fill="#FF6262" Stroke="#526744">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="Opacity" Value="0.2"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HeaterState.IsActive}" Value="True">
+ <Setter Property="Opacity" Value="1"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ </StackPanel>
+
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock>RAMP UP</TextBlock>
+ <Ellipse Width="12" Height="12" Margin="0 4 0 0" Fill="#FF8608" Stroke="#526744">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="Opacity" Value="0.2"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HeaterState.IsRampingUp}" Value="True">
+ <Setter Property="Opacity" Value="1"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ </StackPanel>
+
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock>IN POINT</TextBlock>
+ <Ellipse Width="12" Height="12" Margin="0 4 0 0" Fill="#00C600" Stroke="#526744">
+ <Ellipse.Style>
+ <Style TargetType="Ellipse">
+ <Setter Property="Opacity" Value="0.2"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding HeaterState.IsInSetPoint}" Value="True">
+ <Setter Property="Opacity" Value="1"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Ellipse.Style>
+ </Ellipse>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="4">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="36"/>
+ <ColumnDefinition Width="175"/>
+ </Grid.ColumnDefinitions>
+
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Gray" FontSize="16" FontWeight="SemiBold">ITC</TextBlock>
+
+ <Grid Grid.Column="1">
+ <Button Style="{x:Null}" Width="60" Height="60" HorizontalAlignment="Right" Cursor="Hand" Command="{Binding SetCommand}">
+ <Button.Template>
+ <ControlTemplate TargetType="Button">
+ <Grid>
+ <Ellipse Stroke="#7C7C7C" Fill="#383838"></Ellipse>
+ <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="16" FontWeight="SemiBold">SET</TextBlock>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsPressed" Value="True">
+ <Setter Property="Opacity" Value="0.7"></Setter>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </Grid>
+ </Grid>
+ </Grid>
+ </Border>
+ </Viewbox>
+
+ <Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
+ <TextBlock Text="{Binding TechHeater.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ </Border>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected)}" Value="True" />
+ <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable}" Value="True" />
+ </MultiDataTrigger.Conditions>
+
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </MultiDataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml.cs
new file mode 100644
index 000000000..37d0defe5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Technician.TechItems;
+using Tango.Core;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class HeaterElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ public HeaterElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public HeaterElementEditor(HeaterItem heaterItem)
+ : this()
+ {
+ HeaterItem = heaterItem;
+ DataContext = HeaterItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public HeaterElementEditor(HeaterItem heaterItem, Rect bounds)
+ : this(heaterItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private HeaterItem _heaterItem;
+ /// <summary>
+ /// Gets or sets the heater item.
+ /// </summary>
+ public HeaterItem HeaterItem
+ {
+ get { return _heaterItem; }
+ set { _heaterItem = value; RaisePropertyChanged(nameof(HeaterItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ var clonedItem = HeaterItem.Clone() as HeaterItem;
+ HeaterElementEditor cloned = new HeaterElementEditor(clonedItem);
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return HeaterItem; }
+ }
+
+ private void Ellipse_GiveFeedback(object sender, GiveFeedbackEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml
new file mode 100644
index 000000000..ce9675103
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml
@@ -0,0 +1,167 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.MonitorRecorderElementEditor"
+ 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:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MonitorRecorderItem, IsDesignTimeCreatable=False}" Height="113.188" Width="365.459">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid>
+ <Viewbox Stretch="Uniform">
+ <Border CornerRadius="5" Background="#151515" BorderThickness="1" BorderBrush="DimGray" Padding="5" Height="113.188" Width="365.459">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="27*"/>
+ <RowDefinition Height="47*"/>
+ <RowDefinition Height="27"/>
+ </Grid.RowDefinitions>
+
+ <TextBlock Text="CSV RECORDER" Foreground="#FF8585" FontFamily="digital-7" FontSize="18" VerticalAlignment="Center" Margin="0,6,0,3" Height="18"></TextBlock>
+
+ <DockPanel Grid.Row="1">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="47*"/>
+ <ColumnDefinition Width="48*"/>
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Orientation="Horizontal">
+ <Button Command="{Binding ToggleRecordingCommand}" IsEnabled="{Binding IsRecording,Converter={StaticResource BooleanInverseConverter}}" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Height="Auto" VerticalAlignment="Center">
+ <materialDesign:PackIcon Kind="Record" Width="48" Height="48" Foreground="#FF6767" />
+ </Button>
+ <Button Command="{Binding TogglePauseCommand}" IsEnabled="{Binding IsRecording}" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Height="Auto" VerticalAlignment="Center">
+ <materialDesign:PackIcon Width="48" Height="48" Foreground="Gainsboro">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Kind" Value="Pause"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsPaused}" Value="True">
+ <Setter Property="Kind" Value="Play"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </Button>
+ <Button Command="{Binding ToggleRecordingCommand}" IsEnabled="{Binding IsRecording}" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" Height="Auto" VerticalAlignment="Center">
+ <materialDesign:PackIcon Kind="Stop" Width="48" Height="48" Foreground="#FFE9A0" />
+ </Button>
+ </StackPanel>
+ </Grid>
+
+ <Grid>
+ <TextBlock HorizontalAlignment="Center" Foreground="#FF6767" VerticalAlignment="Center" FontFamily="digital-7" FontSize="40" Text="{Binding RecordingTime,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00',FallbackValue='00:00:00'}">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Opacity" Value="1"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsRecording}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard Name="blink">
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="Opacity" FillBehavior="Stop">
+ <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="0" />
+ <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="1" />
+ <DiscreteDoubleKeyFrame KeyTime="00:00:1" Value="1" />
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <RemoveStoryboard BeginStoryboardName="blink" />
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </Grid>
+ </DockPanel>
+
+ <TextBlock Grid.Row="2" Foreground="Gray" VerticalAlignment="Center" Height="16" Margin="0,2,0,9">
+ <Run Text="{Binding Monitors.SynchedSource.Count,Mode=OneWay}"></Run>
+ <Run>selected monitors to record</Run>
+ </TextBlock>
+ </Grid>
+ </Border>
+ </Viewbox>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected)}" Value="True" />
+ <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable}" Value="True" />
+ </MultiDataTrigger.Conditions>
+
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </MultiDataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml.cs
new file mode 100644
index 000000000..213fa78e0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.BL.Entities;
+using Tango.MachineStudio.Technician.TechItems;
+using Tango.Core;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class MonitorRecorderElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorRecorderItem"/> class.
+ /// </summary>
+ public MonitorRecorderElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorRecorderItem"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public MonitorRecorderElementEditor(MonitorRecorderItem monitorRecorderItem)
+ : this()
+ {
+ MonitorRecorderItem = monitorRecorderItem;
+ DataContext = MonitorRecorderItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorRecorderItem"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public MonitorRecorderElementEditor(MonitorRecorderItem monitorRecorderItem, Rect bounds)
+ : this(monitorRecorderItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private MonitorRecorderItem _monitorRecorderItem;
+
+ public MonitorRecorderItem MonitorRecorderItem
+ {
+ get { return _monitorRecorderItem; }
+ set { _monitorRecorderItem = value; RaisePropertyChanged(nameof(MonitorRecorderItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ var clonedItem = MonitorRecorderItem.Clone() as MonitorRecorderItem;
+ MonitorRecorderElementEditor cloned = new MonitorRecorderElementEditor(clonedItem);
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return MonitorRecorderItem; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml
index 80bfe8f96..25907fd8f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml
@@ -34,7 +34,7 @@
<Grid x:Key="gridDefault">
<Viewbox Stretch="Fill">
- <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
+ <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
</Viewbox>
<Button Click="OnHomingStarted" Style="{StaticResource emptyButton}" Background="Transparent" BorderThickness="0"></Button>
@@ -47,192 +47,93 @@
<Grid>
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="100*"/>
- <ColumnDefinition Width="20*"/>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="100*" />
- <RowDefinition Height="30*" />
- </Grid.RowDefinitions>
-
- <Grid Grid.Column="1">
- <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5">
- <Border.Background>
- <ImageBrush ImageSource="../Images/black-screen.jpg" Opacity="0.1" />
- </Border.Background>
-
- <Grid>
- <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Margin="10" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z">
- <Path.Fill>
- <LinearGradientBrush>
- <GradientStop Color="Black"/>
- <GradientStop Color="{Binding Color}" Offset="0.8"/>
- </LinearGradientBrush>
- </Path.Fill>
- <Path.RenderTransform>
- <RotateTransform x:Name="propRotate" Angle="0" />
- </Path.RenderTransform>
- </Path>
-
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -40 -80">
- <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="5000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="12" VerticalAlignment="Center" Foreground="Black" Margin="0 -10 0 0"></mahapps:NumericUpDown>
- <visuals:Knob Width="50" Height="50" TicksHighlightBrush="Black" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" />
- </StackPanel>
- </Grid>
- </Border>
- </Grid>
-
- <Grid>
- <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
-
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
-
- <Grid Grid.Column="2">
- <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="0" />
- <GradientStop Color="#FFEEEEEE" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
-
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
-
- <Grid Grid.Column="1" Grid.Row="1" Visibility="{Binding HardwareMotorType.SupportsHoming,Converter={StaticResource BoolToVisibilityConverter}}">
+ <Viewbox Stretch="Uniform">
+ <Grid Margin="5" Width="400" Height="280">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="115*"/>
+ <ColumnDefinition Width="100*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
- <Grid Grid.Column="1">
- <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#979797" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100*" />
+ <RowDefinition Height="30*" />
+ </Grid.RowDefinitions>
- <Grid>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content" Value="{StaticResource gridDefault}">
+ <Grid Grid.Column="1">
+ <Border BorderThickness="1" BorderBrush="#303030" CornerRadius="10" Background="#252525">
+ <Grid Margin="20">
+ <Path RenderTransformOrigin="0.5,0.5" StrokeThickness="1" Stroke="#202020" Stretch="Uniform" Margin="10" Data="M500.633 211.454l-58.729-14.443c-3.53-11.133-8.071-21.929-13.55-32.256c8.818-14.678 27.349-45.571 27.349-45.571 c3.545-5.903 2.607-13.462-2.256-18.325l-42.422-42.422c-4.863-4.878-12.407-5.815-18.325-2.256L347.055 83.53 c-10.269-5.435-21.006-9.932-32.065-13.433l-14.443-58.729C298.876 4.688 292.885 0 286 0h-60 c-6.885 0-12.891 4.688-14.546 11.367c0 0-10.005 40.99-14.429 58.715c-11.792 3.735-23.188 8.584-34.043 14.502l-47.329-28.403 c-5.918-3.516-13.447-2.607-18.325 2.256l-42.422 42.422c-4.863 4.863-5.801 12.422-2.256 18.325l29.268 48.882 c-4.717 9.302-8.672 18.984-11.821 28.901l-58.729 14.487C4.688 213.124 0 219.115 0 226v60c0 6.885 4.688 12.891 11.367 14.546 l58.744 14.443c3.56 11.294 8.188 22.266 13.799 32.798l-26.191 43.652c-3.545 5.903-2.607 13.462 2.256 18.325l42.422 42.422 c4.849 4.849 12.407 5.771 18.325 2.256c0 0 29.37-17.607 43.755-26.221c10.415 5.552 21.313 10.137 32.549 13.696l14.429 58.715 C213.109 507.313 219.115 512 226 512h60c6.885 0 12.876-4.688 14.546-11.367l14.429-58.715 c11.558-3.662 22.69-8.394 33.281-14.136c14.78 8.862 44.443 26.66 44.443 26.66c5.903 3.53 13.462 2.622 18.325-2.256 l42.422-42.422c4.863-4.863 5.801-12.422 2.256-18.325l-26.968-44.927c5.317-10.093 9.727-20.654 13.169-31.523l58.729-14.443 C507.313 298.876 512 292.885 512 286v-60C512 219.115 507.313 213.124 500.633 211.454z M256 361c-57.891 0-105-47.109-105-105 s47.109-105 105-105s105 47.109 105 105S313.891 361 256 361z">
+ <Path.Fill>
+ <LinearGradientBrush>
+ <GradientStop Color="Black"/>
+ <GradientStop Color="{Binding Color}" Offset="0.8"/>
+ </LinearGradientBrush>
+ </Path.Fill>
+ <Path.RenderTransform>
+ <RotateTransform x:Name="propRotate" Angle="0" />
+ </Path.RenderTransform>
+ </Path>
+ </Grid>
+ </Border>
+ </Grid>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsHoming}" Value="True">
- <Setter Property="Content" Value="{StaticResource gridHoming}">
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
+ <Grid>
+ <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased" Style="{StaticResource TechWidgetBorderLeft}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#E6E6E6" />
+ </Viewbox>
+ </Border>
+ </Grid>
- </ContentControl>
- </Grid>
+ <Grid Grid.Column="2">
+ <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased" Style="{StaticResource TechWidgetBorderRight}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
+ </Viewbox>
</Border>
</Grid>
+
+ <Grid Grid.Column="1" Grid.Row="1" Visibility="{Binding HardwareMotorType.SupportsHoming,Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="20*"/>
+ <ColumnDefinition Width="115*"/>
+ <ColumnDefinition Width="20*"/>
+ </Grid.ColumnDefinitions>
+
+ <Grid Grid.Column="1">
+ <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20" Style="{StaticResource TechWidgetBorderCenter}">
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content" Value="{StaticResource gridDefault}">
+
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsHoming}" Value="True">
+ <Setter Property="Content" Value="{StaticResource gridHoming}">
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+
+ </ContentControl>
+ </Grid>
+ </Border>
+ </Grid>
+ </Grid>
+
</Grid>
+ </Viewbox>
- </Grid>
+ <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -65 5">
+ <Border Background="#202020" CornerRadius="3" Padding="3">
+ <mahapps:NumericUpDown BorderThickness="0" Background="Transparent" HideUpDownButtons="True" HasDecimals="False" Minimum="0" Maximum="5000" StringFormat="0" Value="{Binding Speed,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,StringFormat=0,FallbackValue=5000}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" FontSize="22" VerticalAlignment="Center" Foreground="#FF8585" FontFamily="digital-7"></mahapps:NumericUpDown>
+ </Border>
+ <visuals:Knob Width="50" Height="50" TicksHighlightBrush="#FF8585" KnobType="MetroDark" TicksWidth="2" Margin="0 5 0 0" TicksHeight="5" Minimum="0" Maximum="5000" Value="{Binding Speed,Mode=TwoWay}" />
+ </StackPanel>
<!--Content-->
<Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml
index 3adee13d6..ac07f1390 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml
@@ -34,7 +34,7 @@
<Grid x:Key="gridDefault">
<Viewbox Stretch="Fill">
- <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
+ <materialDesign:PackIcon Kind="Home" Margin="25 0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
</Viewbox>
<Button Click="OnHomingStarted" Style="{StaticResource emptyButton}" Background="Transparent" BorderThickness="0"></Button>
@@ -47,178 +47,79 @@
<Grid>
- <Grid Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="100*"/>
- <ColumnDefinition Width="20*"/>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="100*" />
- <RowDefinition Height="30*" />
- </Grid.RowDefinitions>
-
- <Grid Grid.Column="1">
- <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5">
- <Border.Background>
- <ImageBrush ImageSource="../Images/black-screen.jpg" Opacity="0.1" />
- </Border.Background>
-
- <Grid>
- <Image x:Name="image" Margin="5" gif:ImageBehavior.AnimatedSource="../Images/motor-group.gif" RenderOptions.BitmapScalingMode="Fant" gif:ImageBehavior.AutoStart="False" gif:ImageBehavior.AnimateInDesignMode="True" gif:ImageBehavior.RepeatBehavior="Forever"></Image>
- </Grid>
- </Border>
- </Grid>
-
- <Grid>
- <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
-
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
-
- <Grid Grid.Column="2">
- <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="0" />
- <GradientStop Color="#FFEEEEEE" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
-
- <Viewbox Stretch="Fill" Margin="-10 20">
- <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
- </Viewbox>
- </Border>
- </Grid>
-
- <Grid Grid.Column="1" Grid.Row="1">
+ <Viewbox Stretch="Uniform">
+ <Grid Margin="5" Width="400" Height="280">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*"/>
- <ColumnDefinition Width="115*"/>
+ <ColumnDefinition Width="100*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100*" />
+ <RowDefinition Height="30*" />
+ </Grid.RowDefinitions>
+
<Grid Grid.Column="1">
- <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#979797" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5" Background="#252525">
- <Grid>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Content" Value="{StaticResource gridDefault}">
+ <Grid Margin="40">
+ <Image x:Name="image" Margin="5" gif:ImageBehavior.AnimatedSource="../Images/motor-group.gif" RenderOptions.BitmapScalingMode="Fant" gif:ImageBehavior.AutoStart="False" gif:ImageBehavior.AnimateInDesignMode="True" gif:ImageBehavior.RepeatBehavior="Forever"></Image>
+ </Grid>
+ </Border>
+ </Grid>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsHoming}" Value="True">
- <Setter Property="Content" Value="{StaticResource gridHoming}">
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
+ <Grid>
+ <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased" Style="{StaticResource TechWidgetBorderLeft}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
+ </Viewbox>
+ </Border>
+ </Grid>
- </ContentControl>
- </Grid>
+ <Grid Grid.Column="2">
+ <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased" Style="{StaticResource TechWidgetBorderRight}">
+ <Viewbox Stretch="Fill" Margin="-10 20">
+ <materialDesign:PackIcon Kind="ChevronRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
+ </Viewbox>
</Border>
</Grid>
- </Grid>
+ <Grid Grid.Column="1" Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="20*"/>
+ <ColumnDefinition Width="115*"/>
+ <ColumnDefinition Width="20*"/>
+ </Grid.ColumnDefinitions>
- </Grid>
+ <Grid Grid.Column="1">
+ <Border BorderBrush="Gray" BorderThickness="1 0 1 1" CornerRadius="0 0 20 20" Style="{StaticResource TechWidgetBorderCenter}">
+
+ <Grid>
+ <ContentControl>
+ <ContentControl.Style>
+ <Style TargetType="ContentControl">
+ <Setter Property="Content" Value="{StaticResource gridDefault}">
+
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsHoming}" Value="True">
+ <Setter Property="Content" Value="{StaticResource gridHoming}">
+ </Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ContentControl.Style>
+
+ </ContentControl>
+ </Grid>
+ </Border>
+ </Grid>
+ </Grid>
+
+
+ </Grid>
+ </Viewbox>
<!--Content-->
<Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml
index 33b0645ab..2d6c61c5e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml
@@ -28,7 +28,7 @@
<!--Content-->
<Grid>
- <Viewbox Stretch="Fill">
+ <Viewbox Stretch="Uniform">
<TextBox PreviewKeyDown="TextBox_PreviewKeyDown" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Text,UpdateSourceTrigger=PropertyChanged}" CaretBrush="Transparent">
<TextBox.Foreground>
<SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml
index 6e2315dc8..51de5dc95 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ThreadMotionElementEditor.xaml
@@ -56,9 +56,6 @@
<Grid Grid.Column="1">
<Border BorderThickness="1" BorderBrush="Gray" CornerRadius="5">
- <Border.Background>
- <ImageBrush ImageSource="../Images/black-screen.jpg" Opacity="0.1" />
- </Border.Background>
<Grid>
<Image x:Name="image" Margin="5" gif:ImageBehavior.AnimatedSource="../Images/cogs-small.gif" RenderOptions.BitmapScalingMode="Fant" gif:ImageBehavior.AutoStart="False" gif:ImageBehavior.AnimateInDesignMode="True" gif:ImageBehavior.RepeatBehavior="Forever"></Image>
@@ -67,83 +64,19 @@
</Grid>
<Grid>
- <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="1" />
- <GradientStop Color="#FFEEEEEE" Offset="0"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ <Border BorderBrush="Gray" BorderThickness="1 1 0 1" Margin="0 10" CornerRadius="5 0 0 5" PreviewMouseDown="OnBackwardPressed" PreviewMouseUp="OnBackwardReleased" Style="{StaticResource TechWidgetBorderLeft}">
<Viewbox Stretch="Fill" Margin="-5 20">
- <materialDesign:PackIcon Kind="ChevronDoubleLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
+ <materialDesign:PackIcon Kind="ChevronDoubleLeft" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
</Viewbox>
</Border>
</Grid>
<Grid Grid.Column="2">
- <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased">
- <Border.Style>
- <Style TargetType="Border">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="1,0">
- <GradientStop Color="#AAAAAA" Offset="0" />
- <GradientStop Color="#FFEEEEEE" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <EventTrigger RoutedEvent="PreviewMouseDown">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFCECECE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- <EventTrigger RoutedEvent="PreviewMouseUp">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FFEEEEEE" Duration="00:00:0.1" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
+ <Border BorderBrush="Gray" BorderThickness="0 1 1 1" Margin="0 10" CornerRadius="0 10 10 0" PreviewMouseDown="OnForwardPressed" PreviewMouseUp="OnForwardReleased" Style="{StaticResource TechWidgetBorderRight}">
<Viewbox Stretch="Fill" Margin="-5 20">
- <materialDesign:PackIcon Kind="ChevronDoubleRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="#202020" />
+ <materialDesign:PackIcon Kind="ChevronDoubleRight" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" Foreground="Gainsboro" />
</Viewbox>
</Border>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/csv.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/csv.png
new file mode 100644
index 000000000..5f03ac6bd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/csv.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/heater-controller.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/heater-controller.png
new file mode 100644
index 000000000..71d6698ec
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/heater-controller.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/temperature.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/temperature.png
new file mode 100644
index 000000000..0bd30c002
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/temperature.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/MultiTechRecordingData.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/MultiTechRecordingData.cs
index e9471fa74..ad3ea1352 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/MultiTechRecordingData.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/MultiTechRecordingData.cs
@@ -11,11 +11,11 @@ using Tango.MachineStudio.Technician.TechItems;
namespace Tango.MachineStudio.Technician.Models
{
- public class MultiTechRecordingData<T> : TechRecordingData<T, MultiTechRecordingValue> where T : TechItem
+ public class MultiTechRecordingData : TechRecordingData<MultiTechRecordingValue>
{
public int ChannelCount { get; set; }
- public MultiTechRecordingData(T techItem, int channel_count) : base(techItem)
+ public MultiTechRecordingData(String name, int channel_count, String fileName) : base(name, fileName)
{
ChannelCount = channel_count;
Init();
@@ -54,7 +54,7 @@ namespace Tango.MachineStudio.Technician.Models
protected override List<string> GetColumnNames()
{
- return Enumerable.Range(1, ChannelCount).Select(x => TechItem.TechName + " " + x).ToList();
+ return Enumerable.Range(1, ChannelCount).Select(x => Name + " " + x).ToList();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/SingleTechRecordingData.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/SingleTechRecordingData.cs
index 7aa9a2b3f..8b480bbf3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/SingleTechRecordingData.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/SingleTechRecordingData.cs
@@ -7,9 +7,9 @@ using Tango.MachineStudio.Technician.TechItems;
namespace Tango.MachineStudio.Technician.Models
{
- public class SingleTechRecordingData<T> : TechRecordingData<T, SingleTechRecordingValue> where T : TechItem
+ public class SingleTechRecordingData : TechRecordingData<SingleTechRecordingValue>
{
- public SingleTechRecordingData(T techItem) : base(techItem)
+ public SingleTechRecordingData(String name, String fileName) : base(name, fileName)
{
Init();
}
@@ -35,7 +35,7 @@ namespace Tango.MachineStudio.Technician.Models
protected override List<string> GetColumnNames()
{
- return new List<string>() { TechItem.TechName };
+ return new List<string>() { Name };
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/TechRecordingData.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/TechRecordingData.cs
index 8024a1375..7b6439dbf 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/TechRecordingData.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Models/TechRecordingData.cs
@@ -11,7 +11,7 @@ using Tango.MachineStudio.Technician.TechItems;
namespace Tango.MachineStudio.Technician.Models
{
- public abstract class TechRecordingData<T, TValue> : ExtendedObject, IDisposable where T : TechItem where TValue : TechRecordingValue
+ public abstract class TechRecordingData<TValue> : ExtendedObject, IDisposable where TValue : TechRecordingValue
{
protected bool _initialized;
@@ -20,16 +20,18 @@ namespace Tango.MachineStudio.Technician.Models
public CsvFile<TValue> CsvFile { get; set; }
- public TemporaryFile TemporaryFile { get; set; }
+ public String File { get; set; }
- public T TechItem { get; set; }
+ public String Name { get; set; }
- public TechRecordingData(T techItem)
+ public Object Tag { get; set; }
+
+ public TechRecordingData(String name, String fileName)
{
+ File = fileName;
_start_time = DateTime.Now;
_last_time = DateTime.Now;
- TechItem = techItem;
- TemporaryFile = TemporaryManager.CreateFile(".csv");
+ Name = name;
}
protected void Init()
@@ -37,20 +39,13 @@ namespace Tango.MachineStudio.Technician.Models
CsvDefinition definition = new CsvDefinition();
definition.Columns = new List<String>() { "Time" }.Concat(GetColumnNames());
- CsvFile = new CsvFile<TValue>(new CsvDestination(TemporaryFile), definition);
+ CsvFile = new CsvFile<TValue>(new CsvDestination(File), definition);
_initialized = true;
}
- public void Save(String fileName)
- {
- CsvFile.Dispose();
- File.Copy(TemporaryFile.Path, fileName, true);
- }
-
public void Dispose()
{
CsvFile.Dispose();
- TemporaryFile.Delete();
}
protected abstract List<String> GetColumnNames();
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProject.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProject.cs
index 700e04f7d..2e7ba6cf7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProject.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProject.cs
@@ -10,11 +10,18 @@ namespace Tango.MachineStudio.Technician.Project
{
public class MachineTechViewProject
{
+
+#warning This is legacy and should be removed
public List<TechItem> Items { get; set; }
+ public List<MachineTechViewProjectTab> Tabs { get; set; }
+
+ public int SelectedTabIndex { get; set; }
+
public MachineTechViewProject()
{
Items = new List<TechItem>();
+ Tabs = new List<MachineTechViewProjectTab>();
}
public void Save(String fileName)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProjectTab.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProjectTab.cs
new file mode 100644
index 000000000..c86e1ae55
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Project/MachineTechViewProjectTab.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.Project
+{
+ public class MachineTechViewProjectTab
+ {
+ public String Name { get; set; }
+ public List<TechItem> Items { get; set; }
+
+ public MachineTechViewProjectTab()
+ {
+ Items = new List<TechItem>();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml
new file mode 100644
index 000000000..416428a0e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml
@@ -0,0 +1,35 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.HeaterTemplate"
+ 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:converters="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:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:HeaterItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <GroupBox Header="BLOWER">
+ <StackPanel>
+ <TextBlock FontSize="10">Selected Heater</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechHeaters}" SelectedItem="{Binding TechHeater,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </GroupBox>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml.cs
new file mode 100644
index 000000000..011c41ddc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/HeaterTemplate.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class HeaterTemplate : UserControl
+ {
+ public HeaterTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml
new file mode 100644
index 000000000..023191656
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml
@@ -0,0 +1,42 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.MonitorRecorderTemplate"
+ 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:converters="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:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
+ xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:MonitorRecorderItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" />
+ <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+
+ <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
+ <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" />
+ <Setter Property="Margin" Value="2" />
+ </Style>
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <GroupBox Header="Selected Monitors" IsEnabled="{Binding IsRecording,Converter={StaticResource BooleanInverseConverter}}">
+ <ItemsControl ItemsSource="{Binding Monitors}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <CheckBox IsChecked="{Binding IsSelected}" VerticalAlignment="Center" />
+ <TextBlock Text="{Binding Data.Description}" VerticalAlignment="Center"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </GroupBox>
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml.cs
new file mode 100644
index 000000000..011e108cb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorRecorderTemplate.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+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.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class MonitorRecorderTemplate : UserControl
+ {
+ public MonitorRecorderTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
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 73039bc4b..d937ca15b 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
@@ -52,6 +52,15 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
+ <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
@@ -97,9 +106,16 @@
<Compile Include="Converters\MonitorsToMultiChannleMonitorsConverter.cs" />
<Compile Include="Converters\MonitorsToSingleChannleMonitorsConverter.cs" />
<Compile Include="Converters\SecondsToGraphPointsConverter.cs" />
+ <Compile Include="Converters\SecondsToTimeSpanConverter.cs" />
<Compile Include="Converters\TechIosToDigitalInsConverter.cs" />
<Compile Include="Converters\TechIosToDigitalOutsConverter.cs" />
<Compile Include="Converters\TransitionLinkConverter.cs" />
+ <Compile Include="Editors\MonitorRecorderElementEditor.xaml.cs">
+ <DependentUpon>MonitorRecorderElementEditor.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Editors\HeaterElementEditor.xaml.cs">
+ <DependentUpon>HeaterElementEditor.xaml</DependentUpon>
+ </Compile>
<Compile Include="Editors\TextElementEditor.xaml.cs">
<DependentUpon>TextElementEditor.xaml</DependentUpon>
</Compile>
@@ -168,6 +184,13 @@
<Compile Include="Models\TechRecordingData.cs" />
<Compile Include="Models\TechRecordingValue.cs" />
<Compile Include="Project\MachineTechViewProject.cs" />
+ <Compile Include="Project\MachineTechViewProjectTab.cs" />
+ <Compile Include="PropertiesTemplates\MonitorRecorderTemplate.xaml.cs">
+ <DependentUpon>MonitorRecorderTemplate.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="PropertiesTemplates\HeaterTemplate.xaml.cs">
+ <DependentUpon>HeaterTemplate.xaml</DependentUpon>
+ </Compile>
<Compile Include="PropertiesTemplates\TextTemplate.xaml.cs">
<DependentUpon>TextTemplate.xaml</DependentUpon>
</Compile>
@@ -233,8 +256,10 @@
<Compile Include="TechItems\ControllerItem.cs" />
<Compile Include="TechItems\DigitalInItem.cs" />
<Compile Include="TechItems\DigitalOutItem.cs" />
+ <Compile Include="TechItems\HeaterItem.cs" />
<Compile Include="TechItems\JobRunnerItem.cs" />
<Compile Include="TechItems\MeterItem.cs" />
+ <Compile Include="TechItems\MonitorRecorderItem.cs" />
<Compile Include="TechItems\MotorActionType.cs" />
<Compile Include="TechItems\DispenserItem.cs" />
<Compile Include="TechItems\DancerItem.cs" />
@@ -254,10 +279,19 @@
<Compile Include="TechnicianModule.cs" />
<Compile Include="TechnicianModuleSettings.cs" />
<Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MachineTechTabVM.cs" />
<Compile Include="ViewModels\MachineTechViewVM.cs" />
<Compile Include="Views\MachineTechView.xaml.cs">
<DependentUpon>MachineTechView.xaml</DependentUpon>
</Compile>
+ <Page Include="Editors\MonitorRecorderElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Editors\HeaterElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Editors\TextElementEditor.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -338,6 +372,14 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="PropertiesTemplates\MonitorRecorderTemplate.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="PropertiesTemplates\HeaterTemplate.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="PropertiesTemplates\TextTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -634,6 +676,15 @@
<ItemGroup>
<Resource Include="Images\text.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\heater-controller.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\temperature.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\csv.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
index 6b532204e..f581988f7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
@@ -7,6 +7,7 @@ using System.Windows.Media;
using System.Xml.Serialization;
using Tango.BL;
using Tango.BL.Entities;
+using Tango.Core.Commands;
using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
@@ -18,6 +19,8 @@ namespace Tango.MachineStudio.Technician.TechItems
[TechItem(16)]
public class BlowerItem : TechItem
{
+ public event EventHandler<bool> SetCommandClicked;
+
private static List<HardwareBlower> _BlowerConfigurations;
/// <summary>
/// Gets or sets the Blower configurations.
@@ -68,6 +71,36 @@ namespace Tango.MachineStudio.Technician.TechItems
set { _hardwareBlower = value; RaisePropertyChangedAuto(); }
}
+ private bool _isActive;
+ [XmlIgnore]
+ public bool IsActive
+ {
+ get { return _isActive; }
+ set { _isActive = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _effectiveActive;
+ [XmlIgnore]
+ public bool EffectiveActive
+ {
+ get { return _effectiveActive; }
+ set
+ {
+ _effectiveActive = value;
+ RaisePropertyChangedAuto();
+ IsActive = _effectiveActive;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the set command.
+ /// </summary>
+ [XmlIgnore]
+ public RelayCommand SetCommand { get; set; }
+
+ [XmlIgnore]
+ public RelayCommand ToggleActiveCommand { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="BlowerItem"/> class.
/// </summary>
@@ -78,6 +111,13 @@ namespace Tango.MachineStudio.Technician.TechItems
Image = ResourceHelper.GetImageFromResources("Images/blower.png");
Color = Colors.White;
HardwareBlower = new HardwareBlower();
+
+ SetCommand = new RelayCommand(() => { SetCommandClicked?.Invoke(this, _isActive); });
+
+ ToggleActiveCommand = new RelayCommand(() =>
+ {
+ SetCommandClicked?.Invoke(this, _isActive);
+ });
}
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
index 8a9cba883..2d8763f74 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Windows.Media;
using System.Xml.Serialization;
using Tango.BL.Entities;
+using Tango.Core.Commands;
using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
@@ -17,10 +18,7 @@ namespace Tango.MachineStudio.Technician.TechItems
[TechItem(10)]
public class ControllerItem : TechItem
{
- /// <summary>
- /// Occurs when the controller value has changed.
- /// </summary>
- public event EventHandler<double> ValueChanged;
+ public event EventHandler SetCommandClicked;
private TechController _techController;
/// <summary>
@@ -56,7 +54,6 @@ namespace Tango.MachineStudio.Technician.TechItems
set
{
_value = value; RaisePropertyChangedAuto();
- ValueChanged?.Invoke(this, _value);
}
}
@@ -120,6 +117,12 @@ namespace Tango.MachineStudio.Technician.TechItems
public bool IsSetToDefault { get; set; }
/// <summary>
+ /// Gets or sets the set command.
+ /// </summary>
+ [XmlIgnore]
+ public RelayCommand SetCommand { get; set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="ControllerItem"/> class.
/// </summary>
public ControllerItem() : base()
@@ -130,6 +133,8 @@ namespace Tango.MachineStudio.Technician.TechItems
Color = Colors.DodgerBlue;
LastUpdateTime = DateTime.Now;
UpdateInterval = 10;
+
+ SetCommand = new RelayCommand(() => { SetCommandClicked?.Invoke(this, new EventArgs()); });
}
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs
new file mode 100644
index 000000000..e91c3f185
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Xml.Serialization;
+using Tango.BL.Entities;
+using Tango.Core.Commands;
+using Tango.PMR.Diagnostics;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ /// <summary>
+ /// Represents a heater controller.
+ /// </summary>
+ /// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
+ [TechItem(10)]
+ public class HeaterItem : TechItem
+ {
+ public event Action SetCommandClicked;
+
+ private TechHeater _techHeater;
+ /// <summary>
+ /// Gets or sets the db tech monitor.
+ /// </summary>
+ [XmlIgnore]
+ public TechHeater TechHeater
+ {
+ get { return _techHeater; }
+ set { _techHeater = value; RaisePropertyChangedAuto(); TechName = _techHeater != null ? _techHeater.Description : null; ItemGuid = value != null ? value.Guid : null; }
+ }
+
+ /// <summary>
+ /// Gets or sets the set command.
+ /// </summary>
+ [XmlIgnore]
+ public RelayCommand SetCommand { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HeaterItem"/> class.
+ /// </summary>
+ public HeaterItem() : base()
+ {
+ Name = "Heater Controller";
+ Color = Colors.White;
+ Description = "Heater Controller";
+ Image = ResourceHelper.GetImageFromResources("Images/heater-controller.png");
+ SetCommand = new RelayCommand(() => { SetCommandClicked?.Invoke(); }, (x) => HeaterState.CurrentValue != SetPoint);
+ HeaterState = new HeaterState();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HeaterItem"/> class.
+ /// </summary>
+ /// <param name="TechHeater">The db tech monitor.</param>
+ public HeaterItem(TechHeater techHeater) : this()
+ {
+ TechHeater = techHeater;
+ }
+
+ private HeaterState _heaterState;
+ /// <summary>
+ /// Gets or sets the state of the heater.
+ /// </summary>
+ public HeaterState HeaterState
+ {
+ get { return _heaterState; }
+ set
+ {
+ _heaterState = value;
+ RaisePropertyChangedAuto();
+
+ InvokeUI(() =>
+ {
+ SetCommand.RaiseCanExecuteChanged();
+ });
+ }
+ }
+
+ private double _setPoint;
+ /// <summary>
+ /// Gets or sets the set point.
+ /// </summary>
+ public double SetPoint
+ {
+ get { return _setPoint; }
+ set { _setPoint = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override TechItem Clone()
+ {
+ HeaterItem cloned = base.Clone() as HeaterItem;
+ cloned.TechHeater = TechHeater;
+ return cloned;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs
new file mode 100644
index 000000000..e2b62092d
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using System.Windows.Threading;
+using System.Xml.Serialization;
+using Tango.BL.Entities;
+using Tango.Core.Commands;
+using Tango.SharedUI.Components;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ [TechItem(25)]
+ public class MonitorRecorderItem : TechItem
+ {
+ private DispatcherTimer _timer;
+ private DateTime _recording_start_time;
+
+ public event Action RecordingStarted;
+ public event Action RecordingStopped;
+
+ /// <summary>
+ /// Gets or sets the monitors.
+ /// </summary>
+ [XmlIgnore]
+ public SelectedObjectCollection<TechMonitor> Monitors { get; set; }
+
+ private bool _isRecording;
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is recording.
+ /// </summary>
+ [XmlIgnore]
+ public bool IsRecording
+ {
+ get { return _isRecording; }
+ set { _isRecording = value; RaisePropertyChangedAuto(); }
+ }
+
+ private TimeSpan _recordingTime;
+ [XmlIgnore]
+ public TimeSpan RecordingTime
+ {
+ get { return _recordingTime; }
+ set { _recordingTime = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _isPaused;
+ [XmlIgnore]
+ public bool IsPaused
+ {
+ get { return _isPaused; }
+ set { _isPaused = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ /// <summary>
+ /// Gets or sets the toggle recording command.
+ /// </summary>
+ [XmlIgnore]
+ public RelayCommand ToggleRecordingCommand { get; set; }
+
+ [XmlIgnore]
+ public RelayCommand TogglePauseCommand { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MonitorRecorderItem"/> class.
+ /// </summary>
+ public MonitorRecorderItem() : base()
+ {
+ _timer = new DispatcherTimer();
+ _timer.Tick += _timer_Tick;
+ _timer.Interval = TimeSpan.FromSeconds(1);
+
+ Monitors = new SelectedObjectCollection<TechMonitor>(Adapter.TechMonitors.ToObservableCollection(), new ObservableCollection<TechMonitor>());
+ Name = "CSV Recorder";
+ Description = "Record multiple monitors to a CSV file";
+ Image = ResourceHelper.GetImageFromResources("Images/csv.png");
+ Color = Colors.White;
+
+ ToggleRecordingCommand = new RelayCommand(ToggleRecording);
+ TogglePauseCommand = new RelayCommand(() => { IsPaused = !IsPaused; });
+ }
+
+ public MonitorRecorderItem(object dummy) : this()
+ {
+
+ }
+
+ private void _timer_Tick(object sender, EventArgs e)
+ {
+ RecordingTime = DateTime.Now - _recording_start_time;
+ }
+
+ private void ToggleRecording()
+ {
+ if (!IsRecording)
+ {
+ RecordingStarted?.Invoke();
+ }
+ else
+ {
+ RecordingStopped?.Invoke();
+ }
+ }
+
+ public void StartRecording()
+ {
+ _recording_start_time = DateTime.Now;
+ IsRecording = true;
+ IsPaused = false;
+ _timer.Start();
+ }
+
+ public void StopRecording()
+ {
+ _timer.Stop();
+ IsPaused = false;
+ IsRecording = false;
+ RecordingTime = TimeSpan.FromSeconds(0);
+ }
+
+ public List<TechMonitor> GetSelectedMonitors()
+ {
+ return Monitors.SynchedSource.ToList();
+ }
+ }
+}
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 5a3bd0327..a935ee5a6 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
@@ -191,20 +191,28 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (!IsRecording)
{
- _recording_start_time = DateTime.Now;
- IsRecording = true;
- _timer.Start();
RecordingStarted?.Invoke();
}
else
{
- _timer.Stop();
- IsRecording = false;
- RecordingTime = TimeSpan.FromSeconds(0);
RecordingStopped?.Invoke();
}
}
+ public void StartRecording()
+ {
+ _recording_start_time = DateTime.Now;
+ IsRecording = true;
+ _timer.Start();
+ }
+
+ public void StopRecording()
+ {
+ _timer.Stop();
+ IsRecording = false;
+ RecordingTime = TimeSpan.FromSeconds(0);
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="MultiGraphItem"/> class.
/// </summary>
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 aa404b215..87d971233 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
@@ -184,20 +184,28 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (!IsRecording)
{
- _recording_start_time = DateTime.Now;
- IsRecording = true;
- _timer.Start();
RecordingStarted?.Invoke();
}
else
{
- _timer.Stop();
- IsRecording = false;
- RecordingTime = TimeSpan.FromSeconds(0);
RecordingStopped?.Invoke();
}
}
+ public void StartRecording()
+ {
+ _recording_start_time = DateTime.Now;
+ IsRecording = true;
+ _timer.Start();
+ }
+
+ public void StopRecording()
+ {
+ _timer.Stop();
+ IsRecording = false;
+ RecordingTime = TimeSpan.FromSeconds(0);
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="SingleGraphItem"/> class.
/// </summary>
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 04b6c1fab..6fa00ae0a 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
@@ -39,6 +39,8 @@ namespace Tango.MachineStudio.Technician.TechItems
[XmlInclude(typeof(ProcessParametersItem))]
[XmlInclude(typeof(JobRunnerItem))]
[XmlInclude(typeof(TextItem))]
+ [XmlInclude(typeof(HeaterItem))]
+ [XmlInclude(typeof(MonitorRecorderItem))]
public abstract class TechItem : ExtendedObject
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechTabVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechTabVM.cs
new file mode 100644
index 000000000..4e04a078c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechTabVM.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Editors;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.Technician.ViewModels
+{
+ public class MachineTechTabVM : ViewModel
+ {
+ private ElementsEditor _editor;
+
+ public ElementsEditor Editor
+ {
+ get { return _editor; }
+ set { _editor = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _name;
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ public String Name
+ {
+ get { return _name; }
+ set { _name = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _isSelected;
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is selected.
+ /// </summary>
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ set { _isSelected = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ private ObservableCollection<IElementEditor> _elements;
+ /// <summary>
+ /// Gets or sets the visual elements.
+ /// </summary>
+ public ObservableCollection<IElementEditor> Elements
+ {
+ get { return _elements; }
+ set { _elements = value; RaisePropertyChangedAuto(); }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MachineTechTabVM"/> class.
+ /// </summary>
+ public MachineTechTabVM()
+ {
+ Name = "untitled";
+ Elements = new ObservableCollection<IElementEditor>();
+ }
+ }
+}
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 6575bd53c..2ca5aa43b 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
@@ -33,6 +33,8 @@ using Tango.MachineStudio.Common;
using Tango.Core.Commands;
using Tango.MachineStudio.Technician.Helpers;
using Tango.MachineStudio.Technician.Models;
+using Tango.Logging;
+using Microsoft.WindowsAPICodePack.Dialogs;
namespace Tango.MachineStudio.Technician.ViewModels
{
@@ -55,20 +57,46 @@ namespace Tango.MachineStudio.Technician.ViewModels
private const int MIN_DIAGNOSTICS_UPDATE_MILI = 500;
private TechnicianModuleSettings _settings;
- private List<SingleTechRecordingData<SingleGraphItem>> _single_graphs_recordings;
- private List<MultiTechRecordingData<MultiGraphItem>> _multi_graph_recordings;
+ private List<SingleTechRecordingData> _single_graphs_recordings;
+ private List<MultiTechRecordingData> _multi_graph_recordings;
+ private List<SingleTechRecordingData> _single_monitors_recordings;
+ private List<MultiTechRecordingData> _multi_monitors_recordings;
#region Properties
- private ObservableCollection<IElementEditor> _elements;
+ private ObservableCollection<MachineTechTabVM> _tabs;
/// <summary>
- /// Gets or sets the visual elements.
+ /// Gets or sets the elements tabs.
/// </summary>
- public ObservableCollection<IElementEditor> Elements
+ public ObservableCollection<MachineTechTabVM> Tabs
{
- get { return _elements; }
- set { _elements = value; RaisePropertyChangedAuto(); }
+ get { return _tabs; }
+ set { _tabs = value; RaisePropertyChangedAuto(); }
+ }
+
+ private MachineTechTabVM _selectedTab;
+ /// <summary>
+ /// Gets or sets the selected tab.
+ /// </summary>
+ public MachineTechTabVM SelectedTab
+ {
+ get { return _selectedTab; }
+ set
+ {
+ _selectedTab = value;
+ RaisePropertyChangedAuto();
+
+ foreach (var tab in Tabs.Where(x => x != _selectedTab))
+ {
+ tab.IsSelected = false;
+ }
+
+ if (_selectedTab != null)
+ {
+ _selectedTab.IsSelected = true;
+ }
+ }
}
private ObservableCollection<TechItem> _availableTechItems;
@@ -210,8 +238,30 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// </summary>
public RelayCommand ResetHardwareConfigurationCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the update graphs duration command.
+ /// </summary>
public RelayCommand UpdateGraphsDurationCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the add tab command.
+ /// </summary>
+ public RelayCommand AddTabCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the remove tab command.
+ /// </summary>
+ public RelayCommand<MachineTechTabVM> RemoveTabCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the new project command.
+ /// </summary>
+ public RelayCommand NewProjectCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the rename tab command.
+ /// </summary>
+ public RelayCommand RenameTabCommand { get; set; }
#endregion
#region Constructors
@@ -223,10 +273,17 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="notificationProvider">The notification provider.</param>
public MachineTechViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IEventLogger eventLogger)
{
+ Tabs = new ObservableCollection<MachineTechTabVM>();
+ Tabs.Add(new MachineTechTabVM() { IsSelected = true, Name = "Untitled" });
+ SelectedTab = Tabs.First();
+
_settings = SettingsManager.Default.GetOrCreate<TechnicianModuleSettings>();
- _single_graphs_recordings = new List<SingleTechRecordingData<SingleGraphItem>>();
- _multi_graph_recordings = new List<MultiTechRecordingData<MultiGraphItem>>();
+ _single_graphs_recordings = new List<SingleTechRecordingData>();
+ _multi_graph_recordings = new List<MultiTechRecordingData>();
+
+ _single_monitors_recordings = new List<SingleTechRecordingData>();
+ _multi_monitors_recordings = new List<MultiTechRecordingData>();
GraphsDurationSeconds = _settings.GraphsDuration;
TempGraphsDurationSeconds = GraphsDurationSeconds;
@@ -242,7 +299,6 @@ namespace Tango.MachineStudio.Technician.ViewModels
ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged;
Adapter = ObservablesStaticCollections.Instance;
- Elements = new ObservableCollection<IElementEditor>();
OpenProjectCommand = new RelayCommand(OpenProject);
SaveAsProjectCommand = new RelayCommand(SaveAsProject);
@@ -274,6 +330,11 @@ namespace Tango.MachineStudio.Technician.ViewModels
_settings.GraphsDuration = GraphsDurationSeconds;
ClearAllGraphs();
});
+
+ AddTabCommand = new RelayCommand(() => AddNewTab());
+ RemoveTabCommand = new RelayCommand<MachineTechTabVM>(RemoveTab);
+ NewProjectCommand = new RelayCommand(CreateNewProject);
+ RenameTabCommand = new RelayCommand(RenameTab);
}
#endregion
@@ -322,10 +383,35 @@ namespace Tango.MachineStudio.Technician.ViewModels
CurrentDiagnosticsResponseSize = data.CalculateSize();
}
+ foreach (var sr in _single_monitors_recordings)
+ {
+ var techMonitor = (sr.Tag as TechMonitor);
+
+ var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == techMonitor.Name);
+
+ if (prop != null)
+ {
+ var points = GetDataArray(techMonitor, prop.GetValue(data.Monitors));
+ sr.PushData(points);
+ }
+ }
+
+ foreach (var mr in _multi_monitors_recordings)
+ {
+ var techMonitor = (mr.Tag as TechMonitor);
+
+ var prop = _diagnoticsMonitorsDataProperties.SingleOrDefault(x => x.Name == techMonitor.Name);
+
+ if (prop != null)
+ {
+ var points = GetDataMatrix(techMonitor, prop.GetValue(data.Monitors));
+ mr.PushData(points);
+ }
+ }
lock (_elementsLock)
{
- var elements = Elements.ToList();
+ var elements = Tabs.SelectMany(x => x.Elements).ToList();
foreach (var item in elements.Select(x => x.HostedElement as TechItem))
{
@@ -380,7 +466,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
controller.PushData(points);
- var _graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.TechItem == graphItem);
+ var _graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.Tag == graphItem);
if (_graph_recording != null)
{
_graph_recording.PushData(points);
@@ -414,7 +500,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
controller.PushData(points);
- var _graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.TechItem == graphItem);
+ var _graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.Tag == graphItem);
if (_graph_recording != null)
{
_graph_recording.PushData(points);
@@ -444,6 +530,26 @@ namespace Tango.MachineStudio.Technician.ViewModels
digitalInItem.Value = digitalPin.Value;
}
}
+ else if (item.GetType() == typeof(HeaterItem))
+ {
+ HeaterItem heaterItem = item as HeaterItem;
+
+ var heaterState = data.HeatersStates.SingleOrDefault(x => x.HeaterType == (HeaterType)heaterItem.TechHeater.Code);
+
+ if (heaterState != null)
+ {
+ heaterItem.HeaterState = heaterState;
+ }
+ }
+ else if (item.GetType() == typeof(BlowerItem))
+ {
+ BlowerItem blowerItem = item as BlowerItem;
+
+ if (data.Monitors.BlowerVoltage.Count > 0)
+ {
+ blowerItem.EffectiveActive = data.Monitors.BlowerVoltage.Last() > 0;
+ }
+ }
else if (item.GetType() == typeof(ControllerItem))
{
ControllerItem controllerItem = item as ControllerItem;
@@ -557,6 +663,11 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
CreateElement<MeterElementEditor, MeterItem, TechMonitor>(bounds, Adapter.TechMonitors.Where(x => !x.MultiChannel).FirstOrDefault());
}
+ else if (item is HeaterItem)
+ {
+ var editor = CreateElement<HeaterElementEditor, HeaterItem, TechHeater>(bounds, Adapter.TechHeaters.FirstOrDefault());
+ InitTechHeater(editor.HeaterItem);
+ }
else if (item is SingleGraphItem)
{
var editor = CreateElement<SingleGraphElementEditor, SingleGraphItem, TechMonitor>(bounds, Adapter.TechMonitors.Where(x => !x.MultiChannel).FirstOrDefault());
@@ -619,7 +730,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
}
else if (item is BlowerItem)
{
- CreateElement<BlowerElementEditor, BlowerItem, HardwareBlowerType>(bounds, Adapter.HardwareBlowerTypes.FirstOrDefault());
+ var editor = CreateElement<BlowerElementEditor, BlowerItem, HardwareBlowerType>(bounds, Adapter.HardwareBlowerTypes.FirstOrDefault());
+ InitBlowerItem(editor.BlowerItem);
}
else if (item is BreakSensorItem)
{
@@ -639,6 +751,11 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
CreateElement<TextElementEditor, TextItem, object>(bounds, null);
}
+ else if (item is MonitorRecorderItem)
+ {
+ var editor = CreateElement<MonitorRecorderElementEditor, MonitorRecorderItem, object>(bounds, null);
+ InitMonitorRecorderItem(editor.MonitorRecorderItem);
+ }
}
/// <summary>
@@ -654,7 +771,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
TechItem item = Activator.CreateInstance(typeof(Tech), new object[] { value }) as TechItem;
IElementEditor editor = Activator.CreateInstance(typeof(Editor), new object[] { ((Tech)item), bounds }) as IElementEditor;
- Elements.Add(editor);
+ SelectedTab.Elements.Add(editor);
return (Editor)editor;
}
@@ -667,7 +784,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
private Editor CreateElement<Editor>(TechItem item) where Editor : IElementEditor
{
IElementEditor editor = Activator.CreateInstance(typeof(Editor), new object[] { item, item.GetBounds() }) as IElementEditor;
- Elements.Add(editor);
+ SelectedTab.Elements.Add(editor);
return (Editor)editor;
}
@@ -682,6 +799,11 @@ namespace Tango.MachineStudio.Technician.ViewModels
(item as MonitorItem).TechMonitor = Adapter.TechMonitors.Where(x => !x.MultiChannel).FirstOrDefault(x => x.Guid == item.ItemGuid);
CreateElement<MonitorElementEditor>(item);
}
+ else if (item is HeaterItem)
+ {
+ (item as HeaterItem).TechHeater = Adapter.TechHeaters.FirstOrDefault(x => x.Guid == item.ItemGuid);
+ CreateElement<HeaterElementEditor>(item);
+ }
else if (item is MeterItem)
{
(item as MeterItem).TechMonitor = Adapter.TechMonitors.Where(x => !x.MultiChannel).FirstOrDefault(x => x.Guid == item.ItemGuid);
@@ -761,7 +883,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
else if (item is BlowerItem)
{
(item as BlowerItem).HardwareBlowerType = Adapter.HardwareBlowerTypes.FirstOrDefault(x => x.Guid == item.ItemGuid);
- CreateElement<BlowerElementEditor>(item);
+ var editor = CreateElement<BlowerElementEditor>(item);
+ InitBlowerItem(editor.BlowerItem);
}
else if (item is BreakSensorItem)
{
@@ -782,6 +905,10 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
CreateElement<TextElementEditor>(item);
}
+ else if (item is MonitorRecorderItem)
+ {
+ CreateElement<MonitorRecorderElementEditor>(item);
+ }
}
/// <summary>
@@ -794,20 +921,24 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
if (element.HostedElement is SingleGraphItem)
{
- var _graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.TechItem == element.HostedElement);
+ var _graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.Tag == element.HostedElement);
if (_graph_recording != null)
{
+ (_graph_recording.Tag as SingleGraphItem).StopRecording();
_single_graphs_recordings.Remove(_graph_recording);
+ _graph_recording.Dispose();
}
}
else if (element.HostedElement is MultiGraphItem)
{
- var _graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.TechItem == element.HostedElement);
+ var _graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.Tag == element.HostedElement);
if (_graph_recording != null)
{
+ (_graph_recording.Tag as MultiGraphItem).StopRecording();
_multi_graph_recordings.Remove(_graph_recording);
+ _graph_recording.Dispose();
}
}
}
@@ -894,6 +1025,92 @@ namespace Tango.MachineStudio.Technician.ViewModels
#region Init Tech Items
+ private void InitMonitorRecorderItem(MonitorRecorderItem item)
+ {
+ item.RecordingStarted += () =>
+ {
+ CommonOpenFileDialog dlg = new CommonOpenFileDialog();
+ dlg.Title = "Select a folder to place all CSV files.";
+ dlg.IsFolderPicker = true;
+ if (dlg.ShowDialog() == CommonFileDialogResult.Ok)
+ {
+ foreach (var monitor in item.GetSelectedMonitors())
+ {
+ if (!monitor.MultiChannel)
+ {
+ _single_monitors_recordings.Add(new SingleTechRecordingData(monitor.Name, dlg.FileName + "\\" + monitor.Description + ".csv") { Tag = monitor });
+ }
+ else
+ {
+ _multi_monitors_recordings.Add(new MultiTechRecordingData(monitor.Name, monitor.ChannelCount, dlg.FileName + "\\" + monitor.Description + ".csv") { Tag = monitor });
+ }
+ item.StartRecording();
+ }
+ }
+ };
+
+ item.RecordingStopped += () =>
+ {
+ item.StopRecording();
+
+ foreach (var sr in _single_monitors_recordings)
+ {
+ sr.Dispose();
+ }
+
+ _single_monitors_recordings.Clear();
+
+ foreach (var mr in _multi_monitors_recordings)
+ {
+ mr.Dispose();
+ }
+
+ _multi_monitors_recordings.Clear();
+ };
+ }
+
+ /// <summary>
+ /// Initializes the blower item.
+ /// </summary>
+ /// <param name="item">The blower item.</param>
+ private void InitBlowerItem(BlowerItem item)
+ {
+ item.SetCommandClicked += async (_, isActive) =>
+ {
+ try
+ {
+ CheckMachineOperator();
+ await MachineOperator.SetBlowerState((PMR.Hardware.HardwareBlowerType)item.HardwareBlower.HardwareBlowerType.Code, isActive, item.HardwareBlower.Voltage);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error executing SetBlowerState command for blower {item.HardwareBlower.HardwareBlowerType.Name}.");
+ _eventLogger.Log(ex, $"Error executing SetBlowerState command for blower {item.HardwareBlower.HardwareBlowerType.Name}.");
+ }
+ };
+ }
+
+ /// <summary>
+ /// Initializes the tech heater.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ private void InitTechHeater(HeaterItem item)
+ {
+ item.SetCommandClicked += async () =>
+ {
+ try
+ {
+ CheckMachineOperator();
+ await MachineOperator.SetHeaterState((HeaterType)item.TechHeater.Code, item.SetPoint);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error executing SetHeaterState command for heater {item.TechHeater.Name}.");
+ _eventLogger.Log(ex, $"Error executing SetHeaterState command for heater {item.TechHeater.Name}.");
+ }
+ };
+ }
+
/// <summary>
/// Initializes the motor item.
/// </summary>
@@ -1093,29 +1310,30 @@ namespace Tango.MachineStudio.Technician.ViewModels
item.RecordingStarted += () =>
{
- _single_graphs_recordings.Add(new SingleTechRecordingData<SingleGraphItem>(item));
+ SaveFileDialog dlg = new SaveFileDialog();
+ dlg.Title = "Save graph data as csv file";
+ dlg.Filter = "CSV Files|*.csv";
+ dlg.DefaultExt = ".csv";
+ dlg.FileName = item.TechName;
+ if (dlg.ShowDialog().Value)
+ {
+ _single_graphs_recordings.Add(new SingleTechRecordingData(item.TechName, dlg.FileName) { Tag = item });
+ item.StartRecording();
+ }
};
item.RecordingStopped += () =>
{
try
{
- var graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.TechItem == item);
+ item.StopRecording();
+
+ var graph_recording = _single_graphs_recordings.SingleOrDefault(x => x.Tag == item);
if (graph_recording != null)
{
_single_graphs_recordings.Remove(graph_recording);
-
- SaveFileDialog dlg = new SaveFileDialog();
- dlg.Title = "Save graph data as csv file";
- dlg.Filter = "CSV Files|*.csv";
- dlg.DefaultExt = ".csv";
- dlg.FileName = item.TechName;
- if (dlg.ShowDialog().Value)
- {
- graph_recording.Save(dlg.FileName);
- graph_recording.Dispose();
- }
+ graph_recording.Dispose();
}
}
catch (Exception ex)
@@ -1153,29 +1371,30 @@ namespace Tango.MachineStudio.Technician.ViewModels
item.RecordingStarted += () =>
{
- _multi_graph_recordings.Add(new MultiTechRecordingData<MultiGraphItem>(item, item.TechMonitor.ChannelCount));
+ SaveFileDialog dlg = new SaveFileDialog();
+ dlg.Title = "Save graph data as csv file";
+ dlg.Filter = "CSV Files|*.csv";
+ dlg.DefaultExt = ".csv";
+ dlg.FileName = item.TechName;
+ if (dlg.ShowDialog().Value)
+ {
+ _multi_graph_recordings.Add(new MultiTechRecordingData(item.TechName, item.TechMonitor.ChannelCount, dlg.FileName) { Tag = item });
+ item.StartRecording();
+ }
};
item.RecordingStopped += () =>
{
try
{
- var graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.TechItem == item);
+ item.StopRecording();
+
+ var graph_recording = _multi_graph_recordings.SingleOrDefault(x => x.Tag == item);
if (graph_recording != null)
{
_multi_graph_recordings.Remove(graph_recording);
-
- SaveFileDialog dlg = new SaveFileDialog();
- dlg.Title = "Save graph data as csv file";
- dlg.Filter = "CSV Files|*.csv";
- dlg.DefaultExt = ".csv";
- dlg.FileName = item.TechName;
- if (dlg.ShowDialog().Value)
- {
- graph_recording.Save(dlg.FileName);
- graph_recording.Dispose();
- }
+ graph_recording.Dispose();
}
}
catch (Exception ex)
@@ -1335,7 +1554,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="item">The controller item.</param>
private void InitControllerItem(ControllerItem item)
{
- item.ValueChanged += async (x, value) =>
+ item.SetCommandClicked += async (_, __) =>
{
try
{
@@ -1343,7 +1562,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
await MachineOperator.SetComponentValue(new SetComponentValueRequest()
{
Component = (ValueComponent)item.TechController.Code,
- Value = value
+ Value = item.Value
});
}
catch (Exception ex)
@@ -1446,7 +1665,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
#endregion
- #region Public Methods
+ #region Project Management
/// <summary>
/// Opens a file open dialog to select a project file.
@@ -1469,8 +1688,31 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// <param name="fileName">File path.</param>
public void OpenProjectFile(String fileName)
{
- LoadProject(MachineTechViewProject.Load(fileName));
- _lastTechProjectFile = fileName;
+ try
+ {
+ MachineTechViewProject project = null;
+
+ project = MachineTechViewProject.Load(fileName);
+
+ if (project.Tabs.Count == 0)
+ {
+ LogManager.Log($"Error loading project file {fileName}. Trying to load using legacy project loader.", LogCategory.Warning);
+
+ MachineTechViewProjectTab tab = new MachineTechViewProjectTab();
+ tab.Name = "Untitled";
+ tab.Items.AddRange(project.Items);
+ project.Items.Clear();
+ project.Tabs.Add(tab);
+ }
+
+ LoadProject(project);
+ _lastTechProjectFile = fileName;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, $"Error loading project file {fileName}.");
+ _notification.ShowError("An error occurred while trying to load the tech board project file.");
+ }
}
/// <summary>
@@ -1481,19 +1723,30 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
using (_notification.PushTaskItem("Loading technician project file..."))
{
- Elements.Clear();
+ Tabs.Clear();
_singleControllers.Clear();
_multiControllers.Clear();
- foreach (var item in project.Items)
+ foreach (var tab in project.Tabs)
{
- if (item is MotorGroupItem)
+ MachineTechTabVM t = new MachineTechTabVM();
+ t.Name = tab.Name;
+ Tabs.Add(t);
+
+ SelectedTab = t;
+
+ foreach (var item in tab.Items)
{
- (item as MotorGroupItem).TechMotors = ObservablesStaticCollections.Instance.HardwareMotorTypes.Where(x => (item as MotorGroupItem).ItemsGuids.Contains(x.Guid)).ToObservableCollection();
- }
+ if (item is MotorGroupItem)
+ {
+ (item as MotorGroupItem).TechMotors = ObservablesStaticCollections.Instance.HardwareMotorTypes.Where(x => (item as MotorGroupItem).ItemsGuids.Contains(x.Guid)).ToObservableCollection();
+ }
- AddTechItem(item);
+ AddTechItem(item);
+ }
}
+
+ SelectedTab = Tabs.ElementAt(project.SelectedTabIndex);
}
}
@@ -1548,22 +1801,115 @@ namespace Tango.MachineStudio.Technician.ViewModels
private MachineTechViewProject GenerateProjectFile()
{
MachineTechViewProject project = new MachineTechViewProject();
+ project.SelectedTabIndex = Tabs.IndexOf(SelectedTab);
- foreach (var element in Elements)
+ foreach (var tab in Tabs)
{
- if (element.HostedElement is MotorGroupItem)
+ MachineTechViewProjectTab pTab = new MachineTechViewProjectTab();
+ pTab.Name = tab.Name;
+
+ foreach (var element in tab.Elements)
{
- var group = element.HostedElement as MotorGroupItem;
- group.ItemsGuids = group.TechMotors.Select(x => x.Guid).ToList();
+ if (element.HostedElement is MotorGroupItem)
+ {
+ var group = element.HostedElement as MotorGroupItem;
+ group.ItemsGuids = group.TechMotors.Select(x => x.Guid).ToList();
+ }
+
+ (element.HostedElement as TechItem).SetBounds(element.GetBounds());
+ pTab.Items.Add(element.HostedElement as TechItem);
}
- (element.HostedElement as TechItem).SetBounds(element.GetBounds());
- project.Items.Add(element.HostedElement as TechItem);
+ project.Tabs.Add(pTab);
}
return project;
}
+ /// <summary>
+ /// Removes the specified tab.
+ /// </summary>
+ /// <param name="tab">The tab.</param>
+ private void RemoveTab(MachineTechTabVM tab)
+ {
+ if (_notification.ShowQuestion("Are you sure you want to delete the selected tab?"))
+ {
+ Tabs.Remove(tab);
+ SelectedTab = Tabs.LastOrDefault();
+
+ if (SelectedTab == null)
+ {
+ AddNewTab("Untitled");
+ }
+ }
+ }
+
+ /// <summary>
+ /// Adds a new tab.
+ /// </summary>
+ private bool AddNewTab(String name = null)
+ {
+ if (Tabs.Count > 7)
+ {
+ _notification.ShowError("Cannot exceed the maximum number of 8 tabs. You can remove a tab, or create a new project.");
+ return false;
+ }
+
+ if (name == null)
+ {
+ name = _notification.ShowTextInput("Enter tab name", "Tab Name", "Untitled");
+ }
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ MachineTechTabVM t = new MachineTechTabVM();
+ t.Name = name;
+ Tabs.Add(t);
+ SelectedTab = t;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Creates a new project.
+ /// </summary>
+ private void CreateNewProject()
+ {
+ var to_remove = Tabs.ToList();
+
+ if (AddNewTab())
+ {
+ _singleControllers.Clear();
+ _multiControllers.Clear();
+
+ foreach (var tab in to_remove)
+ {
+ Tabs.Remove(tab);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Renames the tab.
+ /// </summary>
+ /// <param name="tab">The tab.</param>
+ private void RenameTab()
+ {
+ if (SelectedTab != null)
+ {
+ var name = _notification.ShowTextInput("Enter tab name", "Tab Name", SelectedTab.Name);
+
+ if (!String.IsNullOrWhiteSpace(name))
+ {
+ SelectedTab.Name = name;
+ }
+ }
+ }
+
#endregion
#region IStudioModuleVM
@@ -1599,7 +1945,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
private void SyncHardwareConfiguration()
{
- var elements = Elements.ToList();
+ var elements = Tabs.SelectMany(x => x.Elements).ToList();
if (MachineOperator != null && MachineOperator.CurrentHardwareConfiguration != null)
{
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 3fe82944c..ac207fc55 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
@@ -14,6 +14,7 @@
xmlns:templates="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:localConverters="clr-namespace:Tango.MachineStudio.Technician.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
mc:Ignorable="d"
@@ -22,6 +23,102 @@
<UserControl.Resources>
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:NumberToFileSizeConverter x:Key="NumberToFileSizeConverter" />
+ <localConverters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
+
+ <DataTemplate x:Key="TabTemplate">
+ <Grid>
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="False">
+ <Setter Property="Visibility" Value="Hidden"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <editors:ElementsEditor
+ x:Name="editor"
+ Elements="{Binding Elements}"
+ Loaded="Editor_Loaded"
+ ElementCreation="ElementsEditor_ElementCreation"
+ ElementsRemoved="ElementsEditor_ElementsRemoved"
+ AfterPaste="ElementsEditor_AfterPaste"
+ RulerHeight="32"
+ EditorWidth="1920"
+ EditorHeight="1080"
+ FontSize="10"
+ Background="#7EFFFFFF"
+ EditorBackground="#70FFFFFF"
+ RulerBackground="Transparent"
+ Foreground="#1EA9FF"
+ SelectionFillBrush="#338D8D8D"
+ SelectionStrokeBrush="#1EA9FF"
+ BorderBrush="#1EA9FF"
+ BorderThickness="1">
+
+ <editors:ElementsEditor.Style>
+ <Style TargetType="editors:ElementsEditor">
+ <Setter Property="IsEditable" Value="True"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
+ <Setter Property="IsEditable" Value="False"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </editors:ElementsEditor.Style>
+
+ <editors:ElementsEditor.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
+ <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Cut" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Copy" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Paste" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Undo" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Recycle" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
+ <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Th" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </editors:ElementsEditor.ContextMenu>
+ </editors:ElementsEditor>
+
+ <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
+ </Grid>
+ </DataTemplate>
</UserControl.Resources>
<Grid>
@@ -39,6 +136,12 @@
<Menu Padding="5" Background="#C6ECECEC" Visibility="{Binding HideMenu,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<MenuItem Header="File">
+ <MenuItem Command="{Binding NewProjectCommand}" MinWidth="180" Header="New" VerticalContentAlignment="Center">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="File" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator/>
<MenuItem Command="{Binding OpenProjectCommand}" MinWidth="180" Header="Open" VerticalContentAlignment="Center">
<MenuItem.Icon>
<fa:ImageAwesome Icon="FolderOpen" Width="16" />
@@ -57,58 +160,58 @@
</MenuItem>
</MenuItem>
<MenuItem Header="Edit">
- <MenuItem Header="Cut (Ctrl+X)" Command="{Binding ElementName=editor,Path=CutCommand}" MinWidth="210">
+ <MenuItem Header="Cut (Ctrl+X)" Command="{Binding SelectedTab.Editor.CutCommand}" MinWidth="210">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Cut" Width="16" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Copy (Ctrl+C)" Command="{Binding ElementName=editor,Path=CopyCommand}">
+ <MenuItem Header="Copy (Ctrl+C)" Command="{Binding SelectedTab.Editor.CopyCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Copy" Width="16" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Paste (Ctrl+V)" Command="{Binding ElementName=editor,Path=PasteCommand}">
+ <MenuItem Header="Paste (Ctrl+V)" Command="{Binding SelectedTab.Editor.PasteCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Paste" Width="16" />
</MenuItem.Icon>
</MenuItem>
<Separator/>
- <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding ElementName=editor,Path=UndoCommand}">
+ <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding SelectedTab.Editor.UndoCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Undo" Width="16" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding ElementName=editor,Path=RedoCommand}">
+ <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding SelectedTab.Editor.RedoCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
</MenuItem.Icon>
</MenuItem>
<Separator/>
- <MenuItem Header="Delete (DELETE)" Command="{Binding ElementName=editor,Path=DeleteCommand}">
+ <MenuItem Header="Delete (DELETE)" Command="{Binding SelectedTab.Editor.DeleteCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Recycle" Width="16" />
</MenuItem.Icon>
</MenuItem>
<Separator/>
- <MenuItem Header="Select All (Ctrl+A)" Command="{Binding ElementName=editor,Path=SelectAllCommand}">
+ <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectedTab.Editor.SelectAllCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Th" Width="16" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="View">
- <MenuItem Header="Zoom In" Command="{Binding ElementName=editor,Path=ZoomCommand}" CommandParameter="0.1">
+ <MenuItem Header="Zoom In" Command="{Binding SelectedTab.Editor.ZoomCommand}" CommandParameter="0.1">
<MenuItem.Icon>
<fa:ImageAwesome Icon="SearchPlus" Width="16" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Zoom Out" Command="{Binding ElementName=editor,Path=ZoomCommand}" CommandParameter="-0.1">
+ <MenuItem Header="Zoom Out" Command="{Binding SelectedTab.Editor.ZoomCommand}" CommandParameter="-0.1">
<MenuItem.Icon>
<fa:ImageAwesome Icon="SearchMinus" Width="16" />
</MenuItem.Icon>
</MenuItem>
<Separator/>
- <MenuItem Header="Reset Zoom" Command="{Binding ElementName=editor,Path=ResetZoomCommand}">
+ <MenuItem Header="Reset Zoom" Command="{Binding SelectedTab.Editor.ResetZoomCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Search" Width="16" />
</MenuItem.Icon>
@@ -180,11 +283,10 @@
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Width="275" Margin="0 15 30 0">
<TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" Foreground="Gray">
- <Run>GRAPHS DURATION:</Run>
- <Run Text="{Binding TempGraphsDurationSeconds,Mode=OneWay}"></Run>
- <Run>sec</Run>
+ <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="60" Value="{Binding TempGraphsDurationSeconds}">
+ <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>
@@ -192,7 +294,7 @@
</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>
@@ -202,7 +304,7 @@
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type techItems:TechItem}">
- <Border Cursor="Hand" ToolTip="{Binding Description}" RenderTransformOrigin="0.5,0.5" Width="60" Height="60" Padding="10" Margin="5" BorderThickness="1" CornerRadius="100">
+ <Border Cursor="Hand" ToolTip="{Binding Description}" RenderTransformOrigin="0.5,0.5" Width="55" Height="55" Padding="10" Margin="5" BorderThickness="1" CornerRadius="100">
<Border.Style>
<Style TargetType="Border">
<Setter Property="RenderTransform">
@@ -258,207 +360,208 @@
</Grid>
</Grid>
- <Grid Grid.Row="1" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="300"/>
- </Grid.ColumnDefinitions>
+ <Grid Grid.Row="1">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="30"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <StackPanel Orientation="Horizontal" Margin="35 0 0 0">
+ <ListBox Style="{x:Null}" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Background="Transparent" BorderThickness="0" ItemsSource="{Binding Tabs}" SelectedItem="{Binding SelectedTab}">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"></StackPanel>
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
+
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Border Padding="5 5" Width="160" CornerRadius="10 10 0 0" Margin="1 0" Tag="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}">
+ <Border.ContextMenu>
+ <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
+ <MenuItem Header="Rename" Command="{Binding RenameTabCommand}" MinWidth="210">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Pencil" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </Border.ContextMenu>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="#CBCBCB"></Setter>
+ <Setter Property="TextElement.Foreground" Value="#202020"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="White"></Setter>
+ </DataTrigger>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Opacity" Value="0.8"></Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <DockPanel VerticalAlignment="Center">
+ <Button Cursor="Hand" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveTabCommand}" CommandParameter="{Binding}" DockPanel.Dock="Right" Margin="5 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="Auto">
+ <materialDesign:PackIcon Kind="Close">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Foreground" Value="#202020"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Foreground" Value="White"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </Button>
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="11"></TextBlock>
+ </DockPanel>
+ </Border>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+
+ <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="24" Cursor="Hand" Command="{Binding AddTabCommand}" ToolTip="New tab">
+ <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" Foreground="{StaticResource AccentColorBrush}" />
+ </Button>
+ </StackPanel>
- <Grid>
+ <Grid Margin="5 0 5 5" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
- <editors:ElementsEditor
- x:Name="editor"
- Elements="{Binding Elements}"
- ElementCreation="ElementsEditor_ElementCreation"
- ElementsRemoved="ElementsEditor_ElementsRemoved"
- AfterPaste="ElementsEditor_AfterPaste"
- RulerHeight="32"
- EditorWidth="1920"
- EditorHeight="1080"
- FontSize="10"
- Background="Transparent"
- EditorBackground="#70FFFFFF"
- RulerBackground="Transparent"
- Foreground="{StaticResource AccentColorBrush}"
- SelectionFillBrush="#338D8D8D"
- SelectionStrokeBrush="{StaticResource AccentColorBrush}"
- BorderBrush="{StaticResource AccentColorBrush}"
- BorderThickness="1">
- <editors:ElementsEditor.Style>
- <Style TargetType="editors:ElementsEditor">
- <Setter Property="IsEditable" Value="True"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=listMode,Path=SelectedIndex}" Value="1">
- <Setter Property="IsEditable" Value="False"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </editors:ElementsEditor.Style>
+ <ItemsControl ItemsSource="{Binding Tabs}" ItemTemplate="{StaticResource TabTemplate}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Grid/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ </ItemsControl>
- <editors:ElementsEditor.ContextMenu>
- <ContextMenu DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
- <MenuItem Header="Cut (Ctrl+X)" Command="{Binding CutCommand}" MinWidth="210">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Cut" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Copy (Ctrl+C)" Command="{Binding CopyCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Copy" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Paste (Ctrl+V)" Command="{Binding PasteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Paste" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Undo (Ctrl+Z)" Command="{Binding UndoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Undo" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem Header="Redo (Ctrl+Y)" Command="{Binding RedoCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="RotateRight" Width="16"></fa:ImageAwesome>
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Delete (DELETE)" Command="{Binding DeleteCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Recycle" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator/>
- <MenuItem Header="Select All (Ctrl+A)" Command="{Binding SelectAllCommand}">
- <MenuItem.Icon>
- <fa:ImageAwesome Icon="Th" Width="16" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
- </editors:ElementsEditor.ContextMenu>
- </editors:ElementsEditor>
+ <Grid Grid.Column="1">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="0 -30 0 0" Text="{Binding SelectedTab.Editor.SelectedElement.HostedElement.TechName}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
- <Slider Grid.Column="1" Orientation="Vertical" Margin="5" Maximum="3" Minimum="0.2" Value="{Binding ElementName=editor,Path=ScaleFactor}"></Slider>
- </Grid>
-
- <Grid Grid.Column="1">
- <DockPanel>
- <TextBlock DockPanel.Dock="Top" Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Text="{Binding TechName}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
+ <ScrollViewer VerticalScrollBarVisibility="Auto">
+ <StackPanel>
+ <GroupBox DockPanel.Dock="Top" Header="BOUNDS" Padding="5">
+ <StackPanel>
+ <!--Position-->
+ <UniformGrid Columns="2" Margin="0 5 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Left</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding SelectedTab.Editor.EditorWidth}" Value="{Binding SelectedTab.Editor.SelectedElement.Left}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Top</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding SelectedTab.Editor.EditorHeight}" Value="{Binding SelectedTab.Editor.SelectedElement.Top}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
- <ScrollViewer VerticalScrollBarVisibility="Auto">
- <StackPanel>
- <GroupBox DockPanel.Dock="Top" Header="BOUNDS" Padding="5">
- <StackPanel>
- <!--Position-->
- <UniformGrid Columns="2" Margin="0 5 0 0">
- <StackPanel Margin="0 0 5 0">
- <TextBlock>Left</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Left}"></mahapps:NumericUpDown>
- </StackPanel>
- <StackPanel Margin="5 0 0 0">
- <TextBlock>Top</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Top}"></mahapps:NumericUpDown>
- </StackPanel>
- </UniformGrid>
+ <!--Size-->
+ <UniformGrid Columns="2" Margin="0 20 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Width</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding SelectedTab.Editor.EditorWidth}" Value="{Binding SelectedTab.Editor.SelectedElement.Width}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Height</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding SelectedTab.Editor.EditorHeight}" Value="{Binding SelectedTab.Editor.SelectedElement.Height}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
- <!--Size-->
- <UniformGrid Columns="2" Margin="0 20 0 0">
- <StackPanel Margin="0 0 5 0">
- <TextBlock>Width</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Width}"></mahapps:NumericUpDown>
- </StackPanel>
- <StackPanel Margin="5 0 0 0">
- <TextBlock>Height</TextBlock>
- <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Height}"></mahapps:NumericUpDown>
- </StackPanel>
- </UniformGrid>
+ <!--<Angle-->
+ <Grid Margin="0 20 0 0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="22*"></ColumnDefinition>
+ <ColumnDefinition Width="20*"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+ <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock>
+ <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding SelectedTab.Editor.SelectedElement.Angle}"></mahapps:NumericUpDown>
+ </Grid>
+ </StackPanel>
+ </GroupBox>
+ <ContentControl Margin="0 10 0 0" DataContext="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedTab.Editor.SelectedElement.HostedElement}" Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SelectedTab.Editor.SelectedElement.HostedElement}">
+ <ContentControl.Resources>
+ <DataTemplate DataType="{x:Type sys:Nullable}">
- <!--<Angle-->
- <Grid Margin="0 20 0 0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="22*"></ColumnDefinition>
- <ColumnDefinition Width="20*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock>
- <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding ElementName=editor,Path=SelectedElement.Angle}"></mahapps:NumericUpDown>
- </Grid>
- </StackPanel>
- </GroupBox>
- <ContentControl Margin="0 10 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}">
- <ContentControl.Resources>
- <DataTemplate DataType="{x:Type sys:Nullable}">
-
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:TextItem}">
- <templates:TextTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:JobRunnerItem}">
- <templates:JobRunnerTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:ProcessParametersItem}">
- <templates:ProcessParametersTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:BreakSensorItem}">
- <templates:BreakSensorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:BlowerItem}">
- <templates:BlowerTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:SpeedSensorItem}">
- <templates:SpeedSensorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DancerItem}">
- <templates:DancerTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:WinderItem}">
- <templates:WinderTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:PidItem}">
- <templates:PidTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:ControllerItem}">
- <templates:ControllerTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MonitorItem}">
- <templates:MonitorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DigitalInItem}">
- <templates:DigitalInTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MotorGroupItem}">
- <templates:MotorGroupTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:ThreadMotionItem}">
- <templates:ThreadMotionTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DigitalOutItem}">
- <templates:DigitalOutTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:DispenserItem}">
- <templates:DispenserTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MotorItem}">
- <templates:MotorTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MeterItem}">
- <templates:MeterTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:SingleGraphItem}">
- <templates:SingleGraphTemplate/>
- </DataTemplate>
- <DataTemplate DataType="{x:Type items:MultiGraphItem}">
- <templates:MultiGraphTemplate/>
- </DataTemplate>
- </ContentControl.Resources>
- </ContentControl>
- </StackPanel>
- </ScrollViewer>
- </DockPanel>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MonitorRecorderItem}">
+ <templates:MonitorRecorderTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:HeaterItem}">
+ <templates:HeaterTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:TextItem}">
+ <templates:TextTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:JobRunnerItem}">
+ <templates:JobRunnerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:ProcessParametersItem}">
+ <templates:ProcessParametersTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:BreakSensorItem}">
+ <templates:BreakSensorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:BlowerItem}">
+ <templates:BlowerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:SpeedSensorItem}">
+ <templates:SpeedSensorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DancerItem}">
+ <templates:DancerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:WinderItem}">
+ <templates:WinderTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:PidItem}">
+ <templates:PidTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:ControllerItem}">
+ <templates:ControllerTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MonitorItem}">
+ <templates:MonitorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DigitalInItem}">
+ <templates:DigitalInTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MotorGroupItem}">
+ <templates:MotorGroupTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:ThreadMotionItem}">
+ <templates:ThreadMotionTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DigitalOutItem}">
+ <templates:DigitalOutTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:DispenserItem}">
+ <templates:DispenserTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MotorItem}">
+ <templates:MotorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MeterItem}">
+ <templates:MeterTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:SingleGraphItem}">
+ <templates:SingleGraphTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:MultiGraphItem}">
+ <templates:MultiGraphTemplate/>
+ </DataTemplate>
+ </ContentControl.Resources>
+ </ContentControl>
+ </StackPanel>
+ </ScrollViewer>
+ </DockPanel>
+ </Grid>
</Grid>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
index 977974f8a..694debd26 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml.cs
@@ -32,8 +32,6 @@ namespace Tango.MachineStudio.Technician.Views
{
_vm = DataContext as MachineTechViewVM;
};
-
- (editor.UndoRedoStatesProvider as ElementsEditorUndoRedoStatesProvider).StateExecuted += MachineTechView_StateExecuted;
}
private void MachineTechView_StateExecuted(object sender, UndoRedoStateExecutedEventArgs e)
@@ -61,5 +59,13 @@ namespace Tango.MachineStudio.Technician.Views
{
//editor.DeselectElements();
}
+
+ private void Editor_Loaded(object sender, RoutedEventArgs e)
+ {
+ ElementsEditor editor = sender as ElementsEditor;
+ (editor.DataContext as MachineTechTabVM).Editor = editor;
+
+ (editor.UndoRedoStatesProvider as ElementsEditorUndoRedoStatesProvider).StateExecuted += MachineTechView_StateExecuted;
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
index ea48e62ff..adee6f7b4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/packages.config
@@ -8,6 +8,8 @@
<package id="MahApps.Metro" version="1.5.0" targetFramework="net46" />
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
+ <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.0" targetFramework="net472" />
+ <package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net472" />
<package id="System.Reactive" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Core" version="3.1.1" targetFramework="net46" />
<package id="System.Reactive.Interfaces" version="3.1.1" targetFramework="net46" />
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 33755f909..bf2e41afa 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
@@ -56,29 +56,29 @@
<ColumnDefinition Width="438*"/>
</Grid.ColumnDefinitions>
- <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="#90FFFFFF">
+ <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="{StaticResource MaterialDesignLightForeground}" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
+ <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="5 0 0 0">
- <graphEx:RealTimeGraphExLineErase 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" MarkerColor="{StaticResource graphsMarkerColor}" 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:RealTimeGraphExLineErase.Components>
+ <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="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
- </graphEx:RealTimeGraphExLineErase.Components>
- <graphEx:RealTimeGraphExLineErase.InnerContent>
+ <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 VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorName,FallbackValue='Dispenser Motor'}"></TextBlock>
- <TextBlock Foreground="Gray" Margin="10 0 0 0" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorUnits,FallbackValue='(hz)'}"></TextBlock>
+ <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:RealTimeGraphExLineErase.InnerContent>
- </graphEx:RealTimeGraphExLineErase>
+ </graphEx:RealTimeGraphExLineScroll.InnerContent>
+ </graphEx:RealTimeGraphExLineScroll>
</Border>
</Grid>
</ContentControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml
index 45b4aa9fb..4976739e4 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml
@@ -56,29 +56,29 @@
<ColumnDefinition Width="438*"/>
</Grid.ColumnDefinitions>
- <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="#90FFFFFF">
+ <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="{StaticResource MaterialDesignLightForeground}" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
+ <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="5 0 0 0">
- <graphEx:RealTimeGraphExMultiLineErase 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" MarkerColor="{StaticResource graphsMarkerColor}" 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:RealTimeGraphExMultiLineErase.Components>
+ <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="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
- </graphEx:RealTimeGraphExMultiLineErase.Components>
- <graphEx:RealTimeGraphExMultiLineErase.InnerContent>
+ <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" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorName,FallbackValue='Dispensers Motors'}"></TextBlock>
- <TextBlock Foreground="Gray" Margin="10 0 0 0" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorUnits,FallbackValue='(hz)'}"></TextBlock>
+ <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:RealTimeGraphExMultiLineErase.InnerContent>
- </graphEx:RealTimeGraphExMultiLineErase>
+ </graphEx:RealTimeGraphExMultiLineScroll.InnerContent>
+ </graphEx:RealTimeGraphExMultiLineScroll>
</Border>
<Border Grid.Column="2" Margin="5 0 0 0" HorizontalAlignment="Right" Opacity="0.8">
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
index f54611d9c..22ed1a33d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
@@ -11,6 +11,13 @@ namespace Tango.MachineStudio.Common
{
public class MachineStudioSettings : SettingsBase
{
+ public class StudioModuleBounds
+ {
+ public String Name { get; set; }
+ public Rect Bounds { get; set; }
+ public WindowState State { get; set; }
+ }
+
/// <summary>
/// Gets or sets the last login email.
/// </summary>
@@ -67,6 +74,11 @@ namespace Tango.MachineStudio.Common
public bool UseExternalBridgeEmulator { get; set; }
/// <summary>
+ /// Gets or sets the studio modules bounds.
+ /// </summary>
+ public List<StudioModuleBounds> StudioModulesBounds { get; set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="MachineStudio"/> class.
/// </summary>
public MachineStudioSettings()
@@ -75,6 +87,7 @@ namespace Tango.MachineStudio.Common
LoggingCategories = new List<LogCategory>();
UpdateServiceAddress = "http://twine01/MachineStudioUpdateService/MachineStudioUpdateService.svc";
DefaultIssueReportTags = new List<string>();
+ StudioModulesBounds = new List<StudioModuleBounds>();
}
}
}
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 6fcf6dd72..acddeec6e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
@@ -199,7 +199,7 @@
<!--Colors-->
<Color x:Key="borderColor">Silver</Color>
- <Color x:Key="graphGridLinesColor">#FFE9E9E9</Color>
+ <Color x:Key="graphGridLinesColor">#FF464646</Color>
<Color x:Key="graphsMarkerColor">Gray</Color>
<Color x:Key="materialColor">#03A9F4</Color>
@@ -222,18 +222,18 @@
</LinearGradientBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphBackground">
- <GradientStop Color="White"/>
- <GradientStop Color="#FFE9E9E9" Offset="1"/>
+ <GradientStop Color="#232323"/>
+ <GradientStop Color="#FF4B4B4B" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLabelBackground" Opacity="0.7">
- <GradientStop Color="White"/>
- <GradientStop Color="#FFD9D9D9" Offset="1"/>
+ <GradientStop Color="#252525"/>
+ <GradientStop Color="#FF4E4E4E" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="graphLegendBackground" Opacity="0.7">
- <GradientStop Color="#FFE9E9E9"/>
- <GradientStop Color="#FFBDBDBD" Offset="1"/>
+ <GradientStop Color="#FF848484"/>
+ <GradientStop Color="#FF282828" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush Color="#FFF1F1F1" x:Key="topBarBackgroundBrush"></SolidColorBrush>
@@ -251,7 +251,7 @@
<Setter.Value>
<DataTemplate>
<Border Width="Auto" Padding="0 0 20 0" Height="25" BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1" CornerRadius="0 0 30 0" Background="{StaticResource graphLabelBackground}" >
- <Label Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TinyFontSize}" Content="{Binding}"></Label>
+ <Label Margin="5 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="12" Content="{Binding}"></Label>
</Border>
</DataTemplate>
</Setter.Value>
@@ -302,7 +302,7 @@
</Style>
</Ellipse.Style>
</Ellipse>
- <TextBlock FontSize="8" Text="{Binding Name}" VerticalAlignment="Center" Foreground="Black" FontWeight="DemiBold" HorizontalAlignment="Center"></TextBlock>
+ <TextBlock FontSize="8" Text="{Binding Name}" VerticalAlignment="Center" Foreground="Gainsboro" FontWeight="DemiBold" HorizontalAlignment="Center"></TextBlock>
</Grid>
</Grid>
</ControlTemplate>
@@ -484,7 +484,100 @@
</Style.Resources>
</Style>
+ <Style x:Key="TechWidgetBorderLeft" TargetType="Border">
+ <Setter Property="Background">
+ <Setter.Value>
+ <LinearGradientBrush EndPoint="1,0">
+ <GradientStop Color="#FF646464" Offset="1" />
+ <GradientStop Color="#232323" Offset="0"/>
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="TextElement.Foreground" Value="Gainsboro"></Setter>
+
+ <Style.Triggers>
+ <EventTrigger RoutedEvent="PreviewMouseDown">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color" To="#FF252525" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="PreviewMouseUp">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color" To="#FF646464" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ </Style.Triggers>
+ </Style>
+ <Style x:Key="TechWidgetBorderRight" TargetType="Border">
+ <Setter Property="Background">
+ <Setter.Value>
+ <LinearGradientBrush EndPoint="1,0">
+ <GradientStop Color="#FF646464" Offset="0" />
+ <GradientStop Color="#232323" Offset="1"/>
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <EventTrigger RoutedEvent="PreviewMouseDown">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color" To="#FF252525" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="PreviewMouseUp">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[0].Color" To="#FF646464" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ </Style.Triggers>
+ </Style>
+
+ <Style x:Key="TechWidgetBorderCenter" TargetType="Border">
+ <Setter Property="Background">
+ <Setter.Value>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#232323" Offset="1" />
+ <GradientStop Color="#FF646464" Offset="0"/>
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <EventTrigger RoutedEvent="PreviewMouseDown">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FF252525" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="PreviewMouseUp">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FF646464" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ </Style.Triggers>
+ </Style>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
index 63ff2119a..9ce79703f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs
@@ -109,7 +109,10 @@ namespace Tango.MachineStudio.Common
/// Called when the view has been attached
/// </summary>
/// <param name="view">The view.</param>
- protected abstract void OnViewAttached(TView view);
+ protected virtual void OnViewAttached(TView view)
+ {
+ //Do Nothing.
+ }
}
}
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 09678b515..81b155748 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
@@ -300,7 +300,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
index 4147a78ec..0395c36bb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
@@ -87,6 +87,34 @@
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.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>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <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>
</assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs
index d774c14eb..bc11dfd18 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs
@@ -26,6 +26,14 @@ namespace Tango.MachineStudio.UI.Notifications
{
InitializeComponent();
this.Loaded += TextInputBoxWindow_Loaded;
+
+ ContentRendered += TextInputBoxWindow_ContentRendered;
+ }
+
+ private void TextInputBoxWindow_ContentRendered(object sender, EventArgs e)
+ {
+ txtText.Focus();
+ txtText.SelectAll();
}
private void TextInputBoxWindow_Loaded(object sender, RoutedEventArgs e)
@@ -34,12 +42,8 @@ namespace Tango.MachineStudio.UI.Notifications
ani.To = 1;
ani.Duration = TimeSpan.FromSeconds(0.5);
this.BeginAnimation(Window.OpacityProperty, ani);
-
- txtText.Focus();
}
-
-
public String Hint
{
get { return (String)GetValue(HintProperty); }
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
index 29bb459ee..8eff9ea4e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs
@@ -21,6 +21,7 @@ using Tango.BL.Enumerations;
using Tango.Core.DI;
using Tango.BL.Entities;
using Tango.BL;
+using Tango.MachineStudio.UI.ViewModels;
namespace Tango.MachineStudio.UI.StudioApplication
{
@@ -45,7 +46,7 @@ namespace Tango.MachineStudio.UI.StudioApplication
_navigationManager = navigationManager;
_openedWindows = new List<Window>();
- Application.Current.MainWindow.ContentRendered += (_, __) =>
+ Application.Current.MainWindow.ContentRendered += (_, __) =>
{
TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>().ToList().ForEach(x => x.OnApplicationStarted());
};
@@ -150,8 +151,8 @@ namespace Tango.MachineStudio.UI.StudioApplication
await Task.Factory.StartNew(async () =>
{
- //Do Shutdown Procedures...
- foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>())
+ //Do Shutdown Procedures...
+ foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>())
{
try
{
@@ -173,7 +174,29 @@ namespace Tango.MachineStudio.UI.StudioApplication
vm.OnShuttingDown();
}
- SettingsManager.Default.GetOrCreate<MachineStudioSettings>().LastBounds = r;
+
+ var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
+ settings.LastBounds = r;
+ settings.StudioModulesBounds.Clear();
+
+
+ foreach (var window in _openedWindows.OfType<Windows.ModuleWindow>())
+ {
+ window.Invoke(() =>
+ {
+ var context = window.ModuleContext;
+
+ if (context != null)
+ {
+ settings.StudioModulesBounds.Add(new MachineStudioSettings.StudioModuleBounds()
+ {
+ Bounds = window.RestoreBounds,
+ State = window.WindowState,
+ Name = context.Module.Name,
+ });
+ }
+ });
+ }
try
{
@@ -224,7 +247,7 @@ namespace Tango.MachineStudio.UI.StudioApplication
catch (Exception ex)
{
IsShuttingDown = false;
- LogManager.Log(ex,"An error occurred while shutting down machine studio.");
+ LogManager.Log(ex, "An error occurred while shutting down machine studio.");
}
}
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 5a646e9c0..fce0e717f 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
@@ -433,6 +433,10 @@
<Project>{d0ce8122-077d-42a2-9490-028ae4769b52}</Project>
<Name>Tango.MachineStudio.MachineDesigner</Name>
</ProjectReference>
+ <ProjectReference Include="..\Modules\Tango.MachineStudio.RML\Tango.MachineStudio.RML.csproj">
+ <Project>{d0186ac0-0fcf-4d3b-9619-54812b6e524b}</Project>
+ <Name>Tango.MachineStudio.RML</Name>
+ </ProjectReference>
<ProjectReference Include="..\Modules\Tango.MachineStudio.Stubs\Tango.MachineStudio.Stubs.csproj">
<Project>{22c2aa72-9493-4d0d-b421-8ef9789fb192}</Project>
<Name>Tango.MachineStudio.Stubs</Name>
@@ -579,7 +583,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_UpdateFileVersion="True" BuildVersion_DetectChanges="True" BuildVersion_UseGlobalSettings="False" />
+ <UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
index 215f7afb5..4032c946c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
@@ -149,7 +149,7 @@ namespace Tango.MachineStudio.UI.ViewModels
InvokeUI(() =>
{
- _studioModuleLoader.LoadModules();
+ //_studioModuleLoader.LoadModules();
_navigationManager.NavigateTo(NavigationView.LoginView);
IsLoading = false;
});
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 31b2181ea..cbd58134d 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -47,7 +47,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// Represents the Machine Studio main view, view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel{Tango.MachineStudio.UI.SupervisingController.IMainView}" />
- public class MainViewVM : ViewModel
+ public class MainViewVM : StudioViewModel
{
private IStudioModule _currentModule;
private INavigationManager _navigation;
@@ -296,7 +296,7 @@ namespace Tango.MachineStudio.UI.ViewModels
ConnectCommand = new RelayCommand(ConnectToMachine);
SignoutCommand = new RelayCommand(SignOut);
DisconnectCommand = new RelayCommand(DisconnectFromMachine, (x) => ApplicationManager.IsMachineConnected && !_isDisconnecting);
- OpenModuleInWindowCommand = new RelayCommand<IStudioModule>(OpenModuleInWindow);
+ OpenModuleInWindowCommand = new RelayCommand<IStudioModule>((x) => { OpenModuleInWindow(x); });
ExitCommand = new RelayCommand(ExitApplication);
UpdateCenterCommand = new RelayCommand(NavigateToUpdateCenter);
@@ -671,7 +671,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// Opens the module in a new window.
/// </summary>
/// <param name="module">The module.</param>
- private void OpenModuleInWindow(IStudioModule module)
+ private void OpenModuleInWindow(IStudioModule module, Rect? bounds = null, WindowState? state = null)
{
if (module == null) return;
@@ -697,6 +697,20 @@ namespace Tango.MachineStudio.UI.ViewModels
ModuleWindowVM vm = new ModuleWindowVM(module);
ModuleWindow window = new ModuleWindow(this, vm, view);
+ if (bounds.HasValue)
+ {
+ window.WindowStartupLocation = WindowStartupLocation.Manual;
+ window.WindowState = WindowState.Normal;
+ window.Left = bounds.Value.Left;
+ window.Top = bounds.Value.Top;
+ window.Width = bounds.Value.Width;
+ window.Height = bounds.Value.Height;
+ window.Loaded += (_, __) =>
+ {
+ window.WindowState = state.Value;
+ };
+ }
+
window.Closing += (x, y) =>
{
LogManager.Log(String.Format("Closing module '{0}' on new window...", module.Name));
@@ -847,5 +861,18 @@ namespace Tango.MachineStudio.UI.ViewModels
console.Owner = MainWindow.Instance;
console.Show();
}
+
+ public override void OnApplicationReady()
+ {
+ foreach (var item in SettingsManager.Default.GetOrCreate<MachineStudioSettings>().StudioModulesBounds)
+ {
+ var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name);
+
+ if (module != null && !module.InNewWindow)
+ {
+ OpenModuleInWindow(module, item.Bounds, item.State);
+ }
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
index 26790c67d..4e3de9e60 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml
@@ -110,6 +110,12 @@
<TextBlock Text="{Binding Machine.Organization.Name}" />
<TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
<TextBlock Text="{Binding DeviceInformation.Version}" />
+ <TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
+ <TextBlock>
+ <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
+ </TextBlock>
<TextBlock FontWeight="SemiBold" Text="COM Port:" />
<TextBlock Text="{Binding ComPort}" />
<TextBlock FontWeight="SemiBold" Text="Device:" />
@@ -147,6 +153,14 @@
<TextBlock Text="{Binding Machine.Name}" />
<TextBlock FontWeight="SemiBold" Text="Organization:" />
<TextBlock Text="{Binding Machine.Organization.Name}" />
+ <TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
+ <TextBlock Text="{Binding DeviceInformation.Version}" />
+ <TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
+ <TextBlock>
+ <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
+ <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
+ </TextBlock>
<TextBlock FontWeight="SemiBold" Text="Total Bytes Sent:" />
<TextBlock Text="{Binding Adapter.TotalBytesSent,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
<TextBlock FontWeight="SemiBold" Text="Total Bytes Received:" />
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs
index 625ad7e85..b35e311a9 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs
@@ -38,7 +38,7 @@ namespace Tango.PPC.UI
StartupArgs = e.Args;
- LogManager.RegisterLogger(new ConsoleLogger("Tango PPC Debug"));
+ //LogManager.RegisterLogger(new ConsoleLogger("Tango PPC Debug"));
LogManager.RegisterLogger(new FileLogger());
LogManager.Log("Application Started...");
diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs
index 3d288e470..8eab66c85 100644
--- a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs
+++ b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs
@@ -33,7 +33,8 @@ namespace Tango.BL.Builders
{
return AddStep(2, () =>
{
- Context.ProcessParametersTablesGroups.Where(x => x.RmlGuid == Entity.Guid && x.Active).Include(x => x.ProcessParametersTables).FirstOrDefault();
+ var group = Context.ProcessParametersTablesGroups.Where(x => x.RmlGuid == Entity.Guid && x.Active).FirstOrDefault();
+ Context.ProcessParametersTables.Where(x => x.ProcessParametersTablesGroupGuid == group.Guid).OrderBy(x => x.TableIndex).ToList();
});
}
@@ -57,7 +58,21 @@ namespace Tango.BL.Builders
{
return AddStep(5, () =>
{
- Context.LiquidTypesRmls.Where(x => x.RmlGuid == Entity.Guid).ToList();
+ Context.LiquidTypesRmls.Where(x => x.RmlGuid == Entity.Guid).Include(x => x.LiquidType).ToList();
+ });
+ }
+
+ public virtual RmlBuilder WithMediaProperties()
+ {
+ return AddStep(6, () =>
+ {
+ Context.MediaMaterials.SingleOrDefault(x => x.Guid == Entity.MediaMaterialGuid);
+ Context.MediaColors.SingleOrDefault(x => x.Guid == Entity.MediaColorGuid);
+ Context.MediaPurposes.SingleOrDefault(x => x.Guid == Entity.MediaPurposeGuid);
+ Context.MediaConditions.SingleOrDefault(x => x.Guid == Entity.MediaConditionGuid);
+ Context.LinearMassDensityUnits.SingleOrDefault(x => x.Guid == Entity.LinearMassDensityUnitGuid);
+ Context.FiberShapes.SingleOrDefault(x => x.Guid == Entity.FiberShapeGuid);
+ Context.FiberSynths.SingleOrDefault(x => x.Guid == Entity.FiberSynthGuid);
});
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Dispensing/DispensingCalcBase.cs b/Software/Visual_Studio/Tango.BL/Dispensing/DispensingCalcBase.cs
index 8a85dda6b..cceabb571 100644
--- a/Software/Visual_Studio/Tango.BL/Dispensing/DispensingCalcBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Dispensing/DispensingCalcBase.cs
@@ -53,7 +53,7 @@ namespace Tango.BL.Dispensing
/// <returns></returns>
public virtual double CalculatePulsePerSecond(LiquidVolume liquidVolume)
{
- return (CalculateNanoliterPerSecond(liquidVolume) / liquidVolume.IdsPack.DispenserType.NlPerPulse) * (liquidVolume.DispenserStepDivision != DispenserStepDivisions.Auto ? (double)liquidVolume.DispenserStepDivision.ToInt32() : 1d);
+ return CalculateNanoliterPerSecond(liquidVolume) / liquidVolume.NanoliterPerStep * 8d;
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
index 2464111da..e6ad7b573 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypesRml.cs
@@ -93,6 +93,28 @@ namespace Tango.BL.Entities
}
+ protected Byte[] _defaultcatdata;
+
+ /// <summary>
+ /// Gets or sets the liquidtypesrml default cat data.
+ /// </summary>
+
+ [Column("DEFAULT_CAT_DATA")]
+
+ public Byte[] DefaultCatData
+ {
+ get
+ {
+ return _defaultcatdata;
+ }
+
+ set
+ {
+ _defaultcatdata = value; RaisePropertyChanged(nameof(DefaultCatData));
+ }
+
+ }
+
protected LiquidType _liquidtype;
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs b/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs
new file mode 100644
index 000000000..5ebf86451
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Entities/TechHeater.cs
@@ -0,0 +1,101 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Xml.Serialization;
+using Newtonsoft.Json;
+using System.Linq;
+using Tango.DAL.Remote.DB;
+using Tango.Core;
+
+namespace Tango.BL.Entities
+{
+ [Table("TECH_HEATERS")]
+ public partial class TechHeater : ObservableEntity<TechHeater>
+ {
+
+ protected Int32 _code;
+
+ /// <summary>
+ /// Gets or sets the techheater code.
+ /// </summary>
+
+ [Column("CODE")]
+
+ public Int32 Code
+ {
+ get
+ {
+ return _code;
+ }
+
+ set
+ {
+ _code = value; RaisePropertyChanged(nameof(Code));
+ }
+
+ }
+
+ protected String _name;
+
+ /// <summary>
+ /// Gets or sets the techheater name.
+ /// </summary>
+
+ [Column("NAME")]
+
+ public String Name
+ {
+ get
+ {
+ return _name;
+ }
+
+ set
+ {
+ _name = value; RaisePropertyChanged(nameof(Name));
+ }
+
+ }
+
+ protected String _description;
+
+ /// <summary>
+ /// Gets or sets the techheater description.
+ /// </summary>
+
+ [Column("DESCRIPTION")]
+
+ public String Description
+ {
+ get
+ {
+ return _description;
+ }
+
+ set
+ {
+ _description = value; RaisePropertyChanged(nameof(Description));
+ }
+
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TechHeater" /> class.
+ /// </summary>
+ public TechHeater() : base()
+ {
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
index 777f3f202..88ec381c4 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
@@ -319,11 +319,19 @@ namespace Tango.BL.Entities
return (int)typeof(BrushStop).GetProperty("V" + packIndex + "Div").GetValue(this);
}
- public void SetDispensingDivision(int packIndex,int division)
+ public void SetDispensingDivision(int packIndex, int division)
{
typeof(BrushStop).GetProperty("V" + packIndex + "Div").SetValue(this, division);
}
+ public void SetAllDispensingStepDivisions(Dispensing.DispenserStepDivisions division)
+ {
+ for (int i = 0; i < 8; i++)
+ {
+ typeof(BrushStop).GetProperty("V" + i + "Div").SetValue(this, (int)division);
+ }
+ }
+
public void SetStopIndex(int index)
{
_stopindex = index;
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
index d71658317..9ec711857 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
@@ -488,6 +488,7 @@ namespace Tango.BL.Entities
{
IsInterSegment = true,
Length = length,
+ Name = "Inter Segment",
BrushStops = new SynchronizedObservableCollection<BrushStop>()
{
new BrushStop()
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs
new file mode 100644
index 000000000..c4ccb4ab6
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/LiquidTypesRml.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PMR.ColorLab;
+
+namespace Tango.BL.Entities
+{
+ public partial class LiquidTypesRml
+ {
+ public CalibrationData GetCalibrationData()
+ {
+ return CalibrationData.Parser.ParseFrom(DefaultCatData);
+ }
+
+ public void PutCalibrationData(CalibrationData data)
+ {
+ DefaultCatData = data.ToBytes();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs
index 653f0cf07..e2c919938 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs
@@ -83,6 +83,24 @@ namespace Tango.BL.Entities
set { _remainingTime = value; RaisePropertyChangedAuto(); }
}
+ private TimeSpan _estimatedDuration;
+ [NotMapped]
+ [JsonIgnore]
+ public TimeSpan EstimatedDuration
+ {
+ get { return _estimatedDuration; }
+ set { _estimatedDuration = value; }
+ }
+
+ private double _progress;
+ [NotMapped]
+ [JsonIgnore]
+ public double Progress
+ {
+ get { return _progress; }
+ set { _progress = value; RaisePropertyChangedAuto(); }
+ }
+
private bool _started;
[NotMapped]
[JsonIgnore]
@@ -278,5 +296,19 @@ namespace Tango.BL.Entities
return stop;
}
+
+ /// <summary>
+ /// Gets the duration estimation for this job.
+ /// </summary>
+ /// <param name="processParameters">The process parameters.</param>
+ /// <returns></returns>
+ public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters)
+ {
+ if (processParameters.DyeingSpeed == 0)
+ {
+ throw new ArgumentException("Process parameters dying speed cannot be zero.");
+ }
+ return TimeSpan.FromSeconds(Length / (processParameters.DyeingSpeed / 100d));
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs
index 7d1b7cda3..b4fc2b82a 100644
--- a/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs
+++ b/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs
@@ -908,6 +908,12 @@ namespace Tango.BL.Enumerations
MotorDispenser7UnderVoltage = 155,
/// <summary>
+ /// ( Motor Dispenser 8 Under Voltage)
+ /// </summary>
+ [Description(" Motor Dispenser 8 Under Voltage")]
+ MotorDispenser8UnderVoltage = 156,
+
+ /// <summary>
/// (Occurs a request has been sent to the machine or external bridge service)
/// </summary>
[Description("Occurs a request has been sent to the machine or external bridge service")]
diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TechHeaters.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TechHeaters.cs
index 075422bb7..45e72beee 100644
--- a/Software/Visual_Studio/Tango.BL/Enumerations/TechHeaters.cs
+++ b/Software/Visual_Studio/Tango.BL/Enumerations/TechHeaters.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Tango Observables Generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated. Do not modify!
+// </auto-generated>
+//------------------------------------------------------------------------------
+
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -8,5 +18,42 @@ namespace Tango.BL.Enumerations
{
public enum TechHeaters
{
+
+ /// <summary>
+ /// (Heater Zone 1)
+ /// </summary>
+ [Description("Heater Zone 1")]
+ HeaterZone1 = 0,
+
+ /// <summary>
+ /// (Heater Zone 2)
+ /// </summary>
+ [Description("Heater Zone 2")]
+ HeaterZone2 = 1,
+
+ /// <summary>
+ /// (Heater Zone 3)
+ /// </summary>
+ [Description("Heater Zone 3")]
+ HeaterZone3 = 2,
+
+ /// <summary>
+ /// (Heater Zone 4)
+ /// </summary>
+ [Description("Heater Zone 4")]
+ HeaterZone4 = 3,
+
+ /// <summary>
+ /// (Heater Zone 5)
+ /// </summary>
+ [Description("Heater Zone 5")]
+ HeaterZone5 = 4,
+
+ /// <summary>
+ /// (Heater Zone 6)
+ /// </summary>
+ [Description("Heater Zone 6")]
+ HeaterZone6 = 5,
+
}
}
diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
index b32db4a79..b44c5c554 100644
--- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
+++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
@@ -70,7 +70,7 @@ namespace Tango.BL
public DispenserStepDivisions DispenserStepDivision
{
get { return (DispenserStepDivisions)BrushStop.GetDispensingDivision(IdsPack.PackIndex); }
- set { BrushStop.SetDispensingDivision(IdsPack.PackIndex, (int)value); RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(PulsePerSecond)); }
+ set { BrushStop.SetDispensingDivision(IdsPack.PackIndex, (int)value); RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(PulsePerSecond)); RaisePropertyChanged(nameof(NanoliterPerStep)); }
}
public void Invalidate()
@@ -98,6 +98,7 @@ namespace Tango.BL
RaisePropertyChanged(nameof(PulsePerSecond));
RaisePropertyChanged(nameof(NanoliterPerCentimeter));
RaisePropertyChanged(nameof(Volume));
+ RaisePropertyChanged(nameof(NanoliterPerStep));
}
}
@@ -176,6 +177,15 @@ namespace Tango.BL
}
}
+ [JsonIgnore]
+ public double NanoliterPerStep
+ {
+ get
+ {
+ return (IdsPack.DispenserType.NlPerPulse / ((double)(DispenserStepDivision != DispenserStepDivisions.Auto ? DispenserStepDivision : DispenserStepDivisions.D8) / 8d));
+ }
+ }
+
public LiquidVolume Clone(BrushStop stop)
{
LiquidVolume cloned = new LiquidVolume(Configuration, IdsPack, RML, ProcessParametersTable, stop);
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
index b9c11fc8d..0c8557173 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs
@@ -575,6 +575,14 @@ namespace Tango.BL
}
/// <summary>
+ /// Gets or sets the TechHeaters.
+ /// </summary>
+ public DbSet<TechHeater> TechHeaters
+ {
+ get; set;
+ }
+
+ /// <summary>
/// Gets or sets the TechIos.
/// </summary>
public DbSet<TechIo> TechIos
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
index 9d564192e..dbe06364a 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs
@@ -2501,6 +2501,42 @@ namespace Tango.BL
}
+ private ObservableCollection<TechHeater> _techheaters;
+ /// <summary>
+ /// Gets or sets the TechHeaters.
+ /// </summary>
+ public ObservableCollection<TechHeater> TechHeaters
+ {
+ get
+ {
+ return _techheaters;
+ }
+
+ set
+ {
+ _techheaters = value; RaisePropertyChanged(nameof(TechHeaters));
+ }
+
+ }
+
+ private ICollectionView _techheatersViewSource;
+ /// <summary>
+ /// Gets or sets the TechHeaters View Source.
+ ///</summary>
+ public ICollectionView TechHeatersViewSource
+ {
+ get
+ {
+ return _techheatersViewSource;
+ }
+
+ set
+ {
+ _techheatersViewSource = value; RaisePropertyChanged(nameof(TechHeatersViewSource));
+ }
+
+ }
+
private ObservableCollection<TechIo> _techios;
/// <summary>
/// Gets or sets the TechIos.
@@ -2861,6 +2897,8 @@ namespace Tango.BL
TechDispensersViewSource = CreateCollectionView(TechDispensers);
+ TechHeatersViewSource = CreateCollectionView(TechHeaters);
+
TechIosViewSource = CreateCollectionView(TechIos);
TechMonitorsViewSource = CreateCollectionView(TechMonitors);
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollections.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollections.cs
index 4820c784b..c6b120ea4 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollections.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollections.cs
@@ -78,6 +78,7 @@ namespace Tango.BL
TechIos = db.TechIos.ToObservableCollection();
TechMonitors = db.TechMonitors.ToObservableCollection();
TechValves = db.TechValves.ToObservableCollection();
+ TechHeaters = db.TechHeaters.ToObservableCollection();
Machines = db.Machines.Include(x => x.Organization).ToObservableCollection();
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs
index 38db29aab..911a6421e 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs
@@ -2501,6 +2501,42 @@ namespace Tango.BL
}
+ private ObservableCollection<TechHeater> _techheaters;
+ /// <summary>
+ /// Gets or sets the TechHeaters.
+ /// </summary>
+ public ObservableCollection<TechHeater> TechHeaters
+ {
+ get
+ {
+ return _techheaters;
+ }
+
+ set
+ {
+ _techheaters = value; RaisePropertyChanged(nameof(TechHeaters));
+ }
+
+ }
+
+ private ICollectionView _techheatersViewSource;
+ /// <summary>
+ /// Gets or sets the TechHeaters View Source.
+ ///</summary>
+ public ICollectionView TechHeatersViewSource
+ {
+ get
+ {
+ return _techheatersViewSource;
+ }
+
+ set
+ {
+ _techheatersViewSource = value; RaisePropertyChanged(nameof(TechHeatersViewSource));
+ }
+
+ }
+
private ObservableCollection<TechIo> _techios;
/// <summary>
/// Gets or sets the TechIos.
@@ -2861,6 +2897,8 @@ namespace Tango.BL
TechDispensersViewSource = CreateCollectionView(TechDispensers);
+ TechHeatersViewSource = CreateCollectionView(TechHeaters);
+
TechIosViewSource = CreateCollectionView(TechIos);
TechMonitorsViewSource = CreateCollectionView(TechMonitors);
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index a9894d79c..c2d368160 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -111,6 +111,7 @@
<Compile Include="Dispensing\TransparentLiquidDispensingCalc.cs" />
<Compile Include="EntitiesExtensions\Contact.cs" />
<Compile Include="EntitiesExtensions\LiquidType.cs" />
+ <Compile Include="EntitiesExtensions\LiquidTypesRml.cs" />
<Compile Include="EntitiesExtensions\MachineEvent.cs" />
<Compile Include="EntitiesExtensions\ProcessParametersTablesGroup.cs" />
<Compile Include="Entities\Customer.cs" />
@@ -126,6 +127,7 @@
<Compile Include="Entities\Sysdiagram.cs" />
<Compile Include="Entities\TangoVersion.cs" />
<Compile Include="Entities\TechController.cs" />
+ <Compile Include="Entities\TechHeater.cs" />
<Compile Include="Enumerations\ActionTypes.cs" />
<Compile Include="Enumerations\ColorCatalogs.cs" />
<Compile Include="Enumerations\DancerTypes.cs" />
diff --git a/Software/Visual_Studio/Tango.CSV/CsvFile.cs b/Software/Visual_Studio/Tango.CSV/CsvFile.cs
index 8a908b6d8..d180f0139 100644
--- a/Software/Visual_Studio/Tango.CSV/CsvFile.cs
+++ b/Software/Visual_Studio/Tango.CSV/CsvFile.cs
@@ -19,6 +19,8 @@ namespace Tango.CSV
/// <seealso cref="System.IDisposable" />
public class CsvFile : IDisposable
{
+ protected bool _is_disposed;
+
internal protected Stream BaseStream;
protected static DateTime DateTimeZero = new DateTime();
@@ -190,6 +192,7 @@ namespace Tango.CSV
{
if (disposing)
{
+ _is_disposed = true;
// free managed resources
addAsyncTask.Wait();
if (csvLinesToWrite != null)
@@ -243,15 +246,17 @@ namespace Tango.CSV
/// <param name="record">The record.</param>
public void Append(T record)
{
-
if (CsvFile.UseTasks)
{
var linesWaiting = Interlocked.Increment(ref this.linesToWrite);
Action<Task> addRecord = (t) =>
{
- var csvLine = this.ToCsv(record);
- this.csvLinesToWrite.Add(csvLine);
+ if (!_is_disposed)
+ {
+ var csvLine = this.ToCsv(record);
+ this.csvLinesToWrite.Add(csvLine);
+ }
};
if (linesWaiting < 10000)
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs
index 782f70d6c..dd0425502 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs
@@ -20,6 +20,7 @@ namespace Tango.DAL.Remote.DB
public string LIQUID_TYPE_GUID { get; set; }
public string RML_GUID { get; set; }
public double MAX_NL_PER_CM { get; set; }
+ public byte[] DEFAULT_CAT_DATA { get; set; }
public virtual LIQUID_TYPES LIQUID_TYPES { get; set; }
public virtual RML RML { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
index 4e056c513..a20e01387 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs
@@ -94,6 +94,7 @@ namespace Tango.DAL.Remote.DB
public virtual DbSet<TANGO_VERSIONS> TANGO_VERSIONS { get; set; }
public virtual DbSet<TECH_CONTROLLERS> TECH_CONTROLLERS { get; set; }
public virtual DbSet<TECH_DISPENSERS> TECH_DISPENSERS { get; set; }
+ public virtual DbSet<TECH_HEATERS> TECH_HEATERS { get; set; }
public virtual DbSet<TECH_IOS> TECH_IOS { get; set; }
public virtual DbSet<TECH_MONITORS> TECH_MONITORS { get; set; }
public virtual DbSet<TECH_VALVES> TECH_VALVES { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
index 7942f3f2b..307e09764 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -661,6 +661,7 @@
<Property Name="LIQUID_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
<Property Name="RML_GUID" Type="varchar" MaxLength="36" Nullable="false" />
<Property Name="MAX_NL_PER_CM" Type="float" Nullable="false" />
+ <Property Name="DEFAULT_CAT_DATA" Type="image" />
</EntityType>
<EntityType Name="MACHINE_STUDIO_VERSIONS">
<Key>
@@ -983,6 +984,17 @@
<Property Name="NAME" Type="varchar" MaxLength="100" Nullable="false" />
<Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" />
</EntityType>
+ <EntityType Name="TECH_HEATERS">
+ <Key>
+ <PropertyRef Name="GUID" />
+ </Key>
+ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+ <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" />
+ <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" />
+ <Property Name="CODE" Type="int" Nullable="false" />
+ <Property Name="NAME" Type="varchar" MaxLength="100" Nullable="false" />
+ <Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" />
+ </EntityType>
<EntityType Name="TECH_IOS">
<Key>
<PropertyRef Name="GUID" />
@@ -2209,6 +2221,7 @@
<EntitySet Name="TANGO_VERSIONS" EntityType="Self.TANGO_VERSIONS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_CONTROLLERS" EntityType="Self.TECH_CONTROLLERS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_DISPENSERS" EntityType="Self.TECH_DISPENSERS" Schema="dbo" store:Type="Tables" />
+ <EntitySet Name="TECH_HEATERS" EntityType="Self.TECH_HEATERS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_IOS" EntityType="Self.TECH_IOS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_MONITORS" EntityType="Self.TECH_MONITORS" Schema="dbo" store:Type="Tables" />
<EntitySet Name="TECH_VALVES" EntityType="Self.TECH_VALVES" Schema="dbo" store:Type="Tables" />
@@ -2622,6 +2635,7 @@
<EntitySet Name="TANGO_VERSIONS" EntityType="RemoteModel.TANGO_VERSIONS" />
<EntitySet Name="TECH_CONTROLLERS" EntityType="RemoteModel.TECH_CONTROLLERS" />
<EntitySet Name="TECH_DISPENSERS" EntityType="RemoteModel.TECH_DISPENSERS" />
+ <EntitySet Name="TECH_HEATERS" EntityType="RemoteModel.TECH_HEATERS" />
<EntitySet Name="TECH_IOS" EntityType="RemoteModel.TECH_IOS" />
<EntitySet Name="TECH_MONITORS" EntityType="RemoteModel.TECH_MONITORS" />
<EntitySet Name="TECH_VALVES" EntityType="RemoteModel.TECH_VALVES" />
@@ -3722,6 +3736,7 @@
<Property Name="LIQUID_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
<Property Name="RML_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
<Property Name="MAX_NL_PER_CM" Type="Double" Nullable="false" />
+ <Property Name="DEFAULT_CAT_DATA" Type="Binary" MaxLength="Max" FixedLength="false" />
<NavigationProperty Name="LIQUID_TYPES" Relationship="RemoteModel.FK_LIQUID_TYPES_RMLS_LIQUID_TYPES" FromRole="LIQUID_TYPES_RMLS" ToRole="LIQUID_TYPES" />
<NavigationProperty Name="RML" Relationship="RemoteModel.FK_LIQUID_TYPES_RMLS_RMLS" FromRole="LIQUID_TYPES_RMLS" ToRole="RML" />
</EntityType>
@@ -4094,6 +4109,17 @@
<Property Name="NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
<Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
</EntityType>
+ <EntityType Name="TECH_HEATERS">
+ <Key>
+ <PropertyRef Name="GUID" />
+ </Key>
+ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+ <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" />
+ <Property Name="CODE" Type="Int32" Nullable="false" />
+ <Property Name="NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
+ <Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
+ </EntityType>
<EntityType Name="TECH_IOS">
<Key>
<PropertyRef Name="GUID" />
@@ -5969,6 +5995,7 @@
<EntitySetMapping Name="LIQUID_TYPES_RMLS">
<EntityTypeMapping TypeName="RemoteModel.LIQUID_TYPES_RMLS">
<MappingFragment StoreEntitySet="LIQUID_TYPES_RMLS">
+ <ScalarProperty Name="DEFAULT_CAT_DATA" ColumnName="DEFAULT_CAT_DATA" />
<ScalarProperty Name="MAX_NL_PER_CM" ColumnName="MAX_NL_PER_CM" />
<ScalarProperty Name="RML_GUID" ColumnName="RML_GUID" />
<ScalarProperty Name="LIQUID_TYPE_GUID" ColumnName="LIQUID_TYPE_GUID" />
@@ -6314,6 +6341,18 @@
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
+ <EntitySetMapping Name="TECH_HEATERS">
+ <EntityTypeMapping TypeName="RemoteModel.TECH_HEATERS">
+ <MappingFragment StoreEntitySet="TECH_HEATERS">
+ <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" />
+ <ScalarProperty Name="NAME" ColumnName="NAME" />
+ <ScalarProperty Name="CODE" ColumnName="CODE" />
+ <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
+ <ScalarProperty Name="GUID" ColumnName="GUID" />
+ <ScalarProperty Name="ID" ColumnName="ID" />
+ </MappingFragment>
+ </EntityTypeMapping>
+ </EntitySetMapping>
<EntitySetMapping Name="TECH_IOS">
<EntityTypeMapping TypeName="RemoteModel.TECH_IOS">
<MappingFragment StoreEntitySet="TECH_IOS">
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
index 49224a7c9..c55d6bcf2 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,80 +5,81 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1">
- <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="5.25" PointY="1.25" />
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="0.75" PointY="55.375" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="0.75" PointY="44.25" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="38.5" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="0.75" PointY="41.375" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="18.5" />
- <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="3" PointY="32.5" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="19.5" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="40.5" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="13.5" PointY="25.625" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="3" PointY="47" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3" PointY="40.75" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="0.75" PointY="59.625" />
- <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="26.5" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="3" PointY="26.125" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="35.5" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="5.25" PointY="4.375" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="7.5" PointY="3.25" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="3" PointY="8.5" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="3" PointY="5.375" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="12.5" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="26.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="3.75" PointY="65.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="6" PointY="51.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="5.75" PointY="36.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="8" PointY="39.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.75" PointY="69.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="9" PointY="55.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="7.75" PointY="61.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="10" PointY="43.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="9.75" PointY="65.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="12" PointY="52" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="6.75" PointY="65.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="9" PointY="51.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="47.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="3.75" PointY="69.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6" PointY="55.625" />
- <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="3" PointY="2.125" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="3" PointY="62.5" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="5.25" PointY="29.75" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="13.5" PointY="18.125" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="16.375" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="23.375" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="12.625" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="19.875" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="7.5" PointY="9.75" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3" PointY="36.5" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="5.25" PointY="12" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="10.5" PointY="12.875" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="7.5" PointY="13.375" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="32.125" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="20" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="15.375" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="29.25" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="3" PointY="29.375" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3" PointY="57.5" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="8.25" PointY="6.625" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="44.625" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="46.125" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="17.125" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="8.25" PointY="34.625" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="10.5" PointY="34.625" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="13.5" PointY="21.375" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="50.625" />
- <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="9.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="7.5" PointY="30" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="10.75" PointY="3.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="10.75" PointY="7.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="12.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="12.75" PointY="5.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="12.75" PointY="10.75" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="5.25" PointY="23.625" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="10.5" PointY="29.625" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="23.375" />
+ <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="13.25" PointY="27.125" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="5.75" PointY="32.625" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="5.75" PointY="56.75" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="53.75" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="5.75" PointY="66.75" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="17" PointY="19" />
+ <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="8" PointY="72.5" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="23.125" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="48.875" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="14.75" PointY="35.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8" PointY="34.875" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="8" PointY="59" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="5.75" PointY="28.625" />
+ <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="10.25" PointY="12.875" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="8" PointY="75.375" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="63.875" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="13.25" PointY="30.25" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="15.5" PointY="31.125" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="11" PointY="31" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="11" PointY="27.875" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="21.625" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="31.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="8.75" PointY="49.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="11" PointY="54.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="11.75" PointY="51.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="14" PointY="53.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="8.75" PointY="79.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="11" PointY="59.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="11.75" PointY="69.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="14" PointY="57.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="5.75" PointY="45.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="8" PointY="52.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="5.75" PointY="70.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="8" PointY="64.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="5.75" PointY="59.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="8.75" PointY="83.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="11" PointY="65" />
+ <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="11" PointY="34.125" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="8" PointY="14" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="10.25" PointY="43.75" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="14.75" PointY="18.625" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="12.5" PointY="16.875" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="14.125" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="28.25" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="24.375" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="15.5" PointY="8.5" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="8" PointY="38.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="10.25" PointY="16.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="12.5" PointY="13.5" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="15.5" PointY="14" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="28.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="17" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="34.125" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="8" PointY="69.375" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="8" PointY="30.875" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="16.25" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="17.75" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="19.25" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.75" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="16.25" PointY="4.625" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="18.5" PointY="4.75" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="14.75" PointY="21.875" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="8" PointY="42.125" />
+ <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="19.5" PointY="23" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="0.75" PointY="6.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="2.75" PointY="6.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="4.75" PointY="5.25" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="6.75" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="13.25" PointY="7.75" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="18.5" PointY="8.625" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="10.25" PointY="9" />
<AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" />
<AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs
new file mode 100644
index 000000000..b37a0c5a1
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_HEATERS.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.DAL.Remote.DB
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class TECH_HEATERS
+ {
+ public int ID { get; set; }
+ public string GUID { get; set; }
+ public System.DateTime LAST_UPDATED { get; set; }
+ public int CODE { get; set; }
+ public string NAME { get; set; }
+ public string DESCRIPTION { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
index c242d3837..a6fdd02d0 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
+++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
@@ -288,6 +288,9 @@
<Compile Include="DB\TECH_DISPENSERS.cs">
<DependentUpon>RemoteADO.tt</DependentUpon>
</Compile>
+ <Compile Include="DB\TECH_HEATERS.cs">
+ <DependentUpon>RemoteADO.tt</DependentUpon>
+ </Compile>
<Compile Include="DB\TECH_IOS.cs">
<DependentUpon>RemoteADO.tt</DependentUpon>
</Compile>
@@ -356,7 +359,7 @@
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml
index 19db3992d..3d1bedc46 100644
--- a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml
+++ b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml
@@ -7,7 +7,7 @@
xmlns:converters="clr-namespace:Tango.Editors.Converters"
xmlns:core="clr-namespace:Tango.Editors"
mc:Ignorable="d"
- x:Name="editor" Foreground="White" Background="#151515" FontSize="8" FocusVisualStyle="{x:Null}">
+ x:Name="editor" FontSize="8" FocusVisualStyle="{x:Null}">
<UserControl.Resources>
@@ -129,7 +129,7 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <Grid Background="{Binding ElementName=editor,Path=EditorBackground,FallbackValue={StaticResource EditorBackground},TargetNullValue={StaticResource EditorBackground}}">
+ <Grid Background="{Binding ElementName=editor,Path=EditorBackground}">
<Border BorderBrush="{Binding ElementName=editor,Path=Foreground}" BorderThickness="0 0 1 1" Background="Transparent" PreviewMouseUp="OnResetScaleFactor" Cursor="Hand" ToolTip="Reset">
<Viewbox Margin="5">
<Path Fill="{Binding ElementName=editor,Path=Foreground}" Data="M533.333 0v216.667L450 133.333l-100 100l-50-50l100-100L316.667 0H533.333z M233.333 350l-100 100l83.333 83.333H0 V316.667L83.333 400l100-100L233.333 350z"></Path>
@@ -137,13 +137,13 @@
</Border>
</Grid>
- <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" ClipToBounds="True" Background="{Binding ElementName=editor,Path=RulerBackground,FallbackValue={StaticResource RulerBackground},TargetNullValue={StaticResource RulerBackground}}" BorderThickness="0 0 0 1" BorderBrush="{Binding ElementName=editor,Path=Foreground}">
- <local:PixelRuler HorizontalAlignment="Left" Width="{Binding ElementName=gridInnerScrollViewer,Path=ActualWidth}" MinWidth="{Binding ElementName=scrollViewer,Path=ViewportWidth}" AutoSize="True" Marks="Down" Foreground="{Binding ElementName=editor,Path=Foreground}"
+ <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" ClipToBounds="True" Background="{Binding ElementName=editor,Path=RulerBackground}" BorderThickness="0 0 0 1" BorderBrush="{Binding ElementName=editor,Path=Foreground}">
+ <local:PixelRuler HorizontalAlignment="Left" Width="{Binding ElementName=gridInnerScrollViewer,Path=ActualWidth}" MinWidth="{Binding ElementName=scrollViewer,Path=ViewportWidth}" AutoSize="True" Marks="Down" Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=Foreground}"
Zoom="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=ScaleFactor}"
Margin="{Binding ElementName=scrollViewer,Path=HorizontalOffset,Converter={StaticResource HorizontalOffsetToMarginConverter},ConverterParameter='left'}">
</local:PixelRuler>
</Border>
- <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" ClipToBounds="True" Background="{Binding ElementName=editor,Path=RulerBackground,FallbackValue={StaticResource RulerBackground},TargetNullValue={StaticResource RulerBackground}}" BorderThickness="0 0 1 0" BorderBrush="{Binding ElementName=editor,Path=Foreground}">
+ <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" ClipToBounds="True" Background="{Binding ElementName=editor,Path=RulerBackground}" BorderThickness="0 0 1 0" BorderBrush="{Binding ElementName=editor,Path=Foreground}">
<local:PixelRuler VerticalAlignment="Top" Width="{Binding ElementName=gridInnerScrollViewer,Path=ActualHeight}" MinWidth="{Binding ElementName=scrollViewer,Path=ViewportHeight}" AutoSize="True" Orientation="Horizontal" Foreground="{Binding ElementName=editor,Path=Foreground}"
Zoom="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=ScaleFactor}"
Margin="{Binding ElementName=scrollViewer,Path=VerticalOffset,Converter={StaticResource HorizontalOffsetToMarginConverter},ConverterParameter='top'}">
@@ -181,7 +181,7 @@
</Style>
</local:CustomScrollViewer.Resources>
<Grid x:Name="gridInnerScrollViewer">
- <Grid x:Name="gridCanvas" HorizontalAlignment="Left" VerticalAlignment="Top" Background="{Binding ElementName=editor,Path=EditorBackground,FallbackValue={StaticResource EditorBackground},TargetNullValue={StaticResource EditorBackground}}">
+ <Grid x:Name="gridCanvas" HorizontalAlignment="Left" VerticalAlignment="Top" Background="{Binding ElementName=editor,Path=EditorBackground}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=EditorWidth,FallbackValue=1280}"></Setter>
diff --git a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
index e32ae6dd3..42eacd9d0 100644
--- a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
+++ b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
@@ -72,7 +72,7 @@ namespace Tango.Editors
public ElementsEditor()
{
//Initialize Collections
- Elements = new ObservableCollection<IElementEditor>();
+ //Elements = new ObservableCollection<IElementEditor>();
SelectedElements = new ObservableCollection<IElementEditor>();
InitializeComponent();
@@ -98,7 +98,7 @@ namespace Tango.Editors
}
#endregion
-
+
#region Properties
public BitmapSource PreviewImage
@@ -337,7 +337,7 @@ namespace Tango.Editors
set { SetValue(RulerBackgroundProperty, value); }
}
public static readonly DependencyProperty RulerBackgroundProperty =
- DependencyProperty.Register("RulerBackground", typeof(Brush), typeof(ElementsEditor), new PropertyMetadata(null));
+ DependencyProperty.Register("RulerBackground", typeof(Brush), typeof(ElementsEditor), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
/// <summary>
/// Gets or sets the editor background.
@@ -348,7 +348,7 @@ namespace Tango.Editors
set { SetValue(EditorBackgroundProperty, value); }
}
public static readonly DependencyProperty EditorBackgroundProperty =
- DependencyProperty.Register("EditorBackground", typeof(Brush), typeof(ElementsEditor), new PropertyMetadata(null));
+ DependencyProperty.Register("EditorBackground", typeof(Brush), typeof(ElementsEditor), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
/// <summary>
/// Gets or sets the selection fill brush.
@@ -359,7 +359,7 @@ namespace Tango.Editors
set { SetValue(SelectionFillBrushProperty, value); }
}
public static readonly DependencyProperty SelectionFillBrushProperty =
- DependencyProperty.Register("SelectionFillBrush", typeof(Brush), typeof(ElementsEditor), new PropertyMetadata(null));
+ DependencyProperty.Register("SelectionFillBrush", typeof(Brush), typeof(ElementsEditor), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
/// <summary>
/// Gets or sets the selection stroke brush.
@@ -370,7 +370,7 @@ namespace Tango.Editors
set { SetValue(SelectionStrokeBrushProperty, value); }
}
public static readonly DependencyProperty SelectionStrokeBrushProperty =
- DependencyProperty.Register("SelectionStrokeBrush", typeof(Brush), typeof(ElementsEditor), new PropertyMetadata(null));
+ DependencyProperty.Register("SelectionStrokeBrush", typeof(Brush), typeof(ElementsEditor), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
#endregion
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index bac8ceb90..46b4b6cf1 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -53,11 +53,13 @@ namespace Tango.Emulations.Emulators
private List<DigitalInterfaceState> _digitalOutputPinsStates;
private List<DigitalInterfaceState> _digitalInputPinsStates;
private List<ValueComponentState> _componentsStates;
+ private List<HeaterState> _heater_states;
private List<ContinousResponseToken> _continousResponseTokens;
public List<MachineEventState> EventsStates { get; set; }
private bool _diagnostics_enabled;
private bool _debug_logs_enabled;
private bool _events_enabled;
+ private List<SetBlowerStateRequest> _blower_states;
#region Properties
@@ -108,6 +110,8 @@ namespace Tango.Emulations.Emulators
{
EventsStates = MachineEventState.GetAllEventsStates();
+ _blower_states = new List<SetBlowerStateRequest>();
+ _heater_states = new List<HeaterState>();
_continousResponseTokens = new List<ContinousResponseToken>();
_motorJoggingRequestTypes = new List<PMR.Hardware.HardwareMotorType>();
_motorHomingRequestCodes = new List<PMR.Hardware.HardwareMotorType>();
@@ -138,6 +142,22 @@ namespace Tango.Emulations.Emulators
});
}
+ foreach (var item in adapter.TechHeaters)
+ {
+ _heater_states.Add(new HeaterState()
+ {
+ HeaterType = (HeaterType)item.Code,
+ });
+ }
+
+ foreach (var item in adapter.HardwareBlowerTypes)
+ {
+ _blower_states.Add(new SetBlowerStateRequest()
+ {
+ BlowerType = (PMR.Hardware.HardwareBlowerType)item.Code,
+ });
+ }
+
ResetGraphFactors();
}
@@ -261,6 +281,12 @@ namespace Tango.Emulations.Emulators
case MessageType.StubFpgaWriteRegRequest:
HandleResetRequest(MessageFactory.ParseTangoMessageFromContainer<StubFpgaWriteRegRequest>(container));
break;
+ case MessageType.SetHeaterStateRequest:
+ HandleSetHeaterStateRequest(MessageFactory.ParseTangoMessageFromContainer<SetHeaterStateRequest>(container));
+ break;
+ case MessageType.SetBlowerStateRequest:
+ HandleSetBlowerStateRequest(MessageFactory.ParseTangoMessageFromContainer<SetBlowerStateRequest>(container));
+ break;
}
}
@@ -318,7 +344,13 @@ namespace Tango.Emulations.Emulators
{
value++;
monitors.Dancer1Angle.Add((int)(150 + _graphAmplitude * Math.Sin(2 * 3.14 * ((int)_graphFrequency) * value)));
- monitors.BlowerVoltage.Add((int)(150 + _graphAmplitude * Math.Sin(2 * 3.14 * ((int)_graphFrequency) * value)));
+ }
+
+ var blower_state = _blower_states.FirstOrDefault();
+
+ if (blower_state != null)
+ {
+ monitors.BlowerVoltage.Add(blower_state.IsActive ? blower_state.Voltage : 0);
}
monitors.Dancer2Angle.Add(Cursor.Position.Y);
@@ -353,6 +385,7 @@ namespace Tango.Emulations.Emulators
res.DigitalInterfaceStates.AddRange(_digitalOutputPinsStates.Concat(_digitalInputPinsStates));
res.ComponentsStates.AddRange(_componentsStates);
+ res.HeatersStates.AddRange(_heater_states);
Transporter.SendResponse<StartDiagnosticsResponse>(res, request.Container.Token);
@@ -740,6 +773,9 @@ namespace Tango.Emulations.Emulators
Version = "1.0.0.0",
BuildDate = DateTime.Now.ToString(),
Name = "Machine Emulator",
+ FPGA1Version = "1.1",
+ FPGA2Version = "2.2",
+ FPGA3Version = "3.3"
},
}, request.Container.Token, null, request.Message.Password == "1234" ? ErrorCode.None : ErrorCode.UnauthorizedConnection);
}
@@ -761,6 +797,60 @@ namespace Tango.Emulations.Emulators
Transporter.SendResponse<StubFpgaWriteRegResponse>(new StubFpgaWriteRegResponse(), request.Container.Token);
}
+ private void HandleSetHeaterStateRequest(TangoMessage<SetHeaterStateRequest> request)
+ {
+ var heater = _heater_states.SingleOrDefault(x => x.HeaterType == request.Message.HeaterType);
+
+ if (heater != null)
+ {
+ double startValue = heater.CurrentValue;
+ double targetValue = request.Message.SetPoint;
+
+ Task.Factory.StartNew(() =>
+ {
+ heater.IsRampingUp = true;
+ heater.IsActive = true;
+ heater.IsInSetPoint = false;
+
+ if (targetValue > startValue)
+ {
+ while (heater.CurrentValue < targetValue)
+ {
+ heater.CurrentValue++;
+ Thread.Sleep(30);
+ }
+ }
+ else
+ {
+ while (heater.CurrentValue > targetValue)
+ {
+ heater.CurrentValue--;
+ Thread.Sleep(30);
+ }
+ }
+
+ heater.IsRampingUp = false;
+ heater.IsActive = false;
+ heater.IsInSetPoint = true;
+ });
+ }
+
+ Transporter.SendResponse<SetHeaterStateResponse>(new SetHeaterStateResponse(), request.Container.Token);
+ }
+
+ private void HandleSetBlowerStateRequest(TangoMessage<SetBlowerStateRequest> request)
+ {
+ var blower_state = _blower_states.FirstOrDefault();
+
+ if (blower_state != null)
+ {
+ blower_state.Voltage = request.Message.Voltage;
+ blower_state.IsActive = request.Message.IsActive;
+ }
+
+ Transporter.SendResponse<SetBlowerStateResponse>(new SetBlowerStateResponse(), request.Container.Token);
+ }
+
#endregion
#region Public Methods
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index 11b57fcc8..01de74f5d 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -266,6 +266,23 @@ namespace Tango.Integration.Operation
Task<SetComponentValueResponse> SetComponentValue(SetComponentValueRequest request);
/// <summary>
+ /// Sets the state of the specified heater type.
+ /// </summary>
+ /// <param name="heater">The heater.</param>
+ /// <param name="setPoint">Set point temperature.</param>
+ /// <returns></returns>
+ Task<SetHeaterStateResponse> SetHeaterState(HeaterType heater, double setPoint);
+
+ /// <summary>
+ /// Sets the state of the specified blower.
+ /// </summary>
+ /// <param name="blower">The blower.</param>
+ /// <param name="isActive">Blower on/off.</param>
+ /// <param name="voltage">The voltage in millivolts.</param>
+ /// <returns></returns>
+ Task<SetBlowerStateResponse> SetBlowerState(PMR.Hardware.HardwareBlowerType blower, bool isActive, double voltage);
+
+ /// <summary>
/// Resolves the specified event type.
/// </summary>
/// <param name="eventType">Type of the event.</param>
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index 0ccc67abb..019ca368a 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -161,6 +161,36 @@ namespace Tango.Integration.Operation
{
Status.CurrentUnitSegments.Add(Job.CreateInterSegment(Job.InterSegmentLength));
}
+
+ //Create all segments
+ int segment_index = 1;
+
+ for (int j = 0; j < Job.NumberOfUnits; j++)
+ {
+ for (int i = 0; i < _effectiveSegments.Count; i++)
+ {
+ Segment seg = _effectiveSegments[i].Clone();
+ seg.EstimatedDuration = seg.GetEstimatedDuration(processParameters);
+ seg.SegmentIndex = segment_index++;
+ Status.Segments.Add(seg);
+ }
+
+ if (Job.EnableInterSegment)
+ {
+ var inter_segment = Job.CreateInterSegment(Job.InterSegmentLength);
+ inter_segment.SegmentIndex = segment_index++;
+ Status.Segments.Add(inter_segment);
+ }
+ }
+
+ var last_segment = Status.Segments.Last();
+
+ if (last_segment.IsInterSegment)
+ {
+ Status.Segments.Remove(last_segment);
+ }
+
+ Status.CurrentSegment = Status.Segments.First();
}
#endregion
@@ -194,6 +224,7 @@ namespace Tango.Integration.Operation
/// </summary>
internal void RaiseCompleted()
{
+ Status.Segments.Last().Completed = true;
Status.RemainingUnits = 0;
Status.IsFinalizing = false;
Status.IsCompleted = true;
@@ -359,6 +390,49 @@ namespace Tango.Integration.Operation
segment.RemainingTime = segmentRemainingTime;
}
}
+
+
+ //Set Segment Completion for All Segments List
+ for (int i = 0; i < Status.Segments.Count; i++)
+ {
+ Segment segment = Status.Segments[i];
+ double previousSegmentsLengthWithThis = Status.Segments.Take(i + 1).Sum(x => x.LengthWithFactor);
+ TimeSpan segmentsDuration = Job.TranslateProgressToTime(previousSegmentsLengthWithThis, ProcessParameters);
+ TimeSpan segmentRemainingTime = segmentsDuration - Job.TranslateProgressToTime(Status.Progress, ProcessParameters);
+
+ segment.Progress = Math.Min(Math.Max((previousSegmentsLengthWithThis - segment.Length - Status.Progress) * -1,0),segment.Length);
+
+ if (i == 0 && Status.Progress > 0)
+ {
+ if (!segment.Started)
+ {
+ segment.Started = true;
+ Status.CurrentSegment = segment;
+ }
+ }
+
+ if (Status.Progress >= previousSegmentsLengthWithThis)
+ {
+ if (!segment.Completed)
+ {
+ segment.Completed = true;
+ }
+
+ if (i < Status.Segments.Count - 1)
+ {
+ if (!Status.Segments[i + 1].Started)
+ {
+ Status.Segments[i + 1].Started = true;
+ Status.CurrentSegment = Status.Segments[i + 1];
+ }
+ }
+ }
+
+ if (segment.Started && !segment.Completed)
+ {
+ segment.RemainingTime = segmentRemainingTime;
+ }
+ }
}
else
{
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 332a2696c..01af2b3e3 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -1187,6 +1187,69 @@ namespace Tango.Integration.Operation
}
/// <summary>
+ /// Sets the state of the specified heater type.
+ /// </summary>
+ /// <param name="heater">The heater.</param>
+ /// <param name="setPoint">Set point temperature.</param>
+ /// <returns></returns>
+ public async Task<SetHeaterStateResponse> SetHeaterState(HeaterType heater, double setPoint)
+ {
+ SetHeaterStateResponse response = null;
+ SetHeaterStateRequest request = new SetHeaterStateRequest()
+ {
+ HeaterType = heater,
+ SetPoint = setPoint,
+ IsActive = true,
+ };
+
+ try
+ {
+ LogRequestSent(request);
+ response = await SendRequest<SetHeaterStateRequest, SetHeaterStateResponse>(request);
+ LogResponseReceived(response);
+ }
+ catch (Exception ex)
+ {
+ LogRequestFailed(request, ex);
+ throw ex;
+ }
+
+ return response;
+ }
+
+ /// <summary>
+ /// Sets the state of the specified blower.
+ /// </summary>
+ /// <param name="blower">The blower.</param>
+ /// <param name="isActive">Blower on/off.</param>
+ /// <param name="voltage">The voltage in millivolts.</param>
+ /// <returns></returns>
+ public async Task<SetBlowerStateResponse> SetBlowerState(PMR.Hardware.HardwareBlowerType blower, bool isActive, double voltage)
+ {
+ SetBlowerStateResponse response = null;
+ SetBlowerStateRequest request = new SetBlowerStateRequest()
+ {
+ BlowerType = blower,
+ Voltage = voltage,
+ IsActive = isActive,
+ };
+
+ try
+ {
+ LogRequestSent(request);
+ response = await SendRequest<SetBlowerStateRequest, SetBlowerStateResponse>(request);
+ LogResponseReceived(response);
+ }
+ catch (Exception ex)
+ {
+ LogRequestFailed(request, ex);
+ throw ex;
+ }
+
+ return response;
+ }
+
+ /// <summary>
/// Resolves the specified event type.
/// </summary>
/// <param name="eventType">Type of the event.</param>
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
index 8d4a79291..b94096813 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
@@ -253,12 +253,33 @@ namespace Tango.Integration.Operation
set { _currentUnitSegments = value; RaisePropertyChangedAuto(); }
}
+ private List<Segment> _segments;
+ /// <summary>
+ /// Gets or sets all job segments.
+ /// </summary>
+ public List<Segment> Segments
+ {
+ get { return _segments; }
+ set { _segments = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Segment _currentSegment;
+ /// <summary>
+ /// Gets or sets the current running segment from the <see cref="Segments"/> collection.
+ /// </summary>
+ public Segment CurrentSegment
+ {
+ get { return _currentSegment; }
+ set { _currentSegment = value; RaisePropertyChangedAuto(); }
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="RunningJobStatus"/> class.
/// </summary>
public RunningJobStatus()
{
CurrentUnitSegments = new List<Segment>();
+ Segments = new List<Segment>();
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
index 33d17c82d..99697250d 100644
--- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
+++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
@@ -22,7 +22,7 @@ namespace Tango.PMR.Common {
static MessageTypeReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiq0JgoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqmJwoLTWVz",
"c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj",
"dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n",
"cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh",
@@ -115,24 +115,27 @@ namespace Tango.PMR.Common {
"bnNlEO0PEiMKHlN0YXJ0RXZlbnRzTm90aWZpY2F0aW9uUmVxdWVzdBDuDxIk",
"Ch9TdGFydEV2ZW50c05vdGlmaWNhdGlvblJlc3BvbnNlEO8PEiIKHVN0b3BF",
"dmVudHNOb3RpZmljYXRpb25SZXF1ZXN0EPAPEiMKHlN0b3BFdmVudHNOb3Rp",
- "ZmljYXRpb25SZXNwb25zZRDxDxIPCgpKb2JSZXF1ZXN0ELgXEhAKC0pvYlJl",
- "c3BvbnNlELkXEhQKD0Fib3J0Sm9iUmVxdWVzdBC6FxIVChBBYm9ydEpvYlJl",
- "c3BvbnNlELsXEiMKHlVwbG9hZFByb2Nlc3NQYXJhbWV0ZXJzUmVxdWVzdBC8",
- "FxIkCh9VcGxvYWRQcm9jZXNzUGFyYW1ldGVyc1Jlc3BvbnNlEL0XEhkKFFN0",
- "YXJ0RGVidWdMb2dSZXF1ZXN0EKAfEhoKFVN0YXJ0RGVidWdMb2dSZXNwb25z",
- "ZRChHxIYChNTdG9wRGVidWdMb2dSZXF1ZXN0EKIfEhkKFFN0b3BEZWJ1Z0xv",
- "Z1Jlc3BvbnNlEKMfEicKIlVwbG9hZEhhcmR3YXJlQ29uZmlndXJhdGlvblJl",
- "cXVlc3QQiCcSKAojVXBsb2FkSGFyZHdhcmVDb25maWd1cmF0aW9uUmVzcG9u",
- "c2UQiScSFwoSU3lzdGVtUmVzZXRSZXF1ZXN0EIonEhgKE1N5c3RlbVJlc2V0",
- "UmVzcG9uc2UQiycSFQoQS2VlcEFsaXZlUmVxdWVzdBDwLhIWChFLZWVwQWxp",
- "dmVSZXNwb25zZRDxLhITCg5Db25uZWN0UmVxdWVzdBDyLhIUCg9Db25uZWN0",
- "UmVzcG9uc2UQ8y4SFgoRRGlzY29ubmVjdFJlcXVlc3QQ9C4SFwoSRGlzY29u",
- "bmVjdFJlc3BvbnNlEPUuEhYKEUZpbGVVcGxvYWRSZXF1ZXN0ENg2EhcKEkZp",
- "bGVVcGxvYWRSZXNwb25zZRDZNhIbChZGaWxlQ2h1bmtVcGxvYWRSZXF1ZXN0",
- "ENo2EhwKF0ZpbGVDaHVua1VwbG9hZFJlc3BvbnNlENs2EhoKFUV4ZWN1dGVQ",
- "cm9jZXNzUmVxdWVzdBDcNhIbChZFeGVjdXRlUHJvY2Vzc1Jlc3BvbnNlEN02",
- "EhcKEktpbGxQcm9jZXNzUmVxdWVzdBDeNhIYChNLaWxsUHJvY2Vzc1Jlc3Bv",
- "bnNlEN82QhwKGmNvbS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM="));
+ "ZmljYXRpb25SZXNwb25zZRDxDxIaChVTZXRIZWF0ZXJTdGF0ZVJlcXVlc3QQ",
+ "8g8SGwoWU2V0SGVhdGVyU3RhdGVSZXNwb25zZRDzDxIaChVTZXRCbG93ZXJT",
+ "dGF0ZVJlcXVlc3QQ9A8SGwoWU2V0Qmxvd2VyU3RhdGVSZXNwb25zZRD1DxIP",
+ "CgpKb2JSZXF1ZXN0ELgXEhAKC0pvYlJlc3BvbnNlELkXEhQKD0Fib3J0Sm9i",
+ "UmVxdWVzdBC6FxIVChBBYm9ydEpvYlJlc3BvbnNlELsXEiMKHlVwbG9hZFBy",
+ "b2Nlc3NQYXJhbWV0ZXJzUmVxdWVzdBC8FxIkCh9VcGxvYWRQcm9jZXNzUGFy",
+ "YW1ldGVyc1Jlc3BvbnNlEL0XEhkKFFN0YXJ0RGVidWdMb2dSZXF1ZXN0EKAf",
+ "EhoKFVN0YXJ0RGVidWdMb2dSZXNwb25zZRChHxIYChNTdG9wRGVidWdMb2dS",
+ "ZXF1ZXN0EKIfEhkKFFN0b3BEZWJ1Z0xvZ1Jlc3BvbnNlEKMfEicKIlVwbG9h",
+ "ZEhhcmR3YXJlQ29uZmlndXJhdGlvblJlcXVlc3QQiCcSKAojVXBsb2FkSGFy",
+ "ZHdhcmVDb25maWd1cmF0aW9uUmVzcG9uc2UQiScSFwoSU3lzdGVtUmVzZXRS",
+ "ZXF1ZXN0EIonEhgKE1N5c3RlbVJlc2V0UmVzcG9uc2UQiycSFQoQS2VlcEFs",
+ "aXZlUmVxdWVzdBDwLhIWChFLZWVwQWxpdmVSZXNwb25zZRDxLhITCg5Db25u",
+ "ZWN0UmVxdWVzdBDyLhIUCg9Db25uZWN0UmVzcG9uc2UQ8y4SFgoRRGlzY29u",
+ "bmVjdFJlcXVlc3QQ9C4SFwoSRGlzY29ubmVjdFJlc3BvbnNlEPUuEhYKEUZp",
+ "bGVVcGxvYWRSZXF1ZXN0ENg2EhcKEkZpbGVVcGxvYWRSZXNwb25zZRDZNhIb",
+ "ChZGaWxlQ2h1bmtVcGxvYWRSZXF1ZXN0ENo2EhwKF0ZpbGVDaHVua1VwbG9h",
+ "ZFJlc3BvbnNlENs2EhoKFUV4ZWN1dGVQcm9jZXNzUmVxdWVzdBDcNhIbChZF",
+ "eGVjdXRlUHJvY2Vzc1Jlc3BvbnNlEN02EhcKEktpbGxQcm9jZXNzUmVxdWVz",
+ "dBDeNhIYChNLaWxsUHJvY2Vzc1Jlc3BvbnNlEN82QhwKGmNvbS50d2luZS50",
+ "YW5nby5wbXIuY29tbW9uYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -298,6 +301,10 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("StartEventsNotificationResponse")] StartEventsNotificationResponse = 2031,
[pbr::OriginalName("StopEventsNotificationRequest")] StopEventsNotificationRequest = 2032,
[pbr::OriginalName("StopEventsNotificationResponse")] StopEventsNotificationResponse = 2033,
+ [pbr::OriginalName("SetHeaterStateRequest")] SetHeaterStateRequest = 2034,
+ [pbr::OriginalName("SetHeaterStateResponse")] SetHeaterStateResponse = 2035,
+ [pbr::OriginalName("SetBlowerStateRequest")] SetBlowerStateRequest = 2036,
+ [pbr::OriginalName("SetBlowerStateResponse")] SetBlowerStateResponse = 2037,
/// <summary>
///Printing
/// </summary>
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterState.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterState.cs
new file mode 100644
index 000000000..ac653f694
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterState.cs
@@ -0,0 +1,303 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: HeaterState.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from HeaterState.proto</summary>
+ public static partial class HeaterStateReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for HeaterState.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static HeaterStateReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChFIZWF0ZXJTdGF0ZS5wcm90bxIVVGFuZ28uUE1SLkRpYWdub3N0aWNzGhBI",
+ "ZWF0ZXJUeXBlLnByb3RvIqkBCgtIZWF0ZXJTdGF0ZRI1CgpIZWF0ZXJUeXBl",
+ "GAEgASgOMiEuVGFuZ28uUE1SLkRpYWdub3N0aWNzLkhlYXRlclR5cGUSEAoI",
+ "U2V0UG9pbnQYAiABKAESFAoMQ3VycmVudFZhbHVlGAMgASgBEhAKCElzQWN0",
+ "aXZlGAQgASgIEhMKC0lzUmFtcGluZ1VwGAUgASgIEhQKDElzSW5TZXRQb2lu",
+ "dBgGIAEoCEIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZw",
+ "cm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.HeaterTypeReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.HeaterState), global::Tango.PMR.Diagnostics.HeaterState.Parser, new[]{ "HeaterType", "SetPoint", "CurrentValue", "IsActive", "IsRampingUp", "IsInSetPoint" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class HeaterState : pb::IMessage<HeaterState> {
+ private static readonly pb::MessageParser<HeaterState> _parser = new pb::MessageParser<HeaterState>(() => new HeaterState());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<HeaterState> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Diagnostics.HeaterStateReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HeaterState() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HeaterState(HeaterState other) : this() {
+ heaterType_ = other.heaterType_;
+ setPoint_ = other.setPoint_;
+ currentValue_ = other.currentValue_;
+ isActive_ = other.isActive_;
+ isRampingUp_ = other.isRampingUp_;
+ isInSetPoint_ = other.isInSetPoint_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HeaterState Clone() {
+ return new HeaterState(this);
+ }
+
+ /// <summary>Field number for the "HeaterType" field.</summary>
+ public const int HeaterTypeFieldNumber = 1;
+ private global::Tango.PMR.Diagnostics.HeaterType heaterType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Diagnostics.HeaterType HeaterType {
+ get { return heaterType_; }
+ set {
+ heaterType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SetPoint" field.</summary>
+ public const int SetPointFieldNumber = 2;
+ private double setPoint_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double SetPoint {
+ get { return setPoint_; }
+ set {
+ setPoint_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "CurrentValue" field.</summary>
+ public const int CurrentValueFieldNumber = 3;
+ private double currentValue_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double CurrentValue {
+ get { return currentValue_; }
+ set {
+ currentValue_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IsActive" field.</summary>
+ public const int IsActiveFieldNumber = 4;
+ private bool isActive_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsActive {
+ get { return isActive_; }
+ set {
+ isActive_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IsRampingUp" field.</summary>
+ public const int IsRampingUpFieldNumber = 5;
+ private bool isRampingUp_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsRampingUp {
+ get { return isRampingUp_; }
+ set {
+ isRampingUp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IsInSetPoint" field.</summary>
+ public const int IsInSetPointFieldNumber = 6;
+ private bool isInSetPoint_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsInSetPoint {
+ get { return isInSetPoint_; }
+ set {
+ isInSetPoint_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as HeaterState);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(HeaterState other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (HeaterType != other.HeaterType) return false;
+ if (SetPoint != other.SetPoint) return false;
+ if (CurrentValue != other.CurrentValue) return false;
+ if (IsActive != other.IsActive) return false;
+ if (IsRampingUp != other.IsRampingUp) return false;
+ if (IsInSetPoint != other.IsInSetPoint) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HeaterType != 0) hash ^= HeaterType.GetHashCode();
+ if (SetPoint != 0D) hash ^= SetPoint.GetHashCode();
+ if (CurrentValue != 0D) hash ^= CurrentValue.GetHashCode();
+ if (IsActive != false) hash ^= IsActive.GetHashCode();
+ if (IsRampingUp != false) hash ^= IsRampingUp.GetHashCode();
+ if (IsInSetPoint != false) hash ^= IsInSetPoint.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HeaterType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) HeaterType);
+ }
+ if (SetPoint != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(SetPoint);
+ }
+ if (CurrentValue != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(CurrentValue);
+ }
+ if (IsActive != false) {
+ output.WriteRawTag(32);
+ output.WriteBool(IsActive);
+ }
+ if (IsRampingUp != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(IsRampingUp);
+ }
+ if (IsInSetPoint != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(IsInSetPoint);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HeaterType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HeaterType);
+ }
+ if (SetPoint != 0D) {
+ size += 1 + 8;
+ }
+ if (CurrentValue != 0D) {
+ size += 1 + 8;
+ }
+ if (IsActive != false) {
+ size += 1 + 1;
+ }
+ if (IsRampingUp != false) {
+ size += 1 + 1;
+ }
+ if (IsInSetPoint != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(HeaterState other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HeaterType != 0) {
+ HeaterType = other.HeaterType;
+ }
+ if (other.SetPoint != 0D) {
+ SetPoint = other.SetPoint;
+ }
+ if (other.CurrentValue != 0D) {
+ CurrentValue = other.CurrentValue;
+ }
+ if (other.IsActive != false) {
+ IsActive = other.IsActive;
+ }
+ if (other.IsRampingUp != false) {
+ IsRampingUp = other.IsRampingUp;
+ }
+ if (other.IsInSetPoint != false) {
+ IsInSetPoint = other.IsInSetPoint;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ heaterType_ = (global::Tango.PMR.Diagnostics.HeaterType) input.ReadEnum();
+ break;
+ }
+ case 17: {
+ SetPoint = input.ReadDouble();
+ break;
+ }
+ case 25: {
+ CurrentValue = input.ReadDouble();
+ break;
+ }
+ case 32: {
+ IsActive = input.ReadBool();
+ break;
+ }
+ case 40: {
+ IsRampingUp = input.ReadBool();
+ break;
+ }
+ case 48: {
+ IsInSetPoint = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterType.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterType.cs
new file mode 100644
index 000000000..7ffdd7130
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/HeaterType.cs
@@ -0,0 +1,51 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: HeaterType.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from HeaterType.proto</summary>
+ public static partial class HeaterTypeReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for HeaterType.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static HeaterTypeReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChBIZWF0ZXJUeXBlLnByb3RvEhVUYW5nby5QTVIuRGlhZ25vc3RpY3MqcgoK",
+ "SGVhdGVyVHlwZRIPCgtIZWF0ZXJab25lMRAAEg8KC0hlYXRlclpvbmUyEAES",
+ "DwoLSGVhdGVyWm9uZTMQAhIPCgtIZWF0ZXJab25lNBADEg8KC0hlYXRlclpv",
+ "bmU1EAQSDwoLSGVhdGVyWm9uZTYQBUIhCh9jb20udHdpbmUudGFuZ28ucG1y",
+ "LmRpYWdub3N0aWNzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.HeaterType), }, null));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum HeaterType {
+ [pbr::OriginalName("HeaterZone1")] HeaterZone1 = 0,
+ [pbr::OriginalName("HeaterZone2")] HeaterZone2 = 1,
+ [pbr::OriginalName("HeaterZone3")] HeaterZone3 = 2,
+ [pbr::OriginalName("HeaterZone4")] HeaterZone4 = 3,
+ [pbr::OriginalName("HeaterZone5")] HeaterZone5 = 4,
+ [pbr::OriginalName("HeaterZone6")] HeaterZone6 = 5,
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateRequest.cs
new file mode 100644
index 000000000..f0d22b881
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateRequest.cs
@@ -0,0 +1,218 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetBlowerStateRequest.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from SetBlowerStateRequest.proto</summary>
+ public static partial class SetBlowerStateRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetBlowerStateRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetBlowerStateRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtTZXRCbG93ZXJTdGF0ZVJlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5EaWFn",
+ "bm9zdGljcxoYSGFyZHdhcmVCbG93ZXJUeXBlLnByb3RvInYKFVNldEJsb3dl",
+ "clN0YXRlUmVxdWVzdBI6CgpCbG93ZXJUeXBlGAEgASgOMiYuVGFuZ28uUE1S",
+ "LkhhcmR3YXJlLkhhcmR3YXJlQmxvd2VyVHlwZRIPCgdWb2x0YWdlGAIgASgB",
+ "EhAKCElzQWN0aXZlGAMgASgIQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlh",
+ "Z25vc3RpY3NiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareBlowerTypeReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetBlowerStateRequest), global::Tango.PMR.Diagnostics.SetBlowerStateRequest.Parser, new[]{ "BlowerType", "Voltage", "IsActive" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetBlowerStateRequest : pb::IMessage<SetBlowerStateRequest> {
+ private static readonly pb::MessageParser<SetBlowerStateRequest> _parser = new pb::MessageParser<SetBlowerStateRequest>(() => new SetBlowerStateRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetBlowerStateRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Diagnostics.SetBlowerStateRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateRequest(SetBlowerStateRequest other) : this() {
+ blowerType_ = other.blowerType_;
+ voltage_ = other.voltage_;
+ isActive_ = other.isActive_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateRequest Clone() {
+ return new SetBlowerStateRequest(this);
+ }
+
+ /// <summary>Field number for the "BlowerType" field.</summary>
+ public const int BlowerTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareBlowerType blowerType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Hardware.HardwareBlowerType BlowerType {
+ get { return blowerType_; }
+ set {
+ blowerType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Voltage" field.</summary>
+ public const int VoltageFieldNumber = 2;
+ private double voltage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Voltage {
+ get { return voltage_; }
+ set {
+ voltage_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IsActive" field.</summary>
+ public const int IsActiveFieldNumber = 3;
+ private bool isActive_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsActive {
+ get { return isActive_; }
+ set {
+ isActive_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetBlowerStateRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetBlowerStateRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (BlowerType != other.BlowerType) return false;
+ if (Voltage != other.Voltage) return false;
+ if (IsActive != other.IsActive) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (BlowerType != 0) hash ^= BlowerType.GetHashCode();
+ if (Voltage != 0D) hash ^= Voltage.GetHashCode();
+ if (IsActive != false) hash ^= IsActive.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (BlowerType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) BlowerType);
+ }
+ if (Voltage != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(Voltage);
+ }
+ if (IsActive != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(IsActive);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (BlowerType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BlowerType);
+ }
+ if (Voltage != 0D) {
+ size += 1 + 8;
+ }
+ if (IsActive != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetBlowerStateRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.BlowerType != 0) {
+ BlowerType = other.BlowerType;
+ }
+ if (other.Voltage != 0D) {
+ Voltage = other.Voltage;
+ }
+ if (other.IsActive != false) {
+ IsActive = other.IsActive;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ blowerType_ = (global::Tango.PMR.Hardware.HardwareBlowerType) input.ReadEnum();
+ break;
+ }
+ case 17: {
+ Voltage = input.ReadDouble();
+ break;
+ }
+ case 24: {
+ IsActive = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateResponse.cs
new file mode 100644
index 000000000..9c5670f07
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetBlowerStateResponse.cs
@@ -0,0 +1,131 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetBlowerStateResponse.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from SetBlowerStateResponse.proto</summary>
+ public static partial class SetBlowerStateResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetBlowerStateResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetBlowerStateResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChxTZXRCbG93ZXJTdGF0ZVJlc3BvbnNlLnByb3RvEhVUYW5nby5QTVIuRGlh",
+ "Z25vc3RpY3MiGAoWU2V0Qmxvd2VyU3RhdGVSZXNwb25zZUIhCh9jb20udHdp",
+ "bmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetBlowerStateResponse), global::Tango.PMR.Diagnostics.SetBlowerStateResponse.Parser, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetBlowerStateResponse : pb::IMessage<SetBlowerStateResponse> {
+ private static readonly pb::MessageParser<SetBlowerStateResponse> _parser = new pb::MessageParser<SetBlowerStateResponse>(() => new SetBlowerStateResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetBlowerStateResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Diagnostics.SetBlowerStateResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateResponse(SetBlowerStateResponse other) : this() {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetBlowerStateResponse Clone() {
+ return new SetBlowerStateResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetBlowerStateResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetBlowerStateResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetBlowerStateResponse other) {
+ if (other == null) {
+ return;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateRequest.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateRequest.cs
new file mode 100644
index 000000000..ce64f14f9
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateRequest.cs
@@ -0,0 +1,218 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetHeaterStateRequest.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from SetHeaterStateRequest.proto</summary>
+ public static partial class SetHeaterStateRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetHeaterStateRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetHeaterStateRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtTZXRIZWF0ZXJTdGF0ZVJlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5EaWFn",
+ "bm9zdGljcxoQSGVhdGVyVHlwZS5wcm90byJyChVTZXRIZWF0ZXJTdGF0ZVJl",
+ "cXVlc3QSNQoKSGVhdGVyVHlwZRgBIAEoDjIhLlRhbmdvLlBNUi5EaWFnbm9z",
+ "dGljcy5IZWF0ZXJUeXBlEhAKCFNldFBvaW50GAIgASgBEhAKCElzQWN0aXZl",
+ "GAMgASgIQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25vc3RpY3NiBnBy",
+ "b3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.HeaterTypeReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetHeaterStateRequest), global::Tango.PMR.Diagnostics.SetHeaterStateRequest.Parser, new[]{ "HeaterType", "SetPoint", "IsActive" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetHeaterStateRequest : pb::IMessage<SetHeaterStateRequest> {
+ private static readonly pb::MessageParser<SetHeaterStateRequest> _parser = new pb::MessageParser<SetHeaterStateRequest>(() => new SetHeaterStateRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetHeaterStateRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Diagnostics.SetHeaterStateRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateRequest(SetHeaterStateRequest other) : this() {
+ heaterType_ = other.heaterType_;
+ setPoint_ = other.setPoint_;
+ isActive_ = other.isActive_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateRequest Clone() {
+ return new SetHeaterStateRequest(this);
+ }
+
+ /// <summary>Field number for the "HeaterType" field.</summary>
+ public const int HeaterTypeFieldNumber = 1;
+ private global::Tango.PMR.Diagnostics.HeaterType heaterType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Diagnostics.HeaterType HeaterType {
+ get { return heaterType_; }
+ set {
+ heaterType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SetPoint" field.</summary>
+ public const int SetPointFieldNumber = 2;
+ private double setPoint_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double SetPoint {
+ get { return setPoint_; }
+ set {
+ setPoint_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IsActive" field.</summary>
+ public const int IsActiveFieldNumber = 3;
+ private bool isActive_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsActive {
+ get { return isActive_; }
+ set {
+ isActive_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetHeaterStateRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetHeaterStateRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (HeaterType != other.HeaterType) return false;
+ if (SetPoint != other.SetPoint) return false;
+ if (IsActive != other.IsActive) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HeaterType != 0) hash ^= HeaterType.GetHashCode();
+ if (SetPoint != 0D) hash ^= SetPoint.GetHashCode();
+ if (IsActive != false) hash ^= IsActive.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (HeaterType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) HeaterType);
+ }
+ if (SetPoint != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(SetPoint);
+ }
+ if (IsActive != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(IsActive);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HeaterType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HeaterType);
+ }
+ if (SetPoint != 0D) {
+ size += 1 + 8;
+ }
+ if (IsActive != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetHeaterStateRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HeaterType != 0) {
+ HeaterType = other.HeaterType;
+ }
+ if (other.SetPoint != 0D) {
+ SetPoint = other.SetPoint;
+ }
+ if (other.IsActive != false) {
+ IsActive = other.IsActive;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ heaterType_ = (global::Tango.PMR.Diagnostics.HeaterType) input.ReadEnum();
+ break;
+ }
+ case 17: {
+ SetPoint = input.ReadDouble();
+ break;
+ }
+ case 24: {
+ IsActive = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateResponse.cs
new file mode 100644
index 000000000..8131558ff
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/SetHeaterStateResponse.cs
@@ -0,0 +1,131 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SetHeaterStateResponse.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Tango.PMR.Diagnostics {
+
+ /// <summary>Holder for reflection information generated from SetHeaterStateResponse.proto</summary>
+ public static partial class SetHeaterStateResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SetHeaterStateResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SetHeaterStateResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChxTZXRIZWF0ZXJTdGF0ZVJlc3BvbnNlLnByb3RvEhVUYW5nby5QTVIuRGlh",
+ "Z25vc3RpY3MiGAoWU2V0SGVhdGVyU3RhdGVSZXNwb25zZUIhCh9jb20udHdp",
+ "bmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetHeaterStateResponse), global::Tango.PMR.Diagnostics.SetHeaterStateResponse.Parser, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SetHeaterStateResponse : pb::IMessage<SetHeaterStateResponse> {
+ private static readonly pb::MessageParser<SetHeaterStateResponse> _parser = new pb::MessageParser<SetHeaterStateResponse>(() => new SetHeaterStateResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SetHeaterStateResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Diagnostics.SetHeaterStateResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateResponse(SetHeaterStateResponse other) : this() {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SetHeaterStateResponse Clone() {
+ return new SetHeaterStateResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SetHeaterStateResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SetHeaterStateResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SetHeaterStateResponse other) {
+ if (other == null) {
+ return;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
index ae9aa4e08..b50075eba 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
@@ -25,17 +25,19 @@ namespace Tango.PMR.Diagnostics {
"Ch5TdGFydERpYWdub3N0aWNzUmVzcG9uc2UucHJvdG8SFVRhbmdvLlBNUi5E",
"aWFnbm9zdGljcxobRGlnaXRhbEludGVyZmFjZVN0YXRlLnByb3RvGhlWYWx1",
"ZUNvbXBvbmVudFN0YXRlLnByb3RvGhlEaWFnbm9zdGljc01vbml0b3JzLnBy",
- "b3RvIuwBChhTdGFydERpYWdub3N0aWNzUmVzcG9uc2USPAoITW9uaXRvcnMY",
- "ASABKAsyKi5UYW5nby5QTVIuRGlhZ25vc3RpY3MuRGlhZ25vc3RpY3NNb25p",
- "dG9ycxJMChZEaWdpdGFsSW50ZXJmYWNlU3RhdGVzGAIgAygLMiwuVGFuZ28u",
- "UE1SLkRpYWdub3N0aWNzLkRpZ2l0YWxJbnRlcmZhY2VTdGF0ZRJEChBDb21w",
- "b25lbnRzU3RhdGVzGAMgAygLMiouVGFuZ28uUE1SLkRpYWdub3N0aWNzLlZh",
- "bHVlQ29tcG9uZW50U3RhdGVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFn",
- "bm9zdGljc2IGcHJvdG8z"));
+ "b3RvGhFIZWF0ZXJTdGF0ZS5wcm90byKnAgoYU3RhcnREaWFnbm9zdGljc1Jl",
+ "c3BvbnNlEjwKCE1vbml0b3JzGAEgASgLMiouVGFuZ28uUE1SLkRpYWdub3N0",
+ "aWNzLkRpYWdub3N0aWNzTW9uaXRvcnMSTAoWRGlnaXRhbEludGVyZmFjZVN0",
+ "YXRlcxgCIAMoCzIsLlRhbmdvLlBNUi5EaWFnbm9zdGljcy5EaWdpdGFsSW50",
+ "ZXJmYWNlU3RhdGUSRAoQQ29tcG9uZW50c1N0YXRlcxgDIAMoCzIqLlRhbmdv",
+ "LlBNUi5EaWFnbm9zdGljcy5WYWx1ZUNvbXBvbmVudFN0YXRlEjkKDUhlYXRl",
+ "cnNTdGF0ZXMYBCADKAsyIi5UYW5nby5QTVIuRGlhZ25vc3RpY3MuSGVhdGVy",
+ "U3RhdGVCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJv",
+ "dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DigitalInterfaceStateReflection.Descriptor, global::Tango.PMR.Diagnostics.ValueComponentStateReflection.Descriptor, global::Tango.PMR.Diagnostics.DiagnosticsMonitorsReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DigitalInterfaceStateReflection.Descriptor, global::Tango.PMR.Diagnostics.ValueComponentStateReflection.Descriptor, global::Tango.PMR.Diagnostics.DiagnosticsMonitorsReflection.Descriptor, global::Tango.PMR.Diagnostics.HeaterStateReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartDiagnosticsResponse), global::Tango.PMR.Diagnostics.StartDiagnosticsResponse.Parser, new[]{ "Monitors", "DigitalInterfaceStates", "ComponentsStates" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartDiagnosticsResponse), global::Tango.PMR.Diagnostics.StartDiagnosticsResponse.Parser, new[]{ "Monitors", "DigitalInterfaceStates", "ComponentsStates", "HeatersStates" }, null, null, null)
}));
}
#endregion
@@ -69,6 +71,7 @@ namespace Tango.PMR.Diagnostics {
Monitors = other.monitors_ != null ? other.Monitors.Clone() : null;
digitalInterfaceStates_ = other.digitalInterfaceStates_.Clone();
componentsStates_ = other.componentsStates_.Clone();
+ heatersStates_ = other.heatersStates_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -116,6 +119,19 @@ namespace Tango.PMR.Diagnostics {
get { return componentsStates_; }
}
+ /// <summary>Field number for the "HeatersStates" field.</summary>
+ public const int HeatersStatesFieldNumber = 4;
+ private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.HeaterState> _repeated_heatersStates_codec
+ = pb::FieldCodec.ForMessage(34, global::Tango.PMR.Diagnostics.HeaterState.Parser);
+ private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.HeaterState> heatersStates_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.HeaterState>();
+ /// <summary>
+ ///Heaters States
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<global::Tango.PMR.Diagnostics.HeaterState> HeatersStates {
+ get { return heatersStates_; }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as StartDiagnosticsResponse);
@@ -132,6 +148,7 @@ namespace Tango.PMR.Diagnostics {
if (!object.Equals(Monitors, other.Monitors)) return false;
if(!digitalInterfaceStates_.Equals(other.digitalInterfaceStates_)) return false;
if(!componentsStates_.Equals(other.componentsStates_)) return false;
+ if(!heatersStates_.Equals(other.heatersStates_)) return false;
return true;
}
@@ -141,6 +158,7 @@ namespace Tango.PMR.Diagnostics {
if (monitors_ != null) hash ^= Monitors.GetHashCode();
hash ^= digitalInterfaceStates_.GetHashCode();
hash ^= componentsStates_.GetHashCode();
+ hash ^= heatersStates_.GetHashCode();
return hash;
}
@@ -157,6 +175,7 @@ namespace Tango.PMR.Diagnostics {
}
digitalInterfaceStates_.WriteTo(output, _repeated_digitalInterfaceStates_codec);
componentsStates_.WriteTo(output, _repeated_componentsStates_codec);
+ heatersStates_.WriteTo(output, _repeated_heatersStates_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -167,6 +186,7 @@ namespace Tango.PMR.Diagnostics {
}
size += digitalInterfaceStates_.CalculateSize(_repeated_digitalInterfaceStates_codec);
size += componentsStates_.CalculateSize(_repeated_componentsStates_codec);
+ size += heatersStates_.CalculateSize(_repeated_heatersStates_codec);
return size;
}
@@ -183,6 +203,7 @@ namespace Tango.PMR.Diagnostics {
}
digitalInterfaceStates_.Add(other.digitalInterfaceStates_);
componentsStates_.Add(other.componentsStates_);
+ heatersStates_.Add(other.heatersStates_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -208,6 +229,10 @@ namespace Tango.PMR.Diagnostics {
componentsStates_.AddEntriesFrom(input, _repeated_componentsStates_codec);
break;
}
+ case 34: {
+ heatersStates_.AddEntriesFrom(input, _repeated_heatersStates_codec);
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
index 508e8ad54..06aebdb3e 100644
--- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
+++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
@@ -85,6 +85,8 @@
<Compile Include="Diagnostics\DoubleArray.cs" />
<Compile Include="Diagnostics\Event.cs" />
<Compile Include="Diagnostics\EventType.cs" />
+ <Compile Include="Diagnostics\HeaterState.cs" />
+ <Compile Include="Diagnostics\HeaterType.cs" />
<Compile Include="Diagnostics\InterfaceIOs.cs" />
<Compile Include="Diagnostics\MotorAbortHomingRequest.cs" />
<Compile Include="Diagnostics\MotorAbortHomingResponse.cs" />
@@ -97,10 +99,14 @@
<Compile Include="Diagnostics\MotorJoggingResponse.cs" />
<Compile Include="Diagnostics\ResolveEventRequest.cs" />
<Compile Include="Diagnostics\ResolveEventResponse.cs" />
+ <Compile Include="Diagnostics\SetBlowerStateRequest.cs" />
+ <Compile Include="Diagnostics\SetBlowerStateResponse.cs" />
<Compile Include="Diagnostics\SetComponentValueRequest.cs" />
<Compile Include="Diagnostics\SetComponentValueResponse.cs" />
<Compile Include="Diagnostics\SetDigitalOutRequest.cs" />
<Compile Include="Diagnostics\SetDigitalOutResponse.cs" />
+ <Compile Include="Diagnostics\SetHeaterStateRequest.cs" />
+ <Compile Include="Diagnostics\SetHeaterStateResponse.cs" />
<Compile Include="Diagnostics\StartDiagnosticsRequest.cs" />
<Compile Include="Diagnostics\StartDiagnosticsResponse.cs" />
<Compile Include="Diagnostics\StartEventsNotificationRequest.cs" />
@@ -218,7 +224,7 @@
</PropertyGroup>
<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/Tango.SharedUI/IView.cs b/Software/Visual_Studio/Tango.SharedUI/IView.cs
index d26bb68f8..7f57c6121 100644
--- a/Software/Visual_Studio/Tango.SharedUI/IView.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/IView.cs
@@ -11,9 +11,6 @@ namespace Tango.SharedUI
/// </summary>
public interface IView
{
- /// <summary>
- /// Occurs when the view is loaded and view model is defined as data context.
- /// </summary>
- event EventHandler<IView> ViewAttached;
+
}
}
diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln
index 8f108ea51..4cfc8f5ae 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -224,6 +224,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.EmbroideryUI", "Tango
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.WiFi", "Tango.WiFi\Tango.WiFi.csproj", "{6AA425C9-EA6A-4B01-AAED-5FF122E8B663}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.RML", "MachineStudio\Modules\Tango.MachineStudio.RML\Tango.MachineStudio.RML.csproj", "{D0186AC0-0FCF-4D3B-9619-54812B6E524B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppVeyor|Any CPU = AppVeyor|Any CPU
@@ -3947,6 +3949,46 @@ Global
{6AA425C9-EA6A-4B01-AAED-5FF122E8B663}.Release|x64.Build.0 = Release|Any CPU
{6AA425C9-EA6A-4B01-AAED-5FF122E8B663}.Release|x86.ActiveCfg = Release|Any CPU
{6AA425C9-EA6A-4B01-AAED-5FF122E8B663}.Release|x86.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|ARM.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|ARM.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|ARM64.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|x64.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|x64.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|x86.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.AppVeyor|x86.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|ARM.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|x64.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Debug|x86.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|ARM.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|x64.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.DefaultBuild|x86.Build.0 = Debug|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|ARM.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|ARM.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|ARM64.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x64.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x64.Build.0 = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x86.ActiveCfg = Release|Any CPU
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -4014,14 +4056,15 @@ Global
{01C3EF89-6A17-4D70-A71F-0395A212F2F8} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60}
{D0E71A4D-9EEA-4F07-983F-EEB4416C587F} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60}
{0BDA9B52-9879-4C5E-84E3-81D00B75DACC} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
+ {D0186AC0-0FCF-4D3B-9619-54812B6E524B} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- BuildVersion_UseGlobalSettings = False
- BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
- BuildVersion_StartDate = 2000/1/1
- BuildVersion_UpdateFileVersion = False
- BuildVersion_UpdateAssemblyVersion = True
- BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}
+ BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
+ BuildVersion_UpdateAssemblyVersion = True
+ BuildVersion_UpdateFileVersion = False
+ BuildVersion_StartDate = 2000/1/1
+ BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
+ BuildVersion_UseGlobalSettings = False
EndGlobalSection
EndGlobal
diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
index e7a1cead1..36f78391e 100644
--- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
@@ -47,6 +47,7 @@ namespace Tango.PMRGenerator.CLI
GenerateWindingMethods(db, pmrFolder);
GenerateSpoolTypes(db, pmrFolder);
GenerateProcessParameters(db, pmrFolder);
+ GenerateHeaterTypes(db, pmrFolder);
GenerateColorLabColorSpaces(db, pmrFolder);
GenerateColorLabLiquidTypes(db, pmrFolder);
@@ -415,6 +416,28 @@ namespace Tango.PMRGenerator.CLI
File.WriteAllText(Path.Combine(pmrFolder, "Printing", enumFile.Name + ".proto"), enumString);
}
+ private static void GenerateHeaterTypes(ObservablesContext db, String pmrFolder)
+ {
+ Console.WriteLine("Generating Heater Types...");
+
+ ProtoEnumFile enumFile = new ProtoEnumFile();
+ enumFile.Name = "HeaterType";
+ enumFile.Package = "Tango.PMR.Diagnostics";
+
+ foreach (var field in db.TechHeaters.ToList().OrderBy(x => x.Code))
+ {
+ enumFile.Fields.Add(new EnumerationField()
+ {
+ Name = field.Name.Replace(" ", ""),
+ Value = field.Code,
+ });
+ }
+
+ String enumString = enumFile.GenerateCode();
+
+ File.WriteAllText(Path.Combine(pmrFolder, "Diagnostics", enumFile.Name + ".proto"), enumString);
+ }
+
private static void GenerateSpoolTypes(ObservablesContext db, String pmrFolder)
{
Console.WriteLine("Generating Spool Types...");