aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-06-03 10:34:59 +0300
committerAvi Levkovich <avi@twine-s.com>2018-06-03 10:34:59 +0300
commit34b3f33ec9ccb682c430b3c9e206507d0a396e1c (patch)
tree4d67c5f052c5583283f5c7ce02ad77fab8a875c6 /Software/Visual_Studio
parent565d4cfcfc382e1ab63fd8fc6bbb3bb4562d16d9 (diff)
parent7399e15a1456064fc2e25daf841e0d3027d83489 (diff)
downloadTango-34b3f33ec9ccb682c430b3c9e206507d0a396e1c.tar.gz
Tango-34b3f33ec9ccb682c430b3c9e206507d0a396e1c.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/extension.vsixbin0 -> 3022359 bytes
-rw-r--r--Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/sqlite-netFx46-setup-bundle-x86-2015-1.0.108.0.exebin0 -> 17896300 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj17
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs17
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Fonts.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj40
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/app.config7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.config11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml153
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml185
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj74
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs67
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs22
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml76
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs38
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml38
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config4
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Job.cs20
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs12
-rw-r--r--Software/Visual_Studio/Tango.BL/Enumerations/JobStatus.cs30
-rw-r--r--Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs46
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj19
-rw-r--r--Software/Visual_Studio/Tango.BL/app.config17
-rw-r--r--Software/Visual_Studio/Tango.BL/packages.config8
-rw-r--r--Software/Visual_Studio/Tango.Core/CoreSettings.cs23
-rw-r--r--Software/Visual_Studio/Tango.Core/EventArguments/MouseOrTouchEventArgs.cs25
-rw-r--r--Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs191
-rw-r--r--Software/Visual_Studio/Tango.Core/Helpers/PathHelper.cs47
-rw-r--r--Software/Visual_Studio/Tango.Core/Tango.Core.csproj2
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/App.config16
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/Tango.DAL.Local.csproj17
-rw-r--r--Software/Visual_Studio/Tango.DAL.Local/packages.config8
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/App.config16
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx3
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram142
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/Partials/RemoteDB.cs2
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj17
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/packages.config8
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs74
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragThumb.cs32
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj5
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs4
-rw-r--r--Software/Visual_Studio/Tango.Synchronization/Remote/RemoteDBSynchronizer.cs2
-rw-r--r--Software/Visual_Studio/Tango.Synchronization/Tango.Synchronization.csproj17
-rw-r--r--Software/Visual_Studio/Tango.Synchronization/packages.config8
-rw-r--r--Software/Visual_Studio/Tango.Touch/Components/AttachedEventsManager.cs13
-rw-r--r--Software/Visual_Studio/Tango.Touch/Components/Ripple.cs99
-rw-r--r--Software/Visual_Studio/Tango.Touch/Components/Ripple.xaml6
-rw-r--r--Software/Visual_Studio/Tango.Touch/Components/TransformationHelper.cs153
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs29
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchButton.xaml7
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.cs95
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml150
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchDataGridRow.cs91
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.cs34
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml23
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml9
-rw-r--r--Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs17
-rw-r--r--Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml9
-rw-r--r--Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml8
-rw-r--r--Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml25
-rw-r--r--Software/Visual_Studio/Tango.Touch/Styles/TouchIconButton.xaml15
-rw-r--r--Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj20
-rw-r--r--Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml3
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/App.config18
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs14
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs4
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj17
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/packages.config8
-rw-r--r--Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs4
-rw-r--r--Software/Visual_Studio/Utilities/Tango.SQLiteGenerator.CLI/Program.cs24
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj16
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/InvokeResponseWindow.cs28
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/WriteToFile.cs29
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs4
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/StubManager.cs52
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Tango.Stubs.UI.csproj13
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs9
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml25
-rw-r--r--Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml.cs53
-rw-r--r--Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugCommand.cs4
-rw-r--r--Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.Designer.cs48
-rw-r--r--Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.cs2
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj17
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Web.config6
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/packages.config8
95 files changed, 2046 insertions, 794 deletions
diff --git a/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/extension.vsix b/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/extension.vsix
new file mode 100644
index 000000000..113f393f1
--- /dev/null
+++ b/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/extension.vsix
Binary files differ
diff --git a/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/sqlite-netFx46-setup-bundle-x86-2015-1.0.108.0.exe b/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/sqlite-netFx46-setup-bundle-x86-2015-1.0.108.0.exe
new file mode 100644
index 000000000..3043534c2
--- /dev/null
+++ b/Software/Visual_Studio/Installers/DB_PACK/SQLite Pack v1.0.0.8/sqlite-netFx46-setup-bundle-x86-2015-1.0.108.0.exe
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
index 1775bf7d1..d51ecc2bb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config
@@ -15,12 +15,7 @@
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SQLite.EF6" />
- <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
- <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
- </system.data>
+
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -77,4 +72,9 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
-</configuration> \ No newline at end of file
+<system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+ </system.data></configuration> \ No newline at end of file
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 5d685c112..3531985d6 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
@@ -76,15 +76,16 @@
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
@@ -536,11 +537,11 @@ RD /S /Q "$(TargetDir)bg\"
RD /S /Q "$(TargetDir)bn-BD\"
RD /S /Q "$(TargetDir)nb-NO\"</PostBuildEvent>
</PropertyGroup>
- <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
index 9568f9f90..a75d03cc6 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config
@@ -12,10 +12,10 @@
<package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
<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/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
index e5f13e394..d728b7939 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
@@ -22,7 +22,20 @@ namespace Tango.PPC.Common
public INotificationProvider NotificationProvider { get; private set; }
- public PPCSettings Settings { get; private set; }
+ private PPCSettings _settings;
+ public PPCSettings Settings
+ {
+ get
+ {
+ if (_settings == null)
+ {
+ _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ }
+
+ return _settings;
+ }
+ private set { _settings = value; }
+ }
public PPCViewModel(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification)
{
@@ -30,8 +43,6 @@ namespace Tango.PPC.Common
AuthenticationProvider = authentication;
NavigationManager = navigation;
NotificationProvider = notification;
-
- Settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
}
public abstract void OnApplicationStarted();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Fonts.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Fonts.xaml
new file mode 100644
index 000000000..95251da60
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Fonts.xaml
@@ -0,0 +1,7 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:local="clr-namespace:Tango.PanelPC.Common.Resources">
+
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
index 3a3090c6a..17c08bfb8 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
@@ -7,7 +7,7 @@
<ProjectGuid>{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}</ProjectGuid>
<OutputType>library</OutputType>
<RootNamespace>Tango.PanelPC.Common</RootNamespace>
- <AssemblyName>Tango.PanelPC.Common</AssemblyName>
+ <AssemblyName>Tango.PPC.Common</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -27,6 +27,8 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
+ <NuGetPackageImportStamp>
+ </NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -58,6 +60,18 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
@@ -76,6 +90,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Resources\Fonts.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -163,16 +181,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Content Include="..\..\..\DB\Tango.mdf">
- <Link>DB\Tango.mdf</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\..\..\DB\Tango_log.ldf">
- <Link>DB\Tango_log.ldf</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6 %28x86 and x64%29</ProductName>
@@ -184,5 +192,15 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Fonts\" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ </Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml
index af7652bf7..6e11a6617 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml
@@ -2,17 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.PPC.Common">
- <Style TargetType="{x:Type local:CustomControl1}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type local:CustomControl1}">
- <Border Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Fonts.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+
</ResourceDictionary>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config
index dcbe9e918..d7c68e008 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config
@@ -56,6 +56,13 @@
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+ </system.data>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config
index 033360b54..8ed1c5f7f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config
@@ -2,4 +2,8 @@
<packages>
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
index 895afa970..ab5bb1006 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
@@ -64,9 +64,18 @@
</assemblyBinding>
</runtime>
<entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ </DbProviderFactories>
+ </system.data>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
index ddfb18c60..a2cba71b1 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml
@@ -7,157 +7,18 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
+
+ <!--Touch-->
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Colors.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Fonts.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Fonts.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchButton.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchIconButton.xaml" />
- <!--Styles-->
- <ResourceDictionary>
- <Style TargetType="{x:Type ListBoxItem}" x:Key="basicListBoxItem">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderThickness" Value="0"></Setter>
- <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
- <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Padding="0" SnapsToDevicePixels="true">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Background" TargetName="Bd" Value="Transparent"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="Selector.IsSelectionActive" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" TargetName="Bd" Value="Transparent"/>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="emptyToggleButton" TargetType="ToggleButton">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ToggleButton">
- <Grid Background="{TemplateBinding Background}">
- <ContentPresenter />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="emptyButton" TargetType="Button">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Grid Background="{TemplateBinding Background}">
- <ContentPresenter />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--Drag & Drop-->
- <Style x:Key="draggableGrid" TargetType="Grid">
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.Draggable" Value="True"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
- </Style>
-
- <Style x:Key="droppableGrid" TargetType="Grid">
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.Droppable" Value="True"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
- <Style.Triggers>
- <Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
- <Setter Property="Opacity" Value="0.5"></Setter>
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
- <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
- <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <Style x:Key="draggableDroppableGrid" TargetType="Grid">
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter>
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.Draggable" Value="True"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.Droppable" Value="True"></Setter>
- <Setter Property="dragAndDrop:DragAndDropService.DraggingSurface" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}"></Setter>
- <Style.Triggers>
- <Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
- <Setter Property="Opacity" Value="0.5"></Setter>
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
- <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
- <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- </Trigger>
- </Style.Triggers>
- </Style>
- <!--Drag & Drop-->
-
- <!--Extensions-->
-
- </ResourceDictionary>
-
- <ResourceDictionary Source="Resources/Colors.xaml"></ResourceDictionary>
- <ResourceDictionary Source="Resources/MaterialOverride.xaml"></ResourceDictionary>
+ <!--Local-->
+ <ResourceDictionary Source="Resources/Colors.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
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 357d15171..1e3a16e3e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs
@@ -2,9 +2,13 @@
using System.Collections.Generic;
using System.Configuration;
using System.Data;
+using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
+using Tango.BL;
+using Tango.Core;
+using Tango.Core.Helpers;
using Tango.Settings;
namespace Tango.PPC.UI
@@ -17,10 +21,6 @@ namespace Tango.PPC.UI
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
-
- var s = SettingsManager.Default.GetOrCreate<Core.CoreSettings>();
- s.SQLServerAddress = "DB\\Tango.mdf";
- s.Save();
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml
index f716a6e88..2465abc3d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:Tango.PPC.UI"
xmlns:views="clr-namespace:Tango.PPC.UI.Views"
mc:Ignorable="d"
- Title="MainWindow" Height="1000" Width="625" WindowStyle="None" ResizeMode="NoResize">
+ Title="MainWindow" Height="1000" Stylus.IsTapFeedbackEnabled="False" Stylus.IsPressAndHoldEnabled="False" Stylus.IsTouchFeedbackEnabled="False" Width="625" WindowStyle="None" ResizeMode="NoResize" FontFamily="{StaticResource TangoFlexoFontFamily}">
<Grid>
<Viewbox Stretch="Fill">
<Grid Height="1280" Width="800">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml
index 431533fcb..4bbd08a06 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml
@@ -2,13 +2,4 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.PPC.UI.Resources">
-
- <Color x:Key="AccentColor">#2F65EE</Color>
- <SolidColorBrush x:Key="AccentColorBrush" Color="{StaticResource AccentColor}"></SolidColorBrush>
-
- <Color x:Key="WhiteColor">#FFFFFF</Color>
- <SolidColorBrush x:Key="WhiteColorBrush" Color="{StaticResource WhiteColor}"></SolidColorBrush>
-
- <Color x:Key="BorderColor">#C8CBD4</Color>
- <SolidColorBrush x:Key="BorderColorBrush" Color="{StaticResource BorderColor}"></SolidColorBrush>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml
deleted file mode 100644
index 49fb3e837..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml
+++ /dev/null
@@ -1,185 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
- xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
- xmlns:local="clr-namespace:Tango.PPC.UI.Resources">
-
-
- <Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"></Setter>
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly"></Setter>
- <Setter Property="VirtualizingStackPanel.ScrollUnit" Value="Pixel"></Setter>
- <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
- </Style>
-
- <!--ListBoxItem--><!--
- <Style TargetType="{x:Type ListBoxItem}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
- <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
- <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
- <Setter Property="Padding" Value="8"/>
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border Background="White"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="5"
- Margin="2"
- ClipToBounds="{TemplateBinding ClipToBounds}">
- <Border.Effect>
- <DropShadowEffect ShadowDepth="0" BlurRadius="8" Color="Silver" />
- </Border.Effect>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0:0:0.3" To="Normal">
- <VisualTransition.GeneratedEasingFunction>
- <CircleEase EasingMode="EaseOut"/>
- </VisualTransition.GeneratedEasingFunction>
- </VisualTransition>
- </VisualStateGroup.Transitions>
- <VisualState Name="Normal"/>
- --><!--<VisualState Name="MouseOver">
- <Storyboard>
- <DoubleAnimation Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="Opacity"
- To="0.1" Duration="0"/>
- </Storyboard>
- </VisualState>--><!--
- <VisualState Name="Disabled"/>
- </VisualStateGroup>
- <VisualStateGroup Name="SelectionStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0:0:0.6"/>
- </VisualStateGroup.Transitions>
- <VisualState Name="Selected">
- <Storyboard>
- <DoubleAnimation Storyboard.TargetName="SelectedBorder"
- Storyboard.TargetProperty="Opacity"
- To="0.18" Duration="0"/>
- </Storyboard>
- </VisualState>
- <VisualState Name="Unselected"/>
- <VisualState Name="SelectedUnfocused">
- <Storyboard>
- <DoubleAnimation Storyboard.TargetName="SelectedBorder"
- Storyboard.TargetProperty="Opacity"
- To="0.03" Duration="0"/>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid>
- <Border x:Name="MouseOverBorder"
- Opacity="0" CornerRadius="5"
- Background="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"/>
-
- <Border x:Name="SelectedBorder"
- Opacity="0" CornerRadius="5"
- Background="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"
- RenderTransformOrigin="0.5,0.5">
- <Border.RenderTransform>
- <ScaleTransform ScaleX="1"/>
- </Border.RenderTransform>
- </Border>
- <wpf:Ripple Feedback="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"
- Focusable="False"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Padding="{TemplateBinding Padding}"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value=".56" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- --><!--ListBoxItem-->
-
- <!--Colors-->
- <SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{StaticResource Primary200}" />
- <SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{StaticResource Primary200Foreground}" />
- <SolidColorBrush x:Key="PrimaryHueMidBrush" Color="{StaticResource AccentColor}" />
- <SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{StaticResource Primary500Foreground}" />
- <SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="{StaticResource Primary700}" />
- <SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="{StaticResource Primary700Foreground}" />
- <!--Colors-->
-
- <!--RoundedButton--><!--
- <Style x:Key="MaterialDesignRaisedRoundedButton" TargetType="{x:Type ButtonBase}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
- <Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
- <Setter Property="wpf:RippleAssist.Feedback" Value="White" />
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="wpf:ShadowAssist.ShadowDepth" Value="Depth1" />
- <Setter Property="TextBlock.FontWeight" Value="Medium"/>
- <Setter Property="TextBlock.FontSize" Value="14"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="16 4 16 4"/>
- <Setter Property="Height" Value="32" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ButtonBase}">
- <Grid>
- <AdornerDecorator CacheMode="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:ShadowAssist.CacheMode)}">
- <Grid>
- <Border Background="{TemplateBinding Background}" CornerRadius="20"
- BorderThickness="{TemplateBinding BorderThickness}"
- BorderBrush="{TemplateBinding BorderBrush}"
- x:Name="border"
- Effect="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ShadowAssist.ShadowDepth), Converter={x:Static converters:ShadowConverter.Instance}}" />
- <Border HorizontalAlignment="Left" Background="{DynamicResource MaterialDesignBackground}" Opacity=".4">
- <Border.Width>
- <MultiBinding Converter="{StaticResource RangeLengthConverter}">
- <Binding Path="(wpf:ButtonProgressAssist.Minimum)" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="(wpf:ButtonProgressAssist.Maximum)" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="(wpf:ButtonProgressAssist.Value)" RelativeSource="{RelativeSource TemplatedParent}" />
- <Binding Path="ActualWidth" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ButtonBase}}" />
- </MultiBinding>
- </Border.Width>
- </Border>
- </Grid>
- </AdornerDecorator>
- <wpf:Ripple Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Focusable="False"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Padding="{TemplateBinding Padding}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="border" Property="wpf:ShadowAssist.Darken" Value="True" />
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="border" Property="wpf:ShadowAssist.Darken" Value="True" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Opacity" Value="0.23"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- --><!--RoundedButton-->
-
-
-</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
index 6a60b6701..808aa4b5d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj
@@ -7,12 +7,14 @@
<ProjectGuid>{654BEDA3-16FB-44FF-ADE7-B52E50B02E63}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Tango.PanelPC.UI</RootNamespace>
- <AssemblyName>Tango.PanelPC.UI</AssemblyName>
+ <AssemblyName>Tango.PPC.UI</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <NuGetPackageImportStamp>
+ </NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -52,6 +54,18 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -111,10 +125,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Resources\MaterialOverride.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
<Page Include="Resources\Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -233,4 +243,58 @@
<Resource Include="Images\warning.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ </Target>
+ <PropertyGroup>
+ <PostBuildEvent>RD /S /Q "$(TargetDir)cs\"
+RD /S /Q "$(TargetDir)da\"
+RD /S /Q "$(TargetDir)de\"
+RD /S /Q "$(TargetDir)es\"
+RD /S /Q "$(TargetDir)fa\"
+RD /S /Q "$(TargetDir)fi\"
+RD /S /Q "$(TargetDir)fr\"
+RD /S /Q "$(TargetDir)it\"
+RD /S /Q "$(TargetDir)ko\"
+RD /S /Q "$(TargetDir)mk\"
+RD /S /Q "$(TargetDir)nl\"
+RD /S /Q "$(TargetDir)pl\"
+RD /S /Q "$(TargetDir)pt\"
+RD /S /Q "$(TargetDir)ru\"
+RD /S /Q "$(TargetDir)sv\"
+RD /S /Q "$(TargetDir)tr\"
+RD /S /Q "$(TargetDir)zh-CN\"
+RD /S /Q "$(TargetDir)af\"
+RD /S /Q "$(TargetDir)ar\"
+RD /S /Q "$(TargetDir)dn-BD\"
+RD /S /Q "$(TargetDir)el\"
+RD /S /Q "$(TargetDir)fi-FI\"
+RD /S /Q "$(TargetDir)fr-BE\"
+RD /S /Q "$(TargetDir)he\"
+RD /S /Q "$(TargetDir)hr\"
+RD /S /Q "$(TargetDir)hu\"
+RD /S /Q "$(TargetDir)id\"
+RD /S /Q "$(TargetDir)ja\"
+RD /S /Q "$(TargetDir)lv\"
+RD /S /Q "$(TargetDir)nb\"
+RD /S /Q "$(TargetDir)ro\"
+RD /S /Q "$(TargetDir)sk\"
+RD /S /Q "$(TargetDir)sl\"
+RD /S /Q "$(TargetDir)sr\"
+RD /S /Q "$(TargetDir)sr-Latn\"
+RD /S /Q "$(TargetDir)uk\"
+RD /S /Q "$(TargetDir)uz-Cyrl-UZ\"
+RD /S /Q "$(TargetDir)uz-Latn-UZ\"
+RD /S /Q "$(TargetDir)vi\"
+RD /S /Q "$(TargetDir)zh-Hans\"
+RD /S /Q "$(TargetDir)zh-Hant\"
+RD /S /Q "$(TargetDir)bg\"
+RD /S /Q "$(TargetDir)bn-BD\"
+RD /S /Q "$(TargetDir)nb-NO\"
+RD /S /Q "$(TargetDir)pt-BR\"</PostBuildEvent>
+ </PropertyGroup>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
index 0eb59eeeb..b5e3e18fc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs
@@ -1,11 +1,17 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Diagnostics;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
+using System.Windows.Data;
using Tango.BL;
using Tango.BL.Entities;
+using Tango.Core.Commands;
+using Tango.DragAndDrop;
using Tango.PPC.Common;
using Tango.PPC.Common.Application;
using Tango.PPC.Common.Authentication;
@@ -21,16 +27,70 @@ namespace Tango.PPC.UI.ViewModels
private ObservablesContext _jobsContext;
private ObservableCollection<Job> _jobs;
-
public ObservableCollection<Job> Jobs
{
get { return _jobs; }
set { _jobs = value; RaisePropertyChangedAuto(); }
}
+ private ICollectionView _jobsCollectionView;
+ /// <summary>
+ /// Gets or sets the jobs collection view.
+ /// </summary>
+ public ICollectionView JobsCollectionView
+ {
+ get { return _jobsCollectionView; }
+ set
+ {
+ _jobsCollectionView = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+ public RelayCommand JobSelectedCommand { get; set; }
+
+ public RelayCommand<DropEventArgs> OnDragAndDropCommand { get; set; }
+
public JobsViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification)
{
Jobs = new ObservableCollection<Job>();
+
+ JobSelectedCommand = new RelayCommand((x) => JobSelected(x as Job));
+ OnDragAndDropCommand = new RelayCommand<DropEventArgs>((e) =>
+ {
+ Job draggedJob = e.Draggable.DataContext as Job;
+ Job droppedJob = e.Droppable.DataContext as Job;
+
+ OnDragAndDropJobs(draggedJob, droppedJob);
+ });
+ }
+
+ private void OnDragAndDropJobs(Job draggedJob, Job droppedJob)
+ {
+ Debug.WriteLine(draggedJob.Name + " Dragged on to " + droppedJob.Name);
+
+ if (draggedJob.JobIndex > droppedJob.JobIndex)
+ {
+ draggedJob.JobIndex = droppedJob.JobIndex - 1;
+ }
+ else
+ {
+ draggedJob.JobIndex = droppedJob.JobIndex + 1;
+ }
+
+ int index = 1;
+
+ foreach (var job in Jobs.OrderBy(x => x.JobIndex))
+ {
+ job.JobIndex = index++;
+ }
+
+ JobsCollectionView.Refresh();
+ }
+
+ private void JobSelected(Job job)
+ {
+ Debug.WriteLine(job.Name);
}
public override void OnApplicationStarted()
@@ -42,13 +102,18 @@ namespace Tango.PPC.UI.ViewModels
{
Task.Factory.StartNew(() =>
{
+ Thread.Sleep(500);
+
if (_jobsContext != null)
{
_jobsContext.Dispose();
}
_jobsContext = ObservablesContext.CreateDefault();
+
Jobs = _jobsContext.Jobs.Where(x => x.Machine.SerialNumber == Settings.MachineSerialNumber).ToObservableCollection();
+ JobsCollectionView = CollectionViewSource.GetDefaultView(Jobs);
+ JobsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Job.LastUpdated), ListSortDirection.Descending));
});
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
index 4cc812a17..df4a9c8e2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
@@ -1,8 +1,11 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core;
+using Tango.Core.Helpers;
using Tango.PPC.Common;
using Tango.PPC.Common.Application;
using Tango.PPC.Common.Authentication;
@@ -21,7 +24,24 @@ namespace Tango.PPC.UI.ViewModels
public async override void OnApplicationStarted()
{
- await Task.Delay(2000);
+ await Task.Delay(500);
+
+ //TODO: Use this in the future.
+
+ //#if DEBUG
+ // DataSource = "localhost\\SQLEXPRESS";
+ //#else
+ // DataBaseSettings.DefaultDataSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db");
+ //#endif
+
+ CoreSettings.DefaultDataBaseSource = Path.Combine(PathHelper.GetUserTangoFolder(), "DB", "Tango.db");
+
+ if (!File.Exists(CoreSettings.DefaultDataBaseSource))
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(CoreSettings.DefaultDataBaseSource));
+ File.Copy(Path.Combine(PathHelper.GetStartupPath(), "DB", "Tango.db"), CoreSettings.DefaultDataBaseSource);
+ }
+
NavigationManager.NavigateTo(NavigationView.LayoutView);
NavigationManager.NavigateTo(NavigationView.JobsView);
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
index 8062280de..bbea55764 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml
@@ -5,9 +5,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
xmlns:global="clr-namespace:Tango.PPC.UI"
+ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:keyboard="clr-namespace:Tango.SharedUI.Keyboard;assembly=Tango.SharedUI"
- xmlns:converters="clr-namespace:Tango.PPC.Common.Converters;assembly=Tango.PanelPC.Common"
+ xmlns:converters="clr-namespace:Tango.PPC.Common.Converters;assembly=Tango.PPC.Common"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:touchComponents="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
@@ -18,8 +21,9 @@
<UserControl.Resources>
<converters:SegmentsToPieConverter x:Key="SegmentsToPieConverter" />
<sharedConverters:DateTimeUTCToShortDateConverter x:Key="DateTimeUTCToShortDateConverter" />
+ <sharedConverters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
</UserControl.Resources>
-
+
<Grid Background="{StaticResource TangoMidBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="82"/>
@@ -30,7 +34,7 @@
<Border.Effect>
<DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
</Border.Effect>
- <TextBlock VerticalAlignment="Center" Margin="20" FontSize="25" FontWeight="SemiBold">JOBS</TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="20" FontSize="{StaticResource TangoPageHeaderFontSize}" FontWeight="SemiBold">Jobs</TextBlock>
</Border>
<Grid Grid.Row="1">
@@ -39,14 +43,20 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
- <touch:TouchNavigationLinks VerticalAlignment="Bottom" Margin="20" FontSize="18" FontWeight="SemiBold">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Height="57" Margin="0 -28 30 0">
+ <touch:TouchIconButton Margin="0 0 30 0" Padding="20" Icon="Plus" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
+ <touch:TouchIconButton Margin="0 0 30 0" Padding="20" Icon="Copy" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
+ <touch:TouchIconButton Padding="20" Icon="Refresh" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
+ </StackPanel>
+
+ <touch:TouchNavigationLinks VerticalAlignment="Bottom" Margin="20">
<sys:String>READY TO DYE</sys:String>
<sys:String>NOT READY</sys:String>
<sys:String>ALL</sys:String>
</touch:TouchNavigationLinks>
<Grid Grid.Row="1">
- <touch:TouchDataGrid ItemsSource="{Binding Jobs}" Margin="10" EnableDropShadow="True" ShadowColor="#ECECEC" AutoGenerateColumns="False" RowHeight="68" ColumnHeaderHeight="67">
+ <touch:TouchDataGrid x:Name="dataGridJobs" OnDragAndDropCommand="{Binding OnDragAndDropCommand}" ItemSelectedCommand="{Binding JobSelectedCommand}" ItemsSource="{Binding JobsCollectionView}" Margin="10" EnableDropShadow="True" ShadowColor="#ECECEC" AutoGenerateColumns="False" RowHeight="68" ColumnHeaderHeight="67">
<touch:TouchDataGrid.Columns>
<DataGridTemplateColumn>
<DataGridTemplateColumn.Header>
@@ -58,34 +68,60 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTextColumn Header="Status" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Name" Width="295" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Length (m)" Binding="{Binding Length,StringFormat=0.0}"></DataGridTextColumn>
- <DataGridTemplateColumn Header="Colors" SortMemberPath="Segments.Count">
+ <DataGridTextColumn Width="90" Header="Status" Binding="{Binding JobStatus,Converter={StaticResource EnumToDescriptionConverter}}"></DataGridTextColumn>
+ <DataGridTextColumn Width="240" Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Width="117" Header="Length (m)" Binding="{Binding Length,StringFormat=0.0}"></DataGridTextColumn>
+ <DataGridTemplateColumn Header="Colors" SortMemberPath="Segments.Count" Width="85">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <ContentControl Content="{Binding Segments,Converter={StaticResource SegmentsToPieConverter}}" Width="23" Height="23"></ContentControl>
+ <ContentControl Content="{Binding Segments,Converter={StaticResource SegmentsToPieConverter}}" Width="23" Height="23" HorizontalAlignment="Left"></ContentControl>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTextColumn Header="Updated" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></DataGridTextColumn>
- <DataGridTextColumn Binding="{Binding JobIndex}" Width="70" SortMemberPath="JobIndex">
- <DataGridTextColumn.HeaderStyle>
+ <DataGridTextColumn Width="100" Header="Updated" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></DataGridTextColumn>
+ <DataGridTemplateColumn x:Name="userSortColumn" SortMemberPath="JobIndex" SortDirection="{x:Null}" Width="78" CanUserSort="False">
+ <DataGridTemplateColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
<Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
<Setter Property="VerticalContentAlignment" Value="Stretch"></Setter>
+ <EventSetter Event="PreviewMouseUp" Handler="OnJobIndexColumnClick"></EventSetter>
</Style>
- </DataGridTextColumn.HeaderStyle>
- <DataGridTextColumn.Header>
- <Grid>
- <Grid IsHitTestVisible="False">
+ </DataGridTemplateColumn.HeaderStyle>
+ <DataGridTemplateColumn.Header>
+ <Border CornerRadius="0 5 5 0" x:Name="userSortColumnBorder">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
+ </Style>
+ </Border.Style>
+ <Grid>
<Rectangle HorizontalAlignment="Left" StrokeThickness="2" Stroke="{StaticResource TangoColumnDividerBrush}" />
<Image Source="/Images/arrows.png" Width="28" />
</Grid>
- </Grid>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
+ </Border>
+ </DataGridTemplateColumn.Header>
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <dragAndDrop:DragThumb Height="50" touchComponents:Ripple.PreventRipple="True" touchComponents:TransformationHelper.PreventTransform="True">
+ <dragAndDrop:DragThumb.Style>
+ <Style TargetType="dragAndDrop:DragThumb">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Source={x:Reference userSortColumn},Path=SortDirection}" Value="Ascending">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </dragAndDrop:DragThumb.Style>
+ <StackPanel Width="30" IsHitTestVisible="False" VerticalAlignment="Center">
+ <Rectangle StrokeThickness="2" Stroke="{StaticResource TangoDarkForegroundBrush}" />
+ <Rectangle StrokeThickness="2" Stroke="{StaticResource TangoDarkForegroundBrush}" Margin="0 5 0 0" />
+ </StackPanel>
+ </dragAndDrop:DragThumb>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
</touch:TouchDataGrid.Columns>
</touch:TouchDataGrid>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs
index 3ccb48c01..5ec459f5e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -23,6 +24,43 @@ namespace Tango.PPC.UI.Views
public JobsView()
{
InitializeComponent();
+
+ dataGridJobs.Sorting += DataGridJobs_Sorting;
+ }
+
+ private void DataGridJobs_Sorting(object sender, DataGridSortingEventArgs e)
+ {
+ if (e.Column != userSortColumn)
+ {
+ userSortColumnBorder.Background = Application.Current.Resources["TangoMidAccentBrush"] as Brush;
+ }
+ }
+
+ private void OnJobIndexColumnClick(object sender, MouseButtonEventArgs e)
+ {
+ SortDataGrid(dataGridJobs, dataGridJobs.Columns.Count - 1, ListSortDirection.Ascending);
+ userSortColumnBorder.Background = Application.Current.Resources["TangoLowAccentBrush"] as Brush;
+ }
+
+ private static void SortDataGrid(DataGrid dataGrid, int columnIndex = 0, ListSortDirection sortDirection = ListSortDirection.Ascending)
+ {
+ var column = dataGrid.Columns[columnIndex];
+
+ // Clear current sort descriptions
+ dataGrid.Items.SortDescriptions.Clear();
+
+ // Add the new sort description
+ dataGrid.Items.SortDescriptions.Add(new SortDescription(column.SortMemberPath, sortDirection));
+
+ // Apply sort
+ foreach (var col in dataGrid.Columns)
+ {
+ col.SortDirection = null;
+ }
+ column.SortDirection = sortDirection;
+
+ // Refresh items to display sort
+ dataGrid.Items.Refresh();
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
index 2a6d1b52b..e039ad14e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -21,18 +21,18 @@
<DockPanel LastChildFill="False" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<StackPanel MinWidth="300" DockPanel.Dock="Top">
<Grid>
- <touch:TouchToggleButton Style="{StaticResource TouchToggleButtonHamburger}"
+ <touch:TouchToggleButton Style="{StaticResource TangoTouchToggleButtonHamburger}"
HorizontalAlignment="Right" Margin="16"
IsChecked="{Binding ElementName=menu,Path=IsOpened}" />
<StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image>
<StackPanel Margin="0 5 0 0">
- <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock>
+ <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName,FallbackValue='User Full Name'}"></TextBlock>
<TextBlock FontSize="12" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" Margin="10 5 0 0" VerticalAlignment="Center">
- <Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name}"></Run>
+ <Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name,FallbackValue='Organization'}"></Run>
,
- <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name}">
+ <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name,FallbackValue='User Roles'}">
<Run.ToolTip>
<ItemsControl ItemsSource="{Binding AuthenticationProvider.CurrentUser.Roles}">
<ItemsControl.ItemTemplate>
@@ -52,33 +52,23 @@
</StackPanel>
</Grid>
<StackPanel Margin="0 16 0 0">
- <ListBoxItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="PreviewMouseUp">
- <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <StackPanel Orientation="Horizontal">
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<fa:ImageAwesome VerticalAlignment="Center" Icon="Home" Width="32" Height="32"></fa:ImageAwesome>
<TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock>
</StackPanel>
- </ListBoxItem>
+ </touch:TouchButton>
</StackPanel>
</StackPanel>
<StackPanel DockPanel.Dock="Bottom">
<Separator Margin="0 10 0 0" Background="Gainsboro" />
- <ListBoxItem>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="PreviewMouseUp">
- <i:InvokeCommandAction Command="{Binding SignoutCommand}"></i:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <StackPanel Orientation="Horizontal">
+ <touch:TouchButton Style="{StaticResource TangoFlatButton}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<fa:ImageAwesome VerticalAlignment="Center" Icon="SignOut" Width="32" Height="32"></fa:ImageAwesome>
- <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign out</TextBlock>
+ <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign Out</TextBlock>
</StackPanel>
- </ListBoxItem>
+ </touch:TouchButton>
</StackPanel>
</DockPanel>
</Border>
@@ -87,8 +77,8 @@
<DockPanel>
<Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top">
<DockPanel>
- <Border Padding="20" BorderThickness="0 0 1 0" BorderBrush="{StaticResource BorderColorBrush}">
- <touch:TouchToggleButton Width="50" Height="50" Foreground="{StaticResource TangoPrimaryAccentBrush}" Style="{StaticResource TouchToggleButtonHamburger}" IsChecked="{Binding ElementName=menu,Path=IsOpened}">
+ <Border Padding="20" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}">
+ <touch:TouchToggleButton Width="50" Height="50" Foreground="{StaticResource TangoPrimaryAccentBrush}" Style="{StaticResource TangoTouchToggleButtonHamburger}" IsChecked="{Binding ElementName=menu,Path=IsOpened}">
<ToggleButton.Effect>
<DropShadowEffect ShadowDepth="15" BlurRadius="20" Color="Silver" />
</ToggleButton.Effect>
@@ -96,7 +86,7 @@
</Border>
<Grid>
<StackPanel HorizontalAlignment="Right" Margin="30 0" Orientation="Horizontal">
- <touch:TouchButton Height="54" FontSize="20" Padding="0" Width="184" CornerRadius="30" BlurRadius="20">
+ <touch:TouchButton Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20">
DYE
</touch:TouchButton>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config
index e4617d73a..70668c3ed 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config
@@ -5,4 +5,8 @@
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" />
<package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" />
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
index 8a8c12342..34454be8a 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
@@ -379,6 +379,26 @@ namespace Tango.BL.Entities
}
+ protected Int32 _status;
+ /// <summary>
+ /// Gets or sets the job status.
+ /// </summary>
+ [Column("STATUS")]
+
+ public Int32 Status
+ {
+ get
+ {
+ return _status;
+ }
+
+ set
+ {
+ _status = value; RaisePropertyChanged(nameof(Status));
+ }
+
+ }
+
protected ObservableCollection<JobRun> _jobruns;
/// <summary>
/// Gets or sets the job job runs.
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
index e5854a406..daaae5845 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.BL.Enumerations;
namespace Tango.BL.Entities
{
@@ -43,6 +44,17 @@ namespace Tango.BL.Entities
get { return Segments.Sum(x => x.Length) + (EnableInterSegment ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0); }
}
+ /// <summary>
+ /// Gets or sets the job <see cref="Status"/> property as <see cref="JobStatus"/> enum instead of int.
+ /// </summary>
+ [NotMapped]
+ [JsonIgnore]
+ public JobStatus JobStatus
+ {
+ get { return (JobStatus)Status; }
+ set { Status = value.ToInt32(); RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Event Handlers
diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/JobStatus.cs b/Software/Visual_Studio/Tango.BL/Enumerations/JobStatus.cs
new file mode 100644
index 000000000..224e9fbf8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/Enumerations/JobStatus.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.BL.Enumerations
+{
+ public enum JobStatus
+ {
+ //Not Ready
+ [Description("Draft")]
+ Draft,
+ [Description("Pending Approval")]
+ PendingApproval,
+
+ //Ready
+ [Description("Ready")]
+ Ready,
+ [Description("Approved")]
+ Approved,
+ [Description("Disrupted")]
+ Disrupted,
+
+ //All
+ [Description("Completed")]
+ Completed,
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
index 2eed3056e..0ff636493 100644
--- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
+++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs
@@ -23,6 +23,15 @@ namespace Tango.BL
}
/// <summary>
+ /// Initializes a new instance of the <see cref="ObservablesContext"/> class.
+ /// </summary>
+ /// <param name="sqliteConnection">The SQLite connection.</param>
+ public ObservablesContext(SQLiteConnection sqliteConnection) : base(sqliteConnection, true)
+ {
+
+ }
+
+ /// <summary>
/// Composes the connection string.
///</summary>
/// <param name="source">The source.</param>
@@ -36,17 +45,7 @@ namespace Tango.BL
}
else
{
- if (Path.GetExtension(source).ToLower() == ".db")
- {
- var builder = new SQLiteConnectionStringBuilder();
- builder.DataSource = source;
- builder.ForeignKeys = false;
- return builder.ConnectionString;
- }
- else
- {
- return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog=Tango;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", Path.GetFullPath(source));
- }
+ return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog=Tango;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", Path.GetFullPath(source));
}
}
@@ -56,7 +55,30 @@ namespace Tango.BL
/// <returns></returns>
public static ObservablesContext CreateDefault()
{
- return new ObservablesContext(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress);
+ return CreateDefault(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource);
+ }
+
+ /// <summary>
+ /// Creates a default remote database context by the address specified in <see cref="SettingsManager.Default.DataBase.SQLServerAddress" />.
+ /// </summary>
+ /// <returns></returns>
+ public static ObservablesContext CreateDefault(String dataSource)
+ {
+ var source = dataSource;
+
+ if (File.Exists(source) && Path.GetExtension(source).ToLower() == ".db")
+ {
+ var connection = new SQLiteConnection()
+ {
+ ConnectionString = new SQLiteConnectionStringBuilder() { DataSource = Path.GetFullPath(source), ForeignKeys = true }.ConnectionString
+ };
+
+ return new ObservablesContext(connection);
+ }
+ else
+ {
+ return new ObservablesContext(ComposeConnectionString(source));
+ }
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index 6979ca1e6..f116e5106 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -51,15 +51,16 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
@@ -114,6 +115,7 @@
<Compile Include="Enumerations\HardwareWinderTypes.cs" />
<Compile Include="Enumerations\HtmlPages.cs" />
<Compile Include="Enumerations\Ios.cs" />
+ <Compile Include="Enumerations\JobStatus.cs" />
<Compile Include="Enumerations\LiquidTypes.cs" />
<Compile Include="Enumerations\MotorTypes.cs" />
<Compile Include="Enumerations\PidControls.cs" />
@@ -249,6 +251,7 @@
<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>
@@ -286,11 +289,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.BL/app.config b/Software/Visual_Studio/Tango.BL/app.config
new file mode 100644
index 000000000..9d938150e
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/app.config
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+ </system.data>
+ <configSections>
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <entityFramework>
+ <providers>
+ <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ </providers>
+ </entityFramework>
+</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.BL/packages.config b/Software/Visual_Studio/Tango.BL/packages.config
index a2c8f52a9..143253db5 100644
--- a/Software/Visual_Studio/Tango.BL/packages.config
+++ b/Software/Visual_Studio/Tango.BL/packages.config
@@ -4,8 +4,8 @@
<package id="Google.Protobuf" version="3.4.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
<package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Core/CoreSettings.cs b/Software/Visual_Studio/Tango.Core/CoreSettings.cs
index f02e84615..2f40d0ef0 100644
--- a/Software/Visual_Studio/Tango.Core/CoreSettings.cs
+++ b/Software/Visual_Studio/Tango.Core/CoreSettings.cs
@@ -10,22 +10,29 @@ namespace Tango.Core
public class CoreSettings : SettingsBase
{
/// <summary>
+ /// Gets or sets the default data base source.
+ /// </summary>
+ public static String DefaultDataBaseSource { get; set; }
+
+ /// <summary>
/// Gets or sets the SQL server address.
/// </summary>
- public String SQLServerAddress { get; set; }
+ public String DataBaseSource { get; set; }
+
+ /// <summary>
+ /// Initializes the <see cref="DataBaseSettings"/> class.
+ /// </summary>
+ static CoreSettings()
+ {
+ DefaultDataBaseSource = "localhost\\SQLEXPRESS";
+ }
/// <summary>
/// Initializes a new instance of the <see cref="CoreSettings"/> class.
/// </summary>
public CoreSettings()
{
-
-#if DEBUG
- SQLServerAddress = "localhost\\SQLEXPRESS";
-#else
- SQLServerAddress = "twine01\\SQLTWINE";
-#endif
-
+ DataBaseSource = DefaultDataBaseSource;
}
}
}
diff --git a/Software/Visual_Studio/Tango.Core/EventArguments/MouseOrTouchEventArgs.cs b/Software/Visual_Studio/Tango.Core/EventArguments/MouseOrTouchEventArgs.cs
new file mode 100644
index 000000000..b2c09e41d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Core/EventArguments/MouseOrTouchEventArgs.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Input;
+
+namespace Tango.Core.EventArguments
+{
+ public class MouseOrTouchEventArgs : EventArgs
+ {
+ public Point Location { get; set; }
+ public Object Source { get; set; }
+ public Object OriginalSource { get; set; }
+ internal Func<IInputElement, Point> GetPositionAction { get; set; }
+ public bool Handled { get; set; }
+ public TouchDevice TouchDevice { get; set; }
+
+ public Point GetPosition(IInputElement relativeTo)
+ {
+ return GetPositionAction(relativeTo);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs
new file mode 100644
index 000000000..aeda333f3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs
@@ -0,0 +1,191 @@
+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.Controls.Primitives;
+using Tango.Core.EventArguments;
+
+public static class FrameworkElementExtensions
+{
+ public static void RegisterForMouseOrTouchDown(this FrameworkElement element, FrameworkElement relativeTo, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ bool mousePressed = false;
+ bool touchDown = false;
+
+ element.MouseDown += (x, e) =>
+ {
+ if (!touchDown)
+ {
+ mousePressed = true;
+
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetPosition(relativeTo != null ? relativeTo : element).X, e.GetPosition(relativeTo != null ? relativeTo : element).Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = e.GetPosition
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ }
+ else
+ {
+ touchDown = false;
+ }
+ };
+
+ element.TouchDown += (x, e) =>
+ {
+ if (!mousePressed)
+ {
+ touchDown = true;
+
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.X, e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; },
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ }
+ else
+ {
+ touchDown = false;
+ }
+ };
+
+ element.MouseUp += (_, __) =>
+ {
+ touchDown = false;
+ mousePressed = false;
+ };
+
+ element.TouchDown += (_, __) =>
+ {
+
+ };
+ }
+
+ public static void RegisterForMouseOrTouchDown(this FrameworkElement element, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ RegisterForMouseOrTouchDown(element, null, handler);
+ }
+
+ public static void RegisterForPreviewMouseOrTouchDown(this FrameworkElement element, FrameworkElement relativeTo, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ bool mousePressed = false;
+ bool touchDown = false;
+
+ element.PreviewMouseDown += (x, e) =>
+ {
+ if (!touchDown)
+ {
+ mousePressed = true;
+
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetPosition(relativeTo != null ? relativeTo : element).X, e.GetPosition(relativeTo != null ? relativeTo : element).Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = e.GetPosition
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ }
+ else
+ {
+ touchDown = false;
+ }
+ };
+
+ element.PreviewTouchDown += (x, e) =>
+ {
+ if (!mousePressed)
+ {
+ touchDown = true;
+
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.X, e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; },
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ }
+ else
+ {
+ touchDown = false;
+ }
+ };
+
+ element.PreviewMouseUp += (_, __) =>
+ {
+ touchDown = false;
+ mousePressed = false;
+ };
+
+ element.PreviewTouchDown += (_, __) =>
+ {
+
+ };
+ }
+
+ public static void RegisterForPreviewMouseOrTouchDown(this FrameworkElement element, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ RegisterForPreviewMouseOrTouchDown(element, null, handler);
+ }
+
+ public static void RegisterForMouseOrTouchMove(this FrameworkElement element, FrameworkElement relativeTo, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ element.MouseMove += (x, e) =>
+ {
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetPosition(relativeTo != null ? relativeTo : element).X, e.GetPosition(relativeTo != null ? relativeTo : element).Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = e.GetPosition
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ };
+
+ element.TouchMove += (x, e) =>
+ {
+ var args = new MouseOrTouchEventArgs()
+ {
+ Location = new Point(e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.X, e.GetTouchPoint(relativeTo != null ? relativeTo : element).Position.Y),
+ Source = e.Source,
+ OriginalSource = e.OriginalSource,
+ Handled = e.Handled,
+ GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; },
+ TouchDevice = e.TouchDevice,
+ };
+
+ handler(element, args);
+ e.Handled = args.Handled;
+ };
+ }
+
+ public static void RegisterForMouseOrTouchMove(this FrameworkElement element, EventHandler<MouseOrTouchEventArgs> handler)
+ {
+ RegisterForMouseOrTouchMove(element, null, handler);
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Core/Helpers/PathHelper.cs b/Software/Visual_Studio/Tango.Core/Helpers/PathHelper.cs
index cd1f4b30b..ab0a189ed 100644
--- a/Software/Visual_Studio/Tango.Core/Helpers/PathHelper.cs
+++ b/Software/Visual_Studio/Tango.Core/Helpers/PathHelper.cs
@@ -12,27 +12,14 @@ namespace Tango.Core.Helpers
/// </summary>
public static class PathHelper
{
- ///// <summary>
- ///// Creates a temporary folder in %temp%\Twine\{Random} and returns the path to that folder.
- ///// </summary>
- ///// <returns></returns>
- //public static String GetTempFolderPath()
- //{
- // String tempDirectory = Path.Combine(Path.GetTempPath(), "Twine", Path.GetRandomFileName());
- // Directory.CreateDirectory(tempDirectory);
- // return tempDirectory;
- //}
-
- ///// <summary>
- ///// Creates a temporary folder and file in %temp%\Twine\{RandomFile} and returns the path to that file.
- ///// </summary>
- ///// <returns></returns>
- //public static String GetTempFilePath()
- //{
- // String tempDirectory = Path.Combine(Path.GetTempPath(), "Twine");
- // Directory.CreateDirectory(tempDirectory);
- // return Path.Combine(tempDirectory, Path.GetRandomFileName());
- //}
+ /// <summary>
+ /// Gets the user tango folder (%appdata%\Twine\Tango).
+ /// </summary>
+ /// <returns></returns>
+ public static String GetUserTangoFolder()
+ {
+ return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Twine", "Tango");
+ }
/// <summary>
/// Gets the application startup path.
@@ -43,24 +30,6 @@ namespace Tango.Core.Helpers
return AppDomain.CurrentDomain.BaseDirectory;
}
- ///// <summary>
- ///// Tries to delete the specified folder.
- ///// </summary>
- ///// <param name="path">The folder path.</param>
- ///// <returns></returns>
- //public static bool TryDeleteFolder(String path)
- //{
- // try
- // {
- // Directory.Delete(path, true);
- // return true;
- // }
- // catch
- // {
- // return false;
- // }
- //}
-
/// <summary>
/// Tries to delete the specified file.
/// </summary>
diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
index b68925208..76ed595fa 100644
--- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
+++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
@@ -70,6 +70,7 @@
<Compile Include="DI\TangoInjectAttribute.cs" />
<Compile Include="DI\TangoIOC.cs" />
<Compile Include="DI\TangoMessenger.cs" />
+ <Compile Include="EventArguments\MouseOrTouchEventArgs.cs" />
<Compile Include="ExtendedObject.cs" />
<Compile Include="ExtensionMethods\BitmapExtensions.cs" />
<Compile Include="ExtensionMethods\BitmapSourceExtensions.cs" />
@@ -77,6 +78,7 @@
<Compile Include="ExtensionMethods\DependencyObjectExtensions.cs" />
<Compile Include="ExtensionMethods\EnumExtensions.cs" />
<Compile Include="ExtensionMethods\ExceptionExtensions.cs" />
+ <Compile Include="ExtensionMethods\FrameworkElementExtensions.cs" />
<Compile Include="ExtensionMethods\ObservableCollectionExtensions.cs" />
<Compile Include="ExtensionMethods\IEnumerableExtensions.cs" />
<Compile Include="ExtensionMethods\IMessageExtensions.cs" />
diff --git a/Software/Visual_Studio/Tango.DAL.Local/App.config b/Software/Visual_Studio/Tango.DAL.Local/App.config
index 8c1be0e4c..1b70a1173 100644
--- a/Software/Visual_Studio/Tango.DAL.Local/App.config
+++ b/Software/Visual_Studio/Tango.DAL.Local/App.config
@@ -11,15 +11,13 @@
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SQLite.EF6" />
- <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
- <remove invariant="System.Data.SQLite" />
- <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
- </DbProviderFactories>
- </system.data>
+
<connectionStrings>
<add name="LocalDB" connectionString="metadata=res://*/DB.LocalADO.csdl|res://*/DB.LocalADO.ssdl|res://*/DB.LocalADO.msl;provider=System.Data.SQLite.EF6;provider connection string=&quot;data source=D:\Development\Tango\Software\DB\Tango.db&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
-</configuration> \ No newline at end of file
+<system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+ </system.data></configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/Tango.DAL.Local.csproj b/Software/Visual_Studio/Tango.DAL.Local/Tango.DAL.Local.csproj
index 59edcd567..b9c5a8b2d 100644
--- a/Software/Visual_Studio/Tango.DAL.Local/Tango.DAL.Local.csproj
+++ b/Software/Visual_Studio/Tango.DAL.Local/Tango.DAL.Local.csproj
@@ -41,15 +41,16 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
@@ -260,11 +261,11 @@
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Local/packages.config b/Software/Visual_Studio/Tango.DAL.Local/packages.config
index bee3cc627..d44781e33 100644
--- a/Software/Visual_Studio/Tango.DAL.Local/packages.config
+++ b/Software/Visual_Studio/Tango.DAL.Local/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/App.config b/Software/Visual_Studio/Tango.DAL.Remote/App.config
index 78a5cb60c..b5df1e92b 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/App.config
+++ b/Software/Visual_Studio/Tango.DAL.Remote/App.config
@@ -11,15 +11,13 @@
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SQLite.EF6" />
- <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
- <remove invariant="System.Data.SQLite" />
- <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
- </DbProviderFactories>
- </system.data>
+
<connectionStrings>
<add name="RemoteDB" connectionString="metadata=res://*/DB.RemoteADO.csdl|res://*/DB.RemoteADO.ssdl|res://*/DB.RemoteADO.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LOCALHOST\SQLEXPRESS;initial catalog=Tango;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
-</configuration> \ No newline at end of file
+<system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+ </system.data></configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs
index 364c46d8d..90cf3df03 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs
@@ -42,6 +42,7 @@ namespace Tango.DAL.Remote.DB
public byte[] EMBROIDERY_FILE_DATA { get; set; }
public string EMBROIDERY_FILE_NAME { get; set; }
public byte[] EMBROIDERY_JPEG { get; set; }
+ public int STATUS { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<JOB_RUNS> JOB_RUNS { 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 c7d768912..b9cd34566 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -560,6 +560,7 @@
<Property Name="EMBROIDERY_FILE_DATA" Type="image" />
<Property Name="EMBROIDERY_FILE_NAME" Type="nvarchar" MaxLength="100" />
<Property Name="EMBROIDERY_JPEG" Type="image" />
+ <Property Name="STATUS" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="LINEAR_MASS_DENSITY_UNITS">
<Key>
@@ -3282,6 +3283,7 @@
<Property Name="EMBROIDERY_FILE_DATA" Type="Binary" MaxLength="Max" FixedLength="false" />
<Property Name="EMBROIDERY_FILE_NAME" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
<Property Name="EMBROIDERY_JPEG" Type="Binary" MaxLength="Max" FixedLength="false" />
+ <Property Name="STATUS" Type="Int32" Nullable="false" />
<NavigationProperty Name="JOB_RUNS" Relationship="RemoteModel.FK_JOB_RUNS_JOBS" FromRole="JOB" ToRole="JOB_RUNS" />
<NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_JOBS_MACHINES" FromRole="JOB" ToRole="MACHINE" />
<NavigationProperty Name="RML" Relationship="RemoteModel.FK_JOBS_RMLS" FromRole="JOB" ToRole="RML" />
@@ -5286,6 +5288,7 @@
<EntitySetMapping Name="JOBS">
<EntityTypeMapping TypeName="RemoteModel.JOB">
<MappingFragment StoreEntitySet="JOBS">
+ <ScalarProperty Name="STATUS" ColumnName="STATUS" />
<ScalarProperty Name="EMBROIDERY_JPEG" ColumnName="EMBROIDERY_JPEG" />
<ScalarProperty Name="EMBROIDERY_FILE_NAME" ColumnName="EMBROIDERY_FILE_NAME" />
<ScalarProperty Name="EMBROIDERY_FILE_DATA" ColumnName="EMBROIDERY_FILE_DATA" />
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 dc7bcc663..462d9d5c1 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,77 +5,77 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1">
- <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="8" PointY="71.5" />
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="38.625" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="72" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.25" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="77.75" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="74.875" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="12.75" PointY="15.125" />
- <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="3" PointY="23.5" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="15.375" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="26.625" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="10.5" PointY="21.5" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8.25" PointY="23.25" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="62.875" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="50.875" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="3" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="69" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="80.75" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="8" PointY="74.625" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="10.25" PointY="75.5" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="5.75" PointY="75.375" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="5.75" PointY="72.25" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="15.75" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="28.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="7.5" PointY="49.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="9.75" PointY="57.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="1.5" PointY="84.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="3.75" PointY="56.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="4.5" PointY="64.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="6.75" PointY="56.875" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="4.5" PointY="68.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="6.75" PointY="63.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="58.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="52.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="53.5" />
- <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="5.75" PointY="78.5" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="3" PointY="4.5" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="5.25" PointY="36.125" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="10.5" PointY="13.875" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="8.25" PointY="13.75" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="22.5" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="8.375" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="11.625" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="8.25" PointY="26.625" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="42.875" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="45.5" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="9.25" PointY="53.75" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="10.25" PointY="33" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="11.25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="25.375" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="8.25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="19.5" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="3" PointY="35.375" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="33.875" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="11" PointY="37.375" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="30.625" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="31.875" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="13" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11" PointY="29.25" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="13.25" PointY="29.375" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="10.5" PointY="17.125" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="7" />
- <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="8.75" PointY="1.75" />
- <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="8.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="8.75" PointY="7.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="10.75" PointY="1.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="10.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="10.75" PointY="9.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="12.75" PointY="1.75" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="6" PointY="19.375" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.25" PointY="23.25" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="6" PointY="3.5" />
+ <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="8" PointY="70.75" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="65.375" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="36.625" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.125" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="45.375" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="42.375" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="9.75" PointY="20.125" />
+ <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="8" PointY="56.5" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="14.25" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="31.75" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="7.5" PointY="36.5" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="5.25" PointY="38.25" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3.75" PointY="44.125" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="61.25" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="8" PointY="59.375" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="39.5" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="52.125" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="8" PointY="73.875" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="10.25" PointY="74.75" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="5.75" PointY="78" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="5.75" PointY="74.875" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="27.25" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="7.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="9.5" PointY="63.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="11.75" PointY="48.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="7.5" PointY="32.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="9.75" PointY="40.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="1.5" PointY="69.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="3.75" PointY="51" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="6.5" PointY="63.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="8.75" PointY="52.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="48.25" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="67.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="44.5" />
+ <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="5.75" PointY="71.5" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="8" PointY="1.125" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="10.25" PointY="27.75" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="7.5" PointY="18.875" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="5.25" PointY="12.625" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="21.5" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="8.375" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="8.25" PointY="10.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="5.25" PointY="4.125" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3.75" PointY="58" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="6" PointY="50.5" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="8.25" PointY="48.375" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="10.25" PointY="33.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="10.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="18.5" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="24.375" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="14.75" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="8" PointY="5" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3.75" PointY="63.625" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="8" PointY="78.875" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="25.75" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="27" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="12" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="8" PointY="66.75" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="10.25" PointY="66.875" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="7.5" PointY="22.125" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="24.125" />
+ <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="2.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="10.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="0.75" PointY="3.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="10.75" PointY="10.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="12.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="4.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="3" PointY="7" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="10.25" PointY="6.75" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="3" PointY="21" />
<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/Partials/RemoteDB.cs b/Software/Visual_Studio/Tango.DAL.Remote/Partials/RemoteDB.cs
index 3508e1137..a492df462 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/Partials/RemoteDB.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/Partials/RemoteDB.cs
@@ -49,7 +49,7 @@ namespace Tango.DAL.Remote.DB
/// <returns></returns>
public static RemoteDB CreateDefault()
{
- return new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false);
+ return new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false);
}
}
}
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 bc7c6749b..b91163282 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
+++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj
@@ -41,15 +41,16 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
@@ -334,11 +335,11 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/packages.config b/Software/Visual_Studio/Tango.DAL.Remote/packages.config
index bee3cc627..d44781e33 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/packages.config
+++ b/Software/Visual_Studio/Tango.DAL.Remote/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.0.0" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
index 606e8a2e5..9efd9f5a6 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
@@ -11,6 +11,7 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
+using Tango.Core.EventArguments;
using Tango.SharedUI.Helpers;
namespace Tango.DragAndDrop
@@ -30,7 +31,7 @@ namespace Tango.DragAndDrop
private static bool _isMouseDown;
private static DispatcherTimer _dragTimer;
private static Border _dragBorder;
- private const int MIN_DRAG_OFFSET = 8;
+ //private const int MIN_DRAG_OFFSET = 8;
#region Events
@@ -69,6 +70,37 @@ namespace Tango.DragAndDrop
#region Attached Properties
+ #region MinDragOffset
+
+ /// <summary>
+ /// Determines whether an element is MinDragOffset by the drag and drop service.
+ /// </summary>
+ public static readonly DependencyProperty MinDragOffsetProperty =
+ DependencyProperty.RegisterAttached("MinDragOffset",
+ typeof(int), typeof(DragAndDropService),
+ new FrameworkPropertyMetadata(8));
+ /// <summary>
+ /// Sets the MinDragOffset attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <param name="value">if set to <c>true</c> [value].</param>
+ public static void SetMinDragOffset(FrameworkElement element, int value)
+ {
+ element.SetValue(MinDragOffsetProperty, value);
+ }
+
+ /// <summary>
+ /// Gets the MinDragOffset attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <returns></returns>
+ public static int GetMinDragOffset(FrameworkElement element)
+ {
+ return (int)element.GetValue(MinDragOffsetProperty);
+ }
+
+ #endregion
+
#region Draggable
/// <summary>
@@ -413,7 +445,7 @@ namespace Tango.DragAndDrop
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private static void DragTimer_Tick(object sender, EventArgs e)
{
- if (Mouse.LeftButton == MouseButtonState.Pressed && _currentDragedElement != null)
+ if ((Mouse.LeftButton == MouseButtonState.Pressed) && _currentDragedElement != null)
{
DragStarted?.Invoke(_currentDragedElement, _currentDragedElement);
@@ -489,9 +521,14 @@ namespace Tango.DragAndDrop
{
_dragElements.Add(element);
- element.PreviewMouseDown += Draggable_PreviewMouseDown;
- element.MouseMove += Draggable_MouseMove;
+ element.RegisterForPreviewMouseOrTouchDown(Draggable_PreviewMouseDown);
+ element.RegisterForMouseOrTouchMove(Draggable_MouseMove);
element.PreviewMouseUp += Draggable_PreviewMouseUp;
+ element.IsManipulationEnabled = true;
+
+ //element.AddHandler(FrameworkElement.PreviewMouseDownEvent, (MouseButtonEventHandler)Draggable_PreviewMouseDown, true);
+ //element.AddHandler(FrameworkElement.MouseMoveEvent, (MouseEventHandler)Draggable_MouseMove, true);
+ //element.AddHandler(FrameworkElement.PreviewMouseUpEvent, (MouseButtonEventHandler)Draggable_PreviewMouseUp, true);
element.Unloaded += Element_Unloaded;
}
}
@@ -630,14 +667,14 @@ namespace Tango.DragAndDrop
#region Draggable Event Handlers
- /// <summary>
- /// Handles the PreviewMouseDown event of the Draggable control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.</param>
- private static void Draggable_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ private static void Draggable_PreviewMouseDown(object sender, MouseOrTouchEventArgs e)
{
- if (e.Source != sender) return;
+ var dragThumb = (sender as FrameworkElement).FindChild<DragThumb>();
+
+ if ((e.Source != sender && dragThumb == null) || (dragThumb != null && dragThumb != e.OriginalSource))
+ {
+ return;
+ }
FrameworkElement element = sender as FrameworkElement;
@@ -652,27 +689,38 @@ namespace Tango.DragAndDrop
_isMouseDown = true;
}
+
+
/// <summary>
/// Handles the MouseMove event of the Draggable control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.Input.MouseEventArgs"/> instance containing the event data.</param>
- private static void Draggable_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
+ private static void Draggable_MouseMove(object sender, MouseOrTouchEventArgs e)
{
if (_isMouseDown)
{
FrameworkElement element = _currentDragedElement;
+ int minDragOffset = GetMinDragOffset(element);
+
if (element != null)
{
var surface = GetDraggingSurface(element);
if (surface != null)
{
- if ((e.GetPosition(element).X > _mouseDownLocation.X + MIN_DRAG_OFFSET || e.GetPosition(element).X < _mouseDownLocation.X - MIN_DRAG_OFFSET) || (e.GetPosition(element).Y > _mouseDownLocation.Y + MIN_DRAG_OFFSET || e.GetPosition(element).Y < _mouseDownLocation.Y - MIN_DRAG_OFFSET))
+ if ((e.GetPosition(element).X > _mouseDownLocation.X + minDragOffset || e.GetPosition(element).X < _mouseDownLocation.X - minDragOffset) || (e.GetPosition(element).Y > _mouseDownLocation.Y + minDragOffset || e.GetPosition(element).Y < _mouseDownLocation.Y - minDragOffset))
{
element.ReleaseMouseCapture();
surface.ReleaseMouseCapture();
+
+ if (e.TouchDevice != null)
+ {
+ element.ReleaseTouchCapture(e.TouchDevice);
+ surface.ReleaseTouchCapture(e.TouchDevice);
+ }
+
_isMouseDown = false;
CreateDraggingElement();
_dragTimer.Start();
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragThumb.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragThumb.cs
new file mode 100644
index 000000000..355ce9997
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragThumb.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+
+namespace Tango.DragAndDrop
+{
+ public class DragThumb : Grid
+ {
+ public DragThumb()
+ {
+ Background = Brushes.Transparent;
+ IsHitTestVisible = true;
+ }
+
+ protected override void OnMouseDown(MouseButtonEventArgs e)
+ {
+ base.OnMouseDown(e);
+ e.Handled = true;
+ }
+
+ protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
+ {
+ base.OnPreviewMouseDown(e);
+ e.Handled = true;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
index 324bf9f90..771ed8079 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
+++ b/Software/Visual_Studio/Tango.DragAndDrop/Tango.DragAndDrop.csproj
@@ -69,6 +69,7 @@
</Compile>
<Compile Include="DragAndDropService.cs" />
<Compile Include="DraggingSurface.cs" />
+ <Compile Include="DragThumb.cs" />
<Compile Include="DropEventArgs.cs" />
</ItemGroup>
<ItemGroup>
@@ -98,6 +99,10 @@
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
<ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
<Name>Tango.SharedUI</Name>
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 961f98a24..6dc406a09 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -392,7 +392,7 @@ namespace Tango.Emulations.Emulators
{
Transporter.SendResponse<JobResponse>(new JobResponse()
{
- Status = new JobStatus()
+ Status = new PMR.Printing.JobStatus()
{
Progress = progress
}
@@ -406,7 +406,7 @@ namespace Tango.Emulations.Emulators
Transporter.SendResponse<JobResponse>(new JobResponse()
{
- Status = new JobStatus()
+ Status = new PMR.Printing.JobStatus()
{
Progress = job.Length,
}
diff --git a/Software/Visual_Studio/Tango.Synchronization/Remote/RemoteDBSynchronizer.cs b/Software/Visual_Studio/Tango.Synchronization/Remote/RemoteDBSynchronizer.cs
index 09f7fe619..79c719d0e 100644
--- a/Software/Visual_Studio/Tango.Synchronization/Remote/RemoteDBSynchronizer.cs
+++ b/Software/Visual_Studio/Tango.Synchronization/Remote/RemoteDBSynchronizer.cs
@@ -32,7 +32,7 @@ namespace Tango.Synchronization.Remote
sqlite.ClearDataBase();
}
- using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
using (var localDB = new local.LocalDB(sqliteDbFile))
{
diff --git a/Software/Visual_Studio/Tango.Synchronization/Tango.Synchronization.csproj b/Software/Visual_Studio/Tango.Synchronization/Tango.Synchronization.csproj
index f8504f906..a083b682a 100644
--- a/Software/Visual_Studio/Tango.Synchronization/Tango.Synchronization.csproj
+++ b/Software/Visual_Studio/Tango.Synchronization/Tango.Synchronization.csproj
@@ -42,15 +42,16 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
@@ -116,11 +117,11 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Synchronization/packages.config b/Software/Visual_Studio/Tango.Synchronization/packages.config
index d412cd302..104de3468 100644
--- a/Software/Visual_Studio/Tango.Synchronization/packages.config
+++ b/Software/Visual_Studio/Tango.Synchronization/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.0.0" targetFramework="net45" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Components/AttachedEventsManager.cs b/Software/Visual_Studio/Tango.Touch/Components/AttachedEventsManager.cs
new file mode 100644
index 000000000..167488c38
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Components/AttachedEventsManager.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Touch.Components
+{
+ public static class AttachedEventsManager
+ {
+
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Components/Ripple.cs b/Software/Visual_Studio/Tango.Touch/Components/Ripple.cs
index 95e51c576..2cfd2a0b8 100644
--- a/Software/Visual_Studio/Tango.Touch/Components/Ripple.cs
+++ b/Software/Visual_Studio/Tango.Touch/Components/Ripple.cs
@@ -63,6 +63,65 @@ namespace Tango.Touch.Components
public static readonly DependencyProperty SynchedScrollViewerProperty =
DependencyProperty.Register("SynchedScrollViewer", typeof(ScrollViewer), typeof(Ripple), new PropertyMetadata(null));
+ public double RippleFactor
+ {
+ get { return (double)GetValue(RippleFactorProperty); }
+ set { SetValue(RippleFactorProperty, value); }
+ }
+ public static readonly DependencyProperty RippleFactorProperty =
+ DependencyProperty.Register("RippleFactor", typeof(double), typeof(Ripple), new PropertyMetadata(5.0));
+
+ public bool Centered
+ {
+ get { return (bool)GetValue(CenteredProperty); }
+ set { SetValue(CenteredProperty, value); }
+ }
+ public static readonly DependencyProperty CenteredProperty =
+ DependencyProperty.Register("Centered", typeof(bool), typeof(Ripple), new PropertyMetadata(false));
+
+ #region Attached Properties
+
+ #region PreventRipple
+
+ /// <summary>
+ /// Determines whether an element is a dropable target by the drag and drop service.
+ /// </summary>
+ public static readonly DependencyProperty PreventRippleProperty =
+ DependencyProperty.RegisterAttached("PreventRipple",
+ typeof(bool), typeof(Ripple),
+ new FrameworkPropertyMetadata(false));
+
+ /// <summary>
+ /// Sets the PreventRipple attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <param name="value">if set to <c>true</c> [value].</param>
+ public static void SetPreventRipple(FrameworkElement element, bool value)
+ {
+ element.SetValue(PreventRippleProperty, value);
+ }
+
+ /// <summary>
+ /// Gets the PreventRipple attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <returns></returns>
+ public static bool GetPreventRipple(FrameworkElement element)
+ {
+ if (element != null)
+ {
+ return (bool)element.GetValue(PreventRippleProperty);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
static Ripple()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Ripple), new FrameworkPropertyMetadata(typeof(Ripple)));
@@ -97,6 +156,11 @@ namespace Tango.Touch.Components
if (parent == null)
{
+ parent = UIHelper.FindAncestor<DataGridRow>(this);
+ }
+
+ if (parent == null)
+ {
parent = UIHelper.FindAncestor<FrameworkElement>(this);
}
@@ -104,12 +168,23 @@ namespace Tango.Touch.Components
//parent.TouchMove += (_, __) => CancelRipple();
//parent.PreviewTouchUp += Parent_PreviewTouchUp;
- //parent.PreviewMouseDown += Parent_PreviewMouseDown;
- parent.PreviewTouchDown += Parent_PreviewTouchDown;
+ if (parent != null)
+ {
+ parent.RegisterForPreviewMouseOrTouchDown(this, (x, e) =>
+ {
+ if (!GetPreventRipple(e.OriginalSource as FrameworkElement))
+ {
+ OnRippleDown(e.Location);
+ }
+ });
+ parent.PreviewMouseUp += Parent_PreviewMouseUp;
+ }
+
+ //parent.PreviewMouseDown += Parent_PreviewMouseDown;
+ //parent.PreviewTouchDown += Parent_PreviewTouchDown;
//parent.TouchMove += (_, __) => CancelRipple();
- //parent.PreviewMouseUp += Parent_PreviewMouseUp;
- parent.PreviewTouchUp += Parent_PreviewTouchUp;
+ //parent.PreviewTouchUp += Parent_PreviewTouchUp;
}
private void Parent_PreviewMouseUp(object sender, MouseButtonEventArgs e)
@@ -157,14 +232,22 @@ namespace Tango.Touch.Components
{
_isAnimating = true;
- Canvas.SetLeft(_ellipse, position.X - (_ellipse.Width / 2));
- Canvas.SetTop(_ellipse, position.Y - (_ellipse.Height / 2));
+ if (!Centered)
+ {
+ Canvas.SetLeft(_ellipse, position.X - (_ellipse.Width / 2));
+ Canvas.SetTop(_ellipse, position.Y - (_ellipse.Height / 2));
+ }
+ else
+ {
+ Canvas.SetLeft(_ellipse, (ActualWidth / 2) - (_ellipse.Width / 2));
+ Canvas.SetTop(_ellipse, (ActualHeight / 2) - (_ellipse.Height / 2));
+ }
DoubleAnimation ani = new DoubleAnimation();
ani.From = 0;
- ani.To = 5;
+ ani.To = RippleFactor;
ani.AutoReverse = true;
- ani.Duration = TimeSpan.FromSeconds(0.5);
+ ani.Duration = TimeSpan.FromSeconds(0.3);
ani.AccelerationRatio = 0.2;
ani.DecelerationRatio = 0.2;
_scale.BeginAnimation(ScaleTransform.ScaleXProperty, ani);
diff --git a/Software/Visual_Studio/Tango.Touch/Components/Ripple.xaml b/Software/Visual_Studio/Tango.Touch/Components/Ripple.xaml
index e2aaefd67..35fc5cd88 100644
--- a/Software/Visual_Studio/Tango.Touch/Components/Ripple.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Components/Ripple.xaml
@@ -14,7 +14,7 @@
</Style.Resources>
<Setter Property="ClipToBounds" Value="True"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="RippleBrush" Value="{StaticResource RippleLightBrush}"></Setter>
+ <Setter Property="RippleBrush" Value="{StaticResource TangoRippleLightBrush}"></Setter>
<Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
<Setter Property="VerticalAlignment" Value="Stretch"></Setter>
<Setter Property="IsHitTestVisible" Value="True"></Setter>
@@ -26,14 +26,14 @@
<RectangleGeometry RadiusX="{Binding RelativeSource={RelativeSource AncestorType=local:Ripple},Path=CornerRadius.TopLeft}" RadiusY="{Binding RelativeSource={RelativeSource AncestorType=local:Ripple},Path=CornerRadius.BottomRight}" Rect="{Binding RelativeSource={RelativeSource AncestorType=local:Ripple},Path=RenderSize,Converter={StaticResource SizeToRectConverter}}"></RectangleGeometry>
</Border.Clip>
<Grid x:Name="PART_grid">
- <ContentPresenter Content="{TemplateBinding Content}" />
- <Canvas>
+ <Canvas IsHitTestVisible="False">
<Ellipse IsHitTestVisible="False" x:Name="PART_ellipse" RenderTransformOrigin="0.5,0.5" Fill="{TemplateBinding RippleBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="{TemplateBinding ActualHeight}" Width="{TemplateBinding ActualHeight}">
<Ellipse.RenderTransform>
<ScaleTransform x:Name="PART_scale" ScaleX="0" ScaleY="0"></ScaleTransform>
</Ellipse.RenderTransform>
</Ellipse>
</Canvas>
+ <ContentPresenter Content="{TemplateBinding Content}" />
</Grid>
</Border>
</ControlTemplate>
diff --git a/Software/Visual_Studio/Tango.Touch/Components/TransformationHelper.cs b/Software/Visual_Studio/Tango.Touch/Components/TransformationHelper.cs
new file mode 100644
index 000000000..e0dd4c2cd
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Components/TransformationHelper.cs
@@ -0,0 +1,153 @@
+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.Media;
+using System.Windows.Media.Animation;
+using Tango.Core.EventArguments;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.Touch.Components
+{
+ public static class TransformationHelper
+ {
+ #region TransformWhenPressed
+
+ /// <summary>
+ /// Determines whether an element is TransformWhenPressed by the drag and drop service.
+ /// </summary>
+ public static readonly DependencyProperty TransformWhenPressedProperty =
+ DependencyProperty.RegisterAttached("TransformWhenPressed",
+ typeof(bool), typeof(TransformationHelper),
+ new FrameworkPropertyMetadata(false, TransformWhenPressedChanged));
+
+ /// <summary>
+ /// TransformWhenPressed changed.
+ /// </summary>
+ /// <param name="d">The d.</param>
+ /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
+ private static void TransformWhenPressedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ if ((bool)e.NewValue)
+ {
+ RegisterTransformWhenPressed(d as FrameworkElement);
+ }
+ else
+ {
+ UnRegisterTransformWhenPressed(d as FrameworkElement);
+ }
+ }
+
+ private static void UnRegisterTransformWhenPressed(FrameworkElement element)
+ {
+
+ }
+
+ private static void RegisterTransformWhenPressed(FrameworkElement element)
+ {
+ element.RenderTransformOrigin = new Point(0.5, 0.5);
+ element.RenderTransform = new ScaleTransform(1, 1);
+ element.RegisterForPreviewMouseOrTouchDown(Element_PreviewMouseDown);
+ element.PreviewMouseUp += Element_PreviewMouseUp;
+ var scrollViewer = UIHelper.FindAncestor<ScrollViewer>(element);
+
+ if (scrollViewer != null)
+ {
+ scrollViewer.ScrollChanged += (x, y) =>
+ {
+ ScaleTransform scale = element.RenderTransform as ScaleTransform;
+ scale.BeginAnimation(ScaleTransform.ScaleXProperty, null);
+ scale.BeginAnimation(ScaleTransform.ScaleYProperty, null);
+ };
+ }
+ }
+
+ private static void Element_PreviewMouseDown(object sender, MouseOrTouchEventArgs e)
+ {
+ if (!GetPreventTransform(e.OriginalSource as FrameworkElement))
+ {
+ DoubleAnimation ani = new DoubleAnimation();
+ ani.To = 1.09;
+ ani.Duration = TimeSpan.FromSeconds(0.2);
+ ani.AutoReverse = true;
+ ScaleTransform scale = (sender as FrameworkElement).RenderTransform as ScaleTransform;
+ scale.BeginAnimation(ScaleTransform.ScaleXProperty, ani);
+ scale.BeginAnimation(ScaleTransform.ScaleYProperty, ani);
+ }
+ }
+
+ private static void Element_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ DoubleAnimation ani = new DoubleAnimation();
+ ani.To = 1;
+ ani.Duration = TimeSpan.FromSeconds(0.1);
+ ScaleTransform scale = (sender as FrameworkElement).RenderTransform as ScaleTransform;
+ scale.BeginAnimation(ScaleTransform.ScaleXProperty, ani);
+ scale.BeginAnimation(ScaleTransform.ScaleYProperty, ani);
+ }
+
+ /// <summary>
+ /// Sets the TransformWhenPressed attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <param name="value">if set to <c>true</c> [value].</param>
+ public static void SetTransformWhenPressed(FrameworkElement element, bool value)
+ {
+ element.SetValue(TransformWhenPressedProperty, value);
+ }
+
+ /// <summary>
+ /// Gets the TransformWhenPressed attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <returns></returns>
+ public static bool GetTransformWhenPressed(FrameworkElement element)
+ {
+ return (bool)element.GetValue(TransformWhenPressedProperty);
+ }
+
+ #endregion
+
+ #region PreventTransform
+
+ /// <summary>
+ /// Determines whether an element is PreventTransform by the drag and drop service.
+ /// </summary>
+ public static readonly DependencyProperty PreventTransformProperty =
+ DependencyProperty.RegisterAttached("PreventTransform",
+ typeof(bool), typeof(TransformationHelper),
+ new FrameworkPropertyMetadata(false));
+
+ /// <summary>
+ /// Sets the PreventTransform attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <param name="value">if set to <c>true</c> [value].</param>
+ public static void SetPreventTransform(FrameworkElement element, bool value)
+ {
+ element.SetValue(PreventTransformProperty, value);
+ }
+
+ /// <summary>
+ /// Gets the PreventTransform attached property.
+ /// </summary>
+ /// <param name="element">The element.</param>
+ /// <returns></returns>
+ public static bool GetPreventTransform(FrameworkElement element)
+ {
+ if (element != null)
+ {
+ return (bool)element.GetValue(PreventTransformProperty);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs
index 1974a9156..15f92bb97 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Input;
using System.Windows.Media;
namespace Tango.Touch.Controls
@@ -53,13 +54,37 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty ShadowColorProperty =
DependencyProperty.Register("ShadowColor", typeof(Color), typeof(TouchButton), new PropertyMetadata(Colors.Gray));
+ public double RippleFactor
+ {
+ get { return (double)GetValue(RippleFactorProperty); }
+ set { SetValue(RippleFactorProperty, value); }
+ }
+ public static readonly DependencyProperty RippleFactorProperty =
+ DependencyProperty.Register("RippleFactor", typeof(double), typeof(TouchButton), new PropertyMetadata(5.0));
+
+ public bool RippleCentered
+ {
+ get { return (bool)GetValue(RippleCenteredProperty); }
+ set { SetValue(RippleCenteredProperty, value); }
+ }
+ public static readonly DependencyProperty RippleCenteredProperty =
+ DependencyProperty.Register("RippleCentered", typeof(bool), typeof(TouchButton), new PropertyMetadata(false));
+
+ public Brush RippleBrush
+ {
+ get { return (Brush)GetValue(RippleBrushProperty); }
+ set { SetValue(RippleBrushProperty, value); }
+ }
+ public static readonly DependencyProperty RippleBrushProperty =
+ DependencyProperty.Register("RippleBrush", typeof(Brush), typeof(TouchButton), new PropertyMetadata(new SolidColorBrush(Colors.White) { Opacity = 0.5 }));
+
+
#endregion
public TouchButton()
{
-
- }
+ }
static TouchButton()
{
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.xaml
index ee9f53897..4a9ca1482 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.xaml
@@ -6,23 +6,28 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
+ <ResourceDictionary Source="../Resources/Fonts.xaml" />
<ResourceDictionary Source="../Controls/Shared.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:TouchButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="components:TransformationHelper.TransformWhenPressed" Value="True"></Setter>
<Setter Property="Background" Value="{StaticResource TangoPrimaryAccentBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FontWeight" Value="Medium"></Setter>
+ <Setter Property="FontSize" Value="{StaticResource TangoButtonFontSize}"></Setter>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="RippleBrush" Value="{StaticResource TangoRippleLightBrush}"></Setter>
<Setter Property="Padding" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchButton}">
<Border x:Name="border" Style="{StaticResource DropShadowBorder}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <components:Ripple CornerRadius="{TemplateBinding CornerRadius}">
+ <components:Ripple Centered="{TemplateBinding RippleCentered}" RippleBrush="{TemplateBinding RippleBrush}" RippleFactor="{TemplateBinding RippleFactor}" CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</components:Ripple>
</Border>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.cs
index cf941f069..e04ecc504 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -12,6 +13,8 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.Core.Commands;
+using Tango.DragAndDrop;
namespace Tango.Touch.Controls
{
@@ -57,9 +60,101 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty ShadowColorProperty =
DependencyProperty.Register("ShadowColor", typeof(Color), typeof(TouchDataGrid), new PropertyMetadata(Colors.Gray));
+ public bool IsDraggable
+ {
+ get { return (bool)GetValue(IsDraggableProperty); }
+ set { SetValue(IsDraggableProperty, value); }
+ }
+ public static readonly DependencyProperty IsDraggableProperty =
+ DependencyProperty.Register("IsDraggable", typeof(bool), typeof(TouchDataGrid), new PropertyMetadata(true));
+
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(TouchDataGrid), new PropertyMetadata(null));
+
+ public int SelectionDelay
+ {
+ get { return (int)GetValue(SelectionDelayProperty); }
+ set { SetValue(SelectionDelayProperty, value); }
+ }
+ public static readonly DependencyProperty SelectionDelayProperty =
+ DependencyProperty.Register("SelectionDelay", typeof(int), typeof(TouchDataGrid), new PropertyMetadata(500));
+
+ public RelayCommand ItemSelectedCommand
+ {
+ get { return (RelayCommand)GetValue(ItemSelectedCommandProperty); }
+ set { SetValue(ItemSelectedCommandProperty, value); }
+ }
+ public static readonly DependencyProperty ItemSelectedCommandProperty =
+ DependencyProperty.Register("ItemSelectedCommand", typeof(RelayCommand), typeof(TouchDataGrid), new PropertyMetadata(null));
+
+ public RelayCommand<DropEventArgs> OnDragAndDropCommand
+ {
+ get { return (RelayCommand<DropEventArgs>)GetValue(OnDragAndDropCommandProperty); }
+ set { SetValue(OnDragAndDropCommandProperty, value); }
+ }
+ public static readonly DependencyProperty OnDragAndDropCommandProperty =
+ DependencyProperty.Register("OnDragAndDropCommand", typeof(RelayCommand<DropEventArgs>), typeof(TouchDataGrid), new PropertyMetadata(null));
+
+
+
+ public IList SelectedItemsList
+ {
+ get { return (IList)GetValue(SelectedItemsListProperty); }
+ set { SetValue(SelectedItemsListProperty, value); }
+ }
+
+ public static readonly DependencyProperty SelectedItemsListProperty =
+ DependencyProperty.Register(nameof(SelectedItemsList), typeof(IList), typeof(TouchDataGrid), new PropertyMetadata(null));
+
+ protected override void OnSelectionChanged(SelectionChangedEventArgs e)
+ {
+ base.OnSelectionChanged(e);
+
+ if (SelectedItemsList != null)
+ {
+ SelectedItemsList.Clear();
+
+ foreach (var item in SelectedItems)
+ {
+ SelectedItemsList.Add(item);
+ }
+ }
+ }
+
static TouchDataGrid()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchDataGrid), new FrameworkPropertyMetadata(typeof(TouchDataGrid)));
}
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ DraggingSurface = GetTemplateChild("PART_DraggingSurface") as DraggingSurface;
+ ScrollViewer scrollViewer = GetTemplateChild("DG_ScrollViewer") as ScrollViewer;
+
+ scrollViewer.IsManipulationEnabled = false;
+ }
+
+ public IEnumerable<TouchDataGridRow> GetRows()
+ {
+ var itemsSource = ItemsSource as IEnumerable;
+ if (null == itemsSource) yield return null;
+ foreach (var item in itemsSource)
+ {
+ var row = ItemContainerGenerator.ContainerFromItem(item) as TouchDataGridRow;
+ if (null != row) yield return row;
+ }
+ }
+
+ protected override DependencyObject GetContainerForItemOverride()
+ {
+ return new TouchDataGridRow();
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml
index 454171eb8..e840d4580 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml
@@ -3,6 +3,8 @@
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:surface="http://schemas.microsoft.com/surface/2008"
xmlns:components="clr-namespace:Tango.Touch.Components"
+ xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
@@ -20,10 +22,10 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
- <Border Margin="5" Style="{StaticResource DropShadowBorder}" BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1" Background="{StaticResource TangoMidAccentBrush}">
+ <Border Margin="5 2" Style="{StaticResource DropShadowBorder}" BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1" Background="{StaticResource TangoMidAccentBrush}">
<Grid>
<DataGridColumnHeader x:Name="PART_FillerColumnHeader" IsHitTestVisible="False"/>
- <ItemsPresenter/>
+ <ItemsPresenter />
</Grid>
</Border>
</ControlTemplate>
@@ -35,44 +37,48 @@
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
<Setter Property="FontSize" Value="{StaticResource TangoColumnHeaderFontSize}"></Setter>
- <Setter Property="FontWeight" Value="SemiBold"></Setter>
+ <Setter Property="components:TransformationHelper.TransformWhenPressed" Value="True"></Setter>
+ <Setter Property="FontWeight" Value="Medium"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
<Grid>
- <Border Padding="10">
- <StackPanel Orientation="Horizontal">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- <fa:ImageAwesome VerticalAlignment="Center" Margin="5 5 0 0" Foreground="{TemplateBinding Foreground}" Height="10">
- <fa:ImageAwesome.Style>
- <Style TargetType="{x:Type fa:ImageAwesome}">
- <Setter Property="Visibility" Value="Hidden"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader},Path=SortDirection}" Value="Ascending">
- <Setter Property="Icon" Value="ChevronDown"></Setter>
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader},Path=SortDirection}" Value="Descending">
- <Setter Property="Icon" Value="ChevronUp"></Setter>
- <Setter Property="Visibility" Value="Visible"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </fa:ImageAwesome.Style>
- </fa:ImageAwesome>
- </StackPanel>
- </Border>
+ <components:Ripple RippleFactor="0.8">
+ <Border Padding="10" Background="Transparent">
+ <StackPanel Orientation="Horizontal">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ <fa:ImageAwesome VerticalAlignment="Center" Margin="5 0 0 0" Foreground="{TemplateBinding Foreground}" Height="10">
+ <fa:ImageAwesome.Style>
+ <Style TargetType="{x:Type fa:ImageAwesome}">
+ <Setter Property="Visibility" Value="Hidden"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader},Path=SortDirection}" Value="Ascending">
+ <Setter Property="Icon" Value="ChevronDown"></Setter>
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridColumnHeader},Path=SortDirection}" Value="Descending">
+ <Setter Property="Icon" Value="ChevronUp"></Setter>
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </fa:ImageAwesome.Style>
+ </fa:ImageAwesome>
+ </StackPanel>
+ </Border>
+ </components:Ripple>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
- <Style TargetType="{x:Type DataGridRow}">
+ <Style TargetType="{x:Type local:TouchDataGridRow}">
<Setter Property="Background" Value="{StaticResource TangoPrimaryBackgroundBrush}"/>
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
+ <Setter Property="components:TransformationHelper.TransformWhenPressed" Value="True"></Setter>
<Setter Property="ValidationErrorTemplate">
<Setter.Value>
<ControlTemplate>
@@ -82,30 +88,71 @@
</Setter>
<Setter Property="Template">
<Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridRow}">
- <components:Ripple SynchedScrollViewer="{Binding RelativeSource={RelativeSource AncestorType=ScrollViewer}}" CornerRadius="{Binding RelativeSource={RelativeSource AncestorType=local:TouchDataGrid},Path=CornerRadius}" RippleBrush="{StaticResource RippleDarkBrush}">
- <Border x:Name="DGR_Border" Margin="5" Style="{StaticResource DropShadowBorder}" BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
- <SelectiveScrollingGrid>
- <SelectiveScrollingGrid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </SelectiveScrollingGrid.ColumnDefinitions>
- <SelectiveScrollingGrid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </SelectiveScrollingGrid.RowDefinitions>
- <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
- <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
- </SelectiveScrollingGrid>
+ <ControlTemplate TargetType="{x:Type local:TouchDataGridRow}">
+ <Grid RenderTransformOrigin="0.5,0.5"
+ dragAndDrop:DragAndDropService.Draggable="{Binding RelativeSource={RelativeSource AncestorType=local:TouchDataGrid},Path=IsDraggable}"
+ dragAndDrop:DragAndDropService.Droppable="{Binding RelativeSource={RelativeSource AncestorType=local:TouchDataGrid},Path=IsDraggable}"
+ dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=local:TouchDataGrid},Path=DraggingSurface}"
+ dragAndDrop:DragAndDropService.MinDragOffset="2">
+
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1"></ScaleTransform>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <Trigger Property="dragAndDrop:DragAndDropService.IsDraggableOver" Value="True">
+ <Setter Property="Opacity" Value="0.5"></Setter>
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
+ <DoubleAnimation To="0.95" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleX"></DoubleAnimation>
+ <DoubleAnimation To="1" Duration="00:00:0.2" Storyboard.TargetProperty="RenderTransform.ScaleY"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <Border x:Name="DGR_Border" Margin="5 2" Style="{StaticResource DropShadowBorder}" BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+ <components:Ripple RippleFactor="20" SynchedScrollViewer="{Binding RelativeSource={RelativeSource AncestorType=ScrollViewer}}" CornerRadius="{Binding RelativeSource={RelativeSource AncestorType=local:TouchDataGrid},Path=CornerRadius}">
+ <components:Ripple.RippleBrush>
+ <SolidColorBrush Color="{StaticResource TangoMidAccentColor}" Opacity="0.5" />
+ </components:Ripple.RippleBrush>
+ <SelectiveScrollingGrid>
+ <SelectiveScrollingGrid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </SelectiveScrollingGrid.ColumnDefinitions>
+ <SelectiveScrollingGrid.RowDefinitions>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </SelectiveScrollingGrid.RowDefinitions>
+ <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
+ <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
+ </SelectiveScrollingGrid>
+ </components:Ripple>
</Border>
- </components:Ripple>
+ </Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
- <Trigger Property="IsNewItem" Value="True">
- <Setter Property="Margin" Value="{Binding NewItemMargin, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="{StaticResource TangoLightSelectedBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
@@ -114,11 +161,13 @@
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FontSize" Value="{StaticResource TangoCellFontSize}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="Padding" Value="10"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
- <Border SnapsToDevicePixels="True" Padding="10">
+ <Border SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
</Border>
</ControlTemplate>
@@ -151,15 +200,14 @@
<Setter Property="HeadersVisibility" Value="Column"></Setter>
<Setter Property="GridLinesVisibility" Value="None"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
- <Setter Property="SelectionMode" Value="Single"></Setter>
+ <Setter Property="SelectionMode" Value="Extended"></Setter>
<Setter Property="SelectionUnit" Value="FullRow"></Setter>
- <Setter Property="FontSize" Value="16"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchDataGrid}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<DockPanel>
- <ScrollViewer x:Name="DG_ScrollViewer" Focusable="false" Style="{StaticResource TouchScrollViewer}">
+ <ScrollViewer x:Name="DG_ScrollViewer" Focusable="false" Style="{StaticResource TouchScrollViewer}" IsManipulationEnabled="False">
<ScrollViewer.Template>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid>
@@ -167,7 +215,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
-
+
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" Grid.Row="1"/>
<ScrollBar Opacity="0" Grid.Row="1" x:Name="PART_VerticalScrollBar" Style="{StaticResource TouchScrollBar}" HorizontalAlignment="Right" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
@@ -192,6 +240,8 @@
</ScrollViewer.Template>
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</ScrollViewer>
+
+ <dragAndDrop:DraggingSurface x:Name="PART_DraggingSurface" />
</DockPanel>
</Border>
</ControlTemplate>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGridRow.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGridRow.cs
new file mode 100644
index 000000000..3bc298520
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGridRow.cs
@@ -0,0 +1,91 @@
+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.Input;
+using Tango.Core.EventArguments;
+using Tango.DragAndDrop;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.Touch.Controls
+{
+ public class TouchDataGridRow : DataGridRow
+ {
+ private DateTime _downTime = DateTime.Now;
+ private TimeSpan _minDownTime = TimeSpan.FromSeconds(0.3);
+ private bool _canSelect = false;
+ private TouchDataGrid _grid;
+ private bool _isLoaded;
+
+ public TouchDataGridRow()
+ {
+ this.RegisterForPreviewMouseOrTouchDown(OnMouseDown);
+ this.Loaded += (_, __) =>
+ {
+ if (!_isLoaded)
+ {
+ _grid = UIHelper.FindAncestor<TouchDataGrid>(this);
+ _isLoaded = true;
+
+ DragAndDropService.AddDropHandler(this, OnDragAndDrop);
+ }
+ };
+ }
+
+ private void OnDragAndDrop(object sender, DropEventArgs e)
+ {
+ _grid.OnDragAndDropCommand?.Execute(e);
+ }
+
+ private async void OnMouseDown(object sender, MouseOrTouchEventArgs e)
+ {
+ if (e.OriginalSource.GetType() == typeof(DragThumb))
+ {
+ _grid.GetRows().ToList().ForEach(x => x.IsSelected = false);
+ return;
+ }
+
+ Keyboard.TouchKeyboard.PressCtrl();
+
+ IsSelected = false;
+
+ _downTime = DateTime.Now;
+ await Task.Delay(_grid.SelectionDelay);
+
+ if (DateTime.Now > _downTime.AddMilliseconds(_grid.SelectionDelay))
+ {
+ _canSelect = true;
+ IsSelected = !IsSelected;
+ _canSelect = false;
+ }
+ else
+ {
+ _canSelect = true;
+ IsSelected = true;
+ _canSelect = false;
+ _grid.GetRows().Where(x => x != this).ToList().ForEach(x => x.IsSelected = false);
+
+ _grid.ItemSelectedCommand?.Execute(DataContext);
+ }
+ }
+
+ protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
+ {
+ Keyboard.TouchKeyboard.ReleaseCtrl();
+ base.OnPreviewMouseUp(e);
+ _downTime = DateTime.Now;
+ }
+
+ protected override void OnSelected(RoutedEventArgs e)
+ {
+ if (!_canSelect)
+ {
+ IsSelected = false;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.cs
new file mode 100644
index 000000000..493b0c452
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.cs
@@ -0,0 +1,34 @@
+using FontAwesome.WPF;
+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.Touch.Controls
+{
+ public class TouchIconButton : TouchButton
+ {
+ public FontAwesomeIcon Icon
+ {
+ get { return (FontAwesomeIcon)GetValue(IconProperty); }
+ set { SetValue(IconProperty, value); }
+ }
+ public static readonly DependencyProperty IconProperty =
+ DependencyProperty.Register("Icon", typeof(FontAwesomeIcon), typeof(TouchIconButton), new PropertyMetadata(FontAwesomeIcon.None));
+
+ static TouchIconButton()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchIconButton), new FrameworkPropertyMetadata(typeof(TouchIconButton)));
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
new file mode 100644
index 000000000..f0c3b5f7f
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
@@ -0,0 +1,23 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:fa="http://schemas.fontawesome.io/icons/"
+ xmlns:local="clr-namespace:Tango.Touch.Controls">
+
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="../Controls/TouchButton.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="{x:Type local:TouchIconButton}" BasedOn="{StaticResource {x:Type local:TouchButton}}">
+ <Setter Property="Icon" Value="None"></Setter>
+ <Setter Property="Width" Value="100"></Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <fa:ImageAwesome Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:TouchIconButton},Path=Foreground}" Icon="{Binding RelativeSource={RelativeSource AncestorType=local:TouchIconButton},Path=Icon}" />
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+
+</ResourceDictionary>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml
index b1740701e..81aa7e450 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml
@@ -6,6 +6,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
+ <ResourceDictionary Source="../Resources/Fonts.xaml" />
<ResourceDictionary>
<converters:LastItemInContainerToBooleanConverter x:Key="LastItemInContainerToBooleanConverter" />
</ResourceDictionary>
@@ -13,6 +14,7 @@
<Style TargetType="{x:Type local:TouchNavigationLinks}">
<Setter Property="SelectedIndex" Value="0"></Setter>
+ <Setter Property="FontSize" Value="{StaticResource TangoNavigationLinksFontSize}"></Setter>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
@@ -29,7 +31,9 @@
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="Background" Value="Transparent"/>
+ <Setter Property="components:TransformationHelper.TransformWhenPressed" Value="True"></Setter>
<Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="FontWeight" Value="Normal"></Setter>
<Setter Property="Margin" Value="0 0 10 0"></Setter>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
@@ -37,7 +41,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
- <components:Ripple CornerRadius="5" RippleBrush="{StaticResource RippleLightBrush}">
+ <components:Ripple CornerRadius="5" RippleBrush="{StaticResource TangoRippleDarkBrush}">
<StackPanel Orientation="Horizontal">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Rectangle HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="10 0 10 0" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}">
@@ -58,6 +62,7 @@
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Setter Property="FontWeight" Value="Bold"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -72,7 +77,7 @@
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<StackPanel>
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- <Line x:Name="PART_Rectangle" X1="0" X2="0" Y1="0" Y2="0" Margin="0 5 0 0" HorizontalAlignment="Left" Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="2"></Line>
+ <Line x:Name="PART_Rectangle" X1="0" X2="0" Y1="0" Y2="0" Margin="0 5 0 0" HorizontalAlignment="Left" Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="3"></Line>
</StackPanel>
</Border>
</ControlTemplate>
diff --git a/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs b/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
index d92fe4bb8..efb75d5f7 100644
--- a/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
+++ b/Software/Visual_Studio/Tango.Touch/Keyboard/TouchKeyboard.cs
@@ -50,6 +50,13 @@ namespace Tango.Touch.Keyboard
/// </summary>
public class TouchKeyboard : Control
{
+ //The system keyboard event.
+ [System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
+ static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
+ public const int KEYEVENTF_EXTENDEDKEY = 0x0001; //Key down flag
+ public const int KEYEVENTF_KEYUP = 0x0002; //Key up flag
+ public const int VK_CONTROL = 0xA3; //Control key code
+
static TouchKeyboard()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchKeyboard), new FrameworkPropertyMetadata(typeof(TouchKeyboard)));
@@ -392,6 +399,16 @@ namespace Tango.Touch.Keyboard
});
}
+ public static void PressCtrl()
+ {
+ keybd_event(VK_CONTROL, 0, KEYEVENTF_EXTENDEDKEY, 0);
+ }
+
+ public static void ReleaseCtrl()
+ {
+ keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);
+ }
+
private void OnSpecialCharactersOnChanged()
{
if (!IsSpecialCharactersOn)
diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
index 7b3886e4e..682c30d71 100644
--- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml
@@ -21,10 +21,12 @@
<Color x:Key="TangoDisabledForegroundColor">#5E5E5E</Color>
<Color x:Key="RippleLightColor">#6EFFFFFF</Color>
- <Color x:Key="RippleDarkColor">#6E000000</Color>
+ <Color x:Key="RippleDarkColor">#43929292</Color>
<Color x:Key="TangoColumnDividerColor">#464d67</Color>
+ <Color x:Key="TangoLightSelectedColor">#E3E3E3</Color>
+
<!--Brushes-->
<SolidColorBrush x:Key="TangoPrimaryBackgroundBrush" Color="{StaticResource TangoPrimaryBackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="TangoMidBackgroundBrush" Color="{StaticResource TangoMidBackgroundColor}"></SolidColorBrush>
@@ -43,9 +45,10 @@
<SolidColorBrush x:Key="TangoDisabledBackgroundBrush" Color="{StaticResource TangoDisabledBackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="TangoDisabledForegroundBrush" Color="{StaticResource TangoDisabledForegroundColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="RippleLightBrush" Color="{StaticResource RippleLightColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="RippleDarkBrush" Color="{StaticResource RippleDarkColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="TangoRippleLightBrush" Color="{StaticResource RippleLightColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="TangoRippleDarkBrush" Color="{StaticResource RippleDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="TangoColumnDividerBrush" Color="{StaticResource TangoColumnDividerColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="TangoLightSelectedBrush" Color="{StaticResource TangoLightSelectedColor}"></SolidColorBrush>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
index 1935c29f2..00247275e 100644
--- a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml
@@ -3,7 +3,11 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Tango.Touch.Resources">
- <sys:Double x:Key="TangoColumnHeaderFontSize">13</sys:Double>
-
+ <FontFamily x:Key="TangoFlexoFontFamily">Flexo</FontFamily>
+ <sys:Double x:Key="TangoColumnHeaderFontSize">15.350000000000001</sys:Double>
+ <sys:Double x:Key="TangoCellFontSize">14.75</sys:Double>
+ <sys:Double x:Key="TangoNavigationLinksFontSize">16.524999999999999</sys:Double>
+ <sys:Double x:Key="TangoButtonFontSize">17.899999999999999</sys:Double>
+ <sys:Double x:Key="TangoPageHeaderFontSize">25.474999999999998</sys:Double>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml
new file mode 100644
index 000000000..4c979c2d4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchButton.xaml
@@ -0,0 +1,25 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:controls="clr-namespace:Tango.Touch.Controls"
+ xmlns:local="clr-namespace:Tango.Touch.Styles">
+
+ <Style x:Key="TangoRoundTouchButton" TargetType="{x:Type controls:TouchButton}">
+ <Setter Property="Background" Value="{StaticResource TangoLowerAccentBrush}"></Setter>
+ <Setter Property="CornerRadius" Value="50"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
+ </Style>
+
+ <Style x:Key="TangoFlatButton" TargetType="{x:Type controls:TouchButton}">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="CornerRadius" Value="0"></Setter>
+ <Setter Property="TextElement.Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter>
+ <Setter Property="RippleBrush" Value="{StaticResource TangoRippleDarkBrush}"></Setter>
+ <Setter Property="EnableDropShadow" Value="False"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="Padding" Value="10"></Setter>
+ <Setter Property="RippleFactor" Value="10"></Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchIconButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchIconButton.xaml
new file mode 100644
index 000000000..bc150a640
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchIconButton.xaml
@@ -0,0 +1,15 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:controls="clr-namespace:Tango.Touch.Controls"
+ xmlns:components="clr-namespace:Tango.Touch.Components"
+ xmlns:local="clr-namespace:Tango.Touch.Styles">
+
+ <Style TargetType="{x:Type controls:TouchIconButton}" x:Key="TangoRoundTouchIconButton">
+ <Setter Property="Background" Value="{StaticResource TangoLowerAccentBrush}"></Setter>
+ <Setter Property="CornerRadius" Value="50"></Setter>
+ <Setter Property="RippleCentered" Value="True"></Setter>
+ <Setter Property="RippleFactor" Value="2"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml
index 36d5e73db..97a8baa8a 100644
--- a/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml
@@ -4,7 +4,7 @@
xmlns:components="clr-namespace:Tango.Touch.Components"
xmlns:local="clr-namespace:Tango.Touch.Styles">
- <Style x:Key="TouchToggleButtonHamburger" TargetType="{x:Type controls:TouchToggleButton}">
+ <Style x:Key="TangoTouchToggleButtonHamburger" TargetType="{x:Type controls:TouchToggleButton}">
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
<Setter Property="Background" Value="Transparent" />
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
index 547c90cc8..329d9dc53 100644
--- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
+++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj
@@ -68,6 +68,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Controls\TouchIconButton.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Controls\TouchNavigationLinks.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -108,6 +112,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Styles\TouchButton.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Styles\TouchIconButton.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Styles\TouchToggleButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -119,9 +131,13 @@
<Compile Include="..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Components\AttachedEventsManager.cs" />
<Compile Include="Components\Ripple.cs" />
+ <Compile Include="Components\TransformationHelper.cs" />
<Compile Include="Controls\ITouchControl.cs" />
<Compile Include="Controls\TouchBusyIndicator.cs" />
+ <Compile Include="Controls\TouchDataGridRow.cs" />
+ <Compile Include="Controls\TouchIconButton.cs" />
<Compile Include="Controls\TouchNavigationLinks.cs" />
<Compile Include="Controls\TouchButton.cs" />
<Compile Include="Controls\TouchDataGrid.cs" />
@@ -180,6 +196,10 @@
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
</ProjectReference>
+ <ProjectReference Include="..\Tango.DragAndDrop\Tango.DragAndDrop.csproj">
+ <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
+ <Name>Tango.DragAndDrop</Name>
+ </ProjectReference>
<ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
<Name>Tango.SharedUI</Name>
diff --git a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
index d31d7d550..2aa811b10 100644
--- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml
@@ -16,7 +16,10 @@
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchNavigationLinks.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchSideMenu.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchBusyIndicator.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchIconButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchButton.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchIconButton.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
diff --git a/Software/Visual_Studio/Tango.UnitTesting/App.config b/Software/Visual_Studio/Tango.UnitTesting/App.config
index 346a716a3..5c4ce34ef 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/App.config
+++ b/Software/Visual_Studio/Tango.UnitTesting/App.config
@@ -5,18 +5,13 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+ <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SQLite.EF6" />
- <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
- <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
- </system.data>
+
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -73,4 +68,11 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
-</configuration> \ No newline at end of file
+<system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+ <remove invariant="System.Data.SQLite.EF6" />
+ <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+ </DbProviderFactories>
+ </system.data></configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
index df6028b2e..305849694 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/DAL_TST.cs
@@ -4,6 +4,7 @@ using Tango.DAL;
using System.Linq;
using Tango.Settings;
using Tango.Core;
+using Tango.BL;
namespace Tango.UnitTesting
{
@@ -16,7 +17,7 @@ namespace Tango.UnitTesting
{
String guid = Guid.NewGuid().ToString();
- using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var action = new DAL.Remote.DB.ACTION_TYPES();
action.CODE = 1;
@@ -29,7 +30,7 @@ namespace Tango.UnitTesting
db.SaveChanges();
}
- using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var db = new DAL.Remote.DB.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var action = db.ACTION_TYPES.Single(x => x.GUID == guid);
db.ACTION_TYPES.Remove(action);
@@ -62,5 +63,14 @@ namespace Tango.UnitTesting
db.SaveChanges();
}
}
+
+ [TestMethod]
+ public void Validate_SQLite_Connection_Using_Observables()
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault(@"D:\Development\Tango\Software\DB\Tango.db"))
+ {
+ var actions = db.ActionTypes.ToList();
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
index 5135c5954..cbef9f4bd 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/Synchronization_TST.cs
@@ -21,7 +21,7 @@ namespace Tango.UnitTesting
{
var console = Helper.InitializeLogging(true);
- using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
using (var localDB = new local.LocalDB(Helper.GetSQLiteFilePath()))
{
@@ -45,7 +45,7 @@ namespace Tango.UnitTesting
[TestMethod]
public void Generate_Demo_Remote_Machine()
{
- using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (var remoteDB = new remote.RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
var organization = new remote.ORGANIZATION()
{
diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
index 71a9413c2..b01b6374b 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
+++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj
@@ -67,15 +67,16 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Entity.Design" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="TestStack.White, Version=0.13.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801, processorArchitecture=MSIL">
@@ -209,8 +210,8 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets'))" />
- <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.targets')" />
- <Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
+ <Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.UnitTesting/packages.config b/Software/Visual_Studio/Tango.UnitTesting/packages.config
index 16e993ae8..326273243 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/packages.config
+++ b/Software/Visual_Studio/Tango.UnitTesting/packages.config
@@ -6,9 +6,9 @@
<package id="MSTest.TestAdapter" version="1.1.11" targetFramework="net45" />
<package id="MSTest.TestFramework" version="1.1.11" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
<package id="TestStack.White" version="0.13.3" targetFramework="net46" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
index fbe3af2e5..3ba0bd082 100644
--- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
+++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs
@@ -100,7 +100,7 @@ namespace Tango.DBObservablesGenerator.CLI
//Generate Entities...
//Generate Enumerations...
- using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType))
{
@@ -267,7 +267,7 @@ namespace Tango.DBObservablesGenerator.CLI
//Generate Entities...
//Generate Enumerations...
- using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress, false))
+ using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource, false))
{
foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType))
{
diff --git a/Software/Visual_Studio/Utilities/Tango.SQLiteGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.SQLiteGenerator.CLI/Program.cs
index 9c39eeac6..43a368358 100644
--- a/Software/Visual_Studio/Utilities/Tango.SQLiteGenerator.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.SQLiteGenerator.CLI/Program.cs
@@ -12,17 +12,24 @@ using Tango.Synchronization.Conversion;
namespace Tango.SQLiteGenerator.CLI
{
+ public enum Config
+ {
+ Default,
+ CopyAll,
+ }
+
class Program
{
static void Main(string[] args)
{
String sqlitePath = args[0];
+ Config conf = args.Length > 1 ? (Config)Enum.Parse(typeof(Config), args[1]) : Config.Default;
sqlitePath = Path.GetFullPath(sqlitePath);
bool completed = false;
- String connectionString = SettingsManager.Default.GetOrCreate<CoreSettings>().SQLServerAddress;
+ String connectionString = SettingsManager.Default.GetOrCreate<CoreSettings>().DataBaseSource;
Console.WriteLine("Connecting to " + connectionString + "...");
@@ -60,14 +67,23 @@ namespace Tango.SQLiteGenerator.CLI
{
List<TableSchema> updated = schema.Where(x => x.TableName.ToLower() != "sysdiagrams").ToList();
- updated
- .Where(table => sync_configurations.Where(config => (SyncConfiguration)config.SYNC_TYPE == SyncConfiguration.OverwriteLocal).ToList()
- .Exists(config => config.TABLE_NAME == table.TableName)).ToList().ForEach(x => x.CopyData = true);
+ if (conf == Config.Default)
+ {
+ updated
+ .Where(table => sync_configurations.Where(config => (SyncConfiguration)config.SYNC_TYPE == SyncConfiguration.OverwriteLocal).ToList()
+ .Exists(config => config.TABLE_NAME == table.TableName)).ToList().ForEach(x => x.CopyData = true);
+ }
+ else if (conf == Config.CopyAll)
+ {
+ updated.ForEach(x => x.CopyData = true);
+ }
return updated;
});
SqlServerToSQLiteConverter converter = new SqlServerToSQLiteConverter();
+ converter.GenerateForeignKeys = true;
+ converter.GenerateIndexes = true;
converter.ConvertSqlServerToSQLiteDatabase(connectionString, sqlitePath, null, handler, selectionHandler, null, false, false);
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
index f6285a1db..13a3a3c1c 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.Installer/Tango.Stubs.Installer.vdproj
@@ -243,6 +243,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_BFCEC942CF3BF1B9FB6AEACA2A8753C3"
+ "OwnerKey" = "8:_61BDC9339D1440BCBC454CC904BCE79C"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_C5A4AB00302044959F446E92967BBAD4"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -459,7 +465,7 @@
"DisplayName" = "8:Debug"
"IsDebugOnly" = "11:TRUE"
"IsReleaseOnly" = "11:FALSE"
- "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.7.msi"
+ "OutputFilename" = "8:..\\..\\Build\\Debug\\Installers\\Tango Stubs Installer v1.8.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
@@ -731,7 +737,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:StubsExecutionGUI, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL"
+ "AssemblyAsmDisplayName" = "8:StubsExecutionGUI, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_61BDC9339D1440BCBC454CC904BCE79C"
@@ -1341,15 +1347,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Tango Stubs GUI"
- "ProductCode" = "8:{8CB7FCB8-7B87-4795-A15C-D9A07C479D17}"
- "PackageCode" = "8:{4E1975BC-3C41-422A-AAA3-3DC42A1C5FE5}"
+ "ProductCode" = "8:{CC56E442-9CBC-4D3A-BB41-90A952C25758}"
+ "PackageCode" = "8:{40459E65-A8AA-46F8-B259-5BE1128CABED}"
"UpgradeCode" = "8:{72B680FB-E47D-486A-A81E-6C035F2EBA42}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:1.7"
+ "ProductVersion" = "8:1.8"
"Manufacturer" = "8:Twine"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/InvokeResponseWindow.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/InvokeResponseWindow.cs
new file mode 100644
index 000000000..3b702bd91
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/InvokeResponseWindow.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ String response = null;
+
+ //Invoke the response window with default parameters.
+ response = stubManager.ShowResponseWindow();
+ stubManager.WriteLine(response);
+
+ //Invoke the response window with custom message.
+ response = stubManager.ShowResponseWindow("Please enter response:");
+ stubManager.WriteLine(response);
+
+ //Invoke the response window with custom message and default response.
+ response = stubManager.ShowResponseWindow("Please enter response:", "Default response");
+ stubManager.WriteLine(response);
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/WriteToFile.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/WriteToFile.cs
new file mode 100644
index 000000000..1d580fd5d
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Examples/WriteToFile.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+private const string FILE_PATH = "D:\\logFile.txt";
+
+public void OnExecute(StubManager stubManager)
+{
+ //This will overwrite existing file.
+ stubManager.WriteToFile(FILE_PATH, "Writing to file...");
+
+ for (int i = 0; i < 10; i++)
+ {
+ //This will append the contents to the end of the file.
+ stubManager.AppendToFile(FILE_PATH, i.ToString() + " Some text...");
+ }
+
+ stubManager.AppendToFile(FILE_PATH, "Done");
+
+ stubManager.WriteLine("Done writing to the file.");
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs
index b3bbfe8d5..3c587548f 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs
@@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyProduct("Stubs execution utility")]
[assembly: AssemblyCopyright("Twine LTD 2018")]
[assembly: AssemblyTrademark("Twine LTD")]
-[assembly: AssemblyVersion("1.7")]
-[assembly: AssemblyFileVersion("1.7")]
+[assembly: AssemblyVersion("1.8")]
+[assembly: AssemblyFileVersion("1.8")]
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/StubManager.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/StubManager.cs
index 71a0a6cb8..58040cdf4 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/StubManager.cs
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/StubManager.cs
@@ -2,14 +2,17 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Controls;
using Tango.PMR;
using Tango.PMR.Common;
+using Tango.Stubs.UI.Windows;
using Tango.Transport.Adapters;
namespace Tango.Stubs.UI
@@ -189,7 +192,7 @@ namespace Tango.Stubs.UI
if (DateTime.Now > startTime.AddSeconds(RequestTimeout))
{
done = true;
- OnFailed(new TimeoutException(String.Format("Response has failed to arrive after {0} seconds.",TimeSpan.FromMilliseconds(RequestTimeout).TotalSeconds)));
+ OnFailed(new TimeoutException(String.Format("Response has failed to arrive after {0} seconds.", TimeSpan.FromMilliseconds(RequestTimeout).TotalSeconds)));
return;
}
@@ -391,12 +394,12 @@ namespace Tango.Stubs.UI
public void WriteLine(Object obj)
{
- _writeLine(obj.ToString());
+ _writeLine(obj != null ? obj.ToString() : "null");
}
public void Write(Object obj)
{
- _write(obj.ToString());
+ _write(obj != null ? obj.ToString() : "null");
}
public void WriteLineHex(Object number, int digits)
@@ -414,6 +417,49 @@ namespace Tango.Stubs.UI
_clear();
}
+ public String ShowResponseWindow(String message, String defaultResponse)
+ {
+ String response = null;
+ bool closed = false;
+
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ TextInputWindow dlg = new TextInputWindow(message, defaultResponse);
+ dlg.WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ dlg.Owner = Application.Current.MainWindow;
+ dlg.ShowDialog();
+ response = dlg.Response;
+ closed = true;
+ });
+
+ while (!closed)
+ {
+ Thread.Sleep(10);
+ }
+
+ return response;
+ }
+
+ public String ShowResponseWindow(String message)
+ {
+ return ShowResponseWindow(message, null);
+ }
+
+ public String ShowResponseWindow()
+ {
+ return ShowResponseWindow(null);
+ }
+
+ public void WriteToFile(String filePath, String content)
+ {
+ File.WriteAllText(filePath, content + Environment.NewLine);
+ }
+
+ public void AppendToFile(String filePath, String content)
+ {
+ File.AppendAllText(filePath, content + Environment.NewLine);
+ }
+
/// <summary>
/// Raises the <see cref="Failed"/> event.
/// </summary>
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Tango.Stubs.UI.csproj b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Tango.Stubs.UI.csproj
index d4b6391db..5867800db 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Tango.Stubs.UI.csproj
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Tango.Stubs.UI.csproj
@@ -78,6 +78,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
+ <EmbeddedResource Include="Examples\InvokeResponseWindow.cs" />
+ <EmbeddedResource Include="Examples\WriteToFile.cs" />
+ <Compile Include="Windows\TextInputWindow.xaml.cs">
+ <DependentUpon>TextInputWindow.xaml</DependentUpon>
+ </Compile>
<None Include="Resources\CodeTabTemplate.cs" />
<EmbeddedResource Include="Examples\BasicRequestPolling.cs" />
<EmbeddedResource Include="Examples\ManualRequestInitialization.cs" />
@@ -113,6 +118,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Windows\TextInputWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
@@ -151,6 +160,10 @@
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</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>
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs
index a2a9cf811..379adf65f 100644
--- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/ViewModels/MainViewVM.cs
@@ -382,6 +382,9 @@ namespace Tango.Stubs.UI.ViewModels
Examples = Examples.OrderBy(x => x.Name).ToList();
Application.Current.Exit += Current_Exit;
+
+ LogManager.RegisterLogger(new Logging.FileLogger() { Enabled = true });
+ LogManager.Log("Application Started!");
}
#endregion
@@ -757,6 +760,8 @@ namespace Tango.Stubs.UI.ViewModels
private void Current_Exit(object sender, ExitEventArgs e)
{
+ LogManager.OverrideQueue = true;
+ LogManager.Log("Application Terminated");
_settings.AutoLogResponse = AppendLogAuto;
_settings.SelectedPort = SelectedPort;
_settings.BaudRate = BaudRate;
@@ -766,6 +771,8 @@ namespace Tango.Stubs.UI.ViewModels
private void AppendTextLog(String log)
{
+ LogManager.Log(log);
+
InvokeUI(() =>
{
if (_logTextBox.Text.Length > 99999)
@@ -778,6 +785,8 @@ namespace Tango.Stubs.UI.ViewModels
private void ClearTextLog()
{
+ LogManager.Log("Log Cleared -----------------------------------------------------------------");
+
InvokeUI(() =>
{
_logTextBox.Text = String.Empty;
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml
new file mode 100644
index 000000000..cae2f94fe
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml
@@ -0,0 +1,25 @@
+<mahapps:MetroWindow x:Class="Tango.Stubs.UI.Windows.TextInputWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:local="clr-namespace:Tango.Stubs.UI.Windows"
+ mc:Ignorable="d"
+ Title="Tango Stubs Execution Utility" ResizeMode="NoResize" ShowInTaskbar="False" ShowIconOnTitleBar="False" TitlebarHeight="40" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" Height="200" Width="500" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
+ <Grid>
+ <Grid Margin="10">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="40*"/>
+ <RowDefinition Height="71*"/>
+ <RowDefinition Height="60"/>
+ </Grid.RowDefinitions>
+
+ <TextBlock x:Name="lbMessage" VerticalAlignment="Center">The current operation requires you to provide some response in string format.</TextBlock>
+
+ <TextBox x:Name="txtText" Grid.Row="1" Background="#151515" Foreground="Gainsboro" VerticalAlignment="Center" BorderBrush="DimGray"></TextBox>
+
+ <Button Click="Button_Click" Grid.Row="2" HorizontalAlignment="Right" BorderThickness="0" Width="140" Height="35" VerticalAlignment="Bottom" IsDefault="True" mahapps:ButtonHelper.PreserveTextCase="True" Style="{StaticResource AccentedSquareButtonStyle}">OK</Button>
+ </Grid>
+ </Grid>
+</mahapps:MetroWindow>
diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml.cs
new file mode 100644
index 000000000..e15c690ec
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Windows/TextInputWindow.xaml.cs
@@ -0,0 +1,53 @@
+using MahApps.Metro.Controls;
+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.Shapes;
+
+namespace Tango.Stubs.UI.Windows
+{
+ /// <summary>
+ /// Interaction logic for TextInputWindow.xaml
+ /// </summary>
+ public partial class TextInputWindow : MetroWindow
+ {
+ public String Response { get; set; }
+
+ public TextInputWindow()
+ {
+ InitializeComponent();
+ this.Loaded += TextInputWindow_Loaded;
+ }
+
+ private void TextInputWindow_Loaded(object sender, RoutedEventArgs e)
+ {
+ txtText.Focus();
+ }
+
+ public TextInputWindow(String message, String defaultResponse) : this()
+ {
+ txtText.Text = defaultResponse;
+
+ if (message != null)
+ {
+ lbMessage.Text = message;
+ }
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ Response = txtText.Text;
+ DialogResult = true;
+ Close();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugCommand.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugCommand.cs
index d4f072635..5b019eddc 100644
--- a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugCommand.cs
+++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugCommand.cs
@@ -123,7 +123,7 @@ namespace Tango.BuildExtensions
String filePath = GetProjectOutputFilePath(project);
String folder = Path.GetDirectoryName(filePath);
String fileName = Path.GetFileName(filePath);
- String remoteFolder = Path.Combine(SHARED_PATH, projectName);
+ String remoteFolder = Path.Combine(dlg.SharedFolder, projectName);
String remoteFilePath = Path.Combine(remoteFolder, fileName);
DTE.Solution.SolutionBuild.BuildProject("Debug", project.FullName, true);
@@ -132,7 +132,7 @@ namespace Tango.BuildExtensions
CopyDirectory(folder, remoteFolder, true, (file) =>
{
- SetProgressText("Copying to " + file + "...");
+ SetProgressText("Copying " + Path.GetFileName(file) + "...");
});
String PsExecPath = GetFullPathToContentFile("PsExec.exe");
diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.Designer.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.Designer.cs
index bfbc8c683..f05bdc8e5 100644
--- a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.Designer.cs
+++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.Designer.cs
@@ -41,6 +41,8 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
+ this.label6 = new System.Windows.Forms.Label();
+ this.txtSharedFolder = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
@@ -48,6 +50,8 @@
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel1.Controls.Add(this.label6);
+ this.panel1.Controls.Add(this.txtSharedFolder);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.txtPass);
this.panel1.Controls.Add(this.label4);
@@ -63,7 +67,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(561, 309);
+ this.panel1.Size = new System.Drawing.Size(561, 353);
this.panel1.TabIndex = 2;
//
// label5
@@ -71,7 +75,7 @@
this.label5.AutoSize = true;
this.label5.Cursor = System.Windows.Forms.Cursors.Arrow;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label5.Location = new System.Drawing.Point(255, 145);
+ this.label5.Location = new System.Drawing.Point(255, 218);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(68, 16);
this.label5.TabIndex = 18;
@@ -82,7 +86,7 @@
this.txtPass.BackColor = System.Drawing.Color.Black;
this.txtPass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtPass.ForeColor = System.Drawing.Color.White;
- this.txtPass.Location = new System.Drawing.Point(258, 167);
+ this.txtPass.Location = new System.Drawing.Point(258, 240);
this.txtPass.Name = "txtPass";
this.txtPass.Size = new System.Drawing.Size(170, 20);
this.txtPass.TabIndex = 17;
@@ -94,7 +98,7 @@
this.label4.AutoSize = true;
this.label4.Cursor = System.Windows.Forms.Cursors.Arrow;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label4.Location = new System.Drawing.Point(98, 145);
+ this.label4.Location = new System.Drawing.Point(98, 218);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 16);
this.label4.TabIndex = 16;
@@ -105,7 +109,7 @@
this.txtUserName.BackColor = System.Drawing.Color.Black;
this.txtUserName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUserName.ForeColor = System.Drawing.Color.White;
- this.txtUserName.Location = new System.Drawing.Point(101, 167);
+ this.txtUserName.Location = new System.Drawing.Point(101, 240);
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(148, 20);
this.txtUserName.TabIndex = 15;
@@ -116,7 +120,7 @@
this.label3.AutoSize = true;
this.label3.Cursor = System.Windows.Forms.Cursors.Arrow;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(98, 81);
+ this.label3.Location = new System.Drawing.Point(98, 154);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(76, 16);
this.label3.TabIndex = 14;
@@ -138,7 +142,7 @@
this.txtHostName.BackColor = System.Drawing.Color.Black;
this.txtHostName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtHostName.ForeColor = System.Drawing.Color.White;
- this.txtHostName.Location = new System.Drawing.Point(101, 100);
+ this.txtHostName.Location = new System.Drawing.Point(101, 173);
this.txtHostName.Name = "txtHostName";
this.txtHostName.Size = new System.Drawing.Size(327, 20);
this.txtHostName.TabIndex = 12;
@@ -153,7 +157,7 @@
this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnCancel.Location = new System.Drawing.Point(314, 254);
+ this.btnCancel.Location = new System.Drawing.Point(314, 298);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(114, 42);
this.btnCancel.TabIndex = 11;
@@ -169,7 +173,7 @@
this.btnOK.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
this.btnOK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btnOK.Location = new System.Drawing.Point(434, 254);
+ this.btnOK.Location = new System.Drawing.Point(434, 298);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(114, 42);
this.btnOK.TabIndex = 10;
@@ -212,12 +216,34 @@
this.label1.Text = "Run On Remote Machine";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Cursor = System.Windows.Forms.Cursors.Arrow;
+ this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label6.Location = new System.Drawing.Point(99, 90);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(94, 16);
+ this.label6.TabIndex = 20;
+ this.label6.Text = "Shared Folder";
+ //
+ // txtSharedFolder
+ //
+ this.txtSharedFolder.BackColor = System.Drawing.Color.Black;
+ this.txtSharedFolder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.txtSharedFolder.ForeColor = System.Drawing.Color.White;
+ this.txtSharedFolder.Location = new System.Drawing.Point(102, 109);
+ this.txtSharedFolder.Name = "txtSharedFolder";
+ this.txtSharedFolder.Size = new System.Drawing.Size(327, 20);
+ this.txtSharedFolder.TabIndex = 19;
+ this.txtSharedFolder.Text = "\\\\PANEL-PC\\Shared Build";
+ //
// RemoteDebugForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
- this.ClientSize = new System.Drawing.Size(561, 309);
+ this.ClientSize = new System.Drawing.Size(561, 353);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.ForeColor = System.Drawing.Color.Gainsboro;
@@ -252,5 +278,7 @@
private System.Windows.Forms.TextBox txtPass;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtUserName;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.TextBox txtSharedFolder;
}
} \ No newline at end of file
diff --git a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.cs b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.cs
index a59a138e0..fe44ee664 100644
--- a/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.cs
+++ b/Software/Visual_Studio/VSIX/Tango.BuildExtensions/RemoteDebugForm.cs
@@ -15,6 +15,7 @@ namespace Tango.BuildExtensions
public String HostName { get; set; }
public String UserName { get; set; }
public String Password { get; set; }
+ public String SharedFolder { get; set; }
public RemoteDebugForm(String projectName)
{
@@ -37,6 +38,7 @@ namespace Tango.BuildExtensions
HostName = txtHostName.Text;
UserName = txtUserName.Text;
Password = txtPass.Text;
+ SharedFolder = txtSharedFolder.Text;
DialogResult = DialogResult.OK;
Close();
}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
index fa3d4c537..3439b8c09 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj
@@ -62,15 +62,16 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath>
+ <Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.EF6, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+ <Reference Include="System.Data.SQLite.EF6, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.108.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
- <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+ <Reference Include="System.Data.SQLite.Linq, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
@@ -249,13 +250,13 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
- <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets'))" />
<Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props'))" />
+ <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
- <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.106.0\build\net46\System.Data.SQLite.Core.targets')" />
<PropertyGroup>
<PreBuildEvent>copy /Y "$(SolutionDir)..\DB\Tango.db" "$(ProjectDir)App_Data\Tango.db"</PreBuildEvent>
</PropertyGroup>
+ <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Web.config b/Software/Visual_Studio/Web/Tango.MachineService/Web.config
index 53a9de5fd..e843f132a 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Web.config
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Web.config
@@ -87,10 +87,10 @@
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
- <system.data>
+
+<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
- </system.data>
-</configuration> \ No newline at end of file
+ </system.data></configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/packages.config b/Software/Visual_Studio/Web/Tango.MachineService/packages.config
index f7f8b6e14..fe23842ac 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/packages.config
+++ b/Software/Visual_Studio/Web/Tango.MachineService/packages.config
@@ -25,9 +25,9 @@
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="Respond" version="1.2.0" targetFramework="net45" />
- <package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.EF6" version="1.0.106.0" targetFramework="net46" />
- <package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net46" />
+ <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" />
+ <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages> \ No newline at end of file