aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-08 17:55:46 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-08 17:55:46 +0300
commit36d1edb4f9cc4fbd9c134d3b387bcfec05424537 (patch)
tree4f780184ad9d41c0ab84637116c06bcff4c1cb67 /Software
parenta2cf6c8d62083a63ee193a1cd206ab345368b242 (diff)
downloadTango-36d1edb4f9cc4fbd9c134d3b387bcfec05424537.tar.gz
Tango-36d1edb4f9cc4fbd9c134d3b387bcfec05424537.zip
Doing some work on PPC + Mirta integration.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/PPC/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/PPC/Tango_log.ldfbin0 -> 1048576 bytes
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin1572864 -> 1572864 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt2
-rw-r--r--Software/Visual_Studio/Native/Tango.ColorLib/ColorConverter.cpp2
-rw-r--r--Software/Visual_Studio/Native/Tango.ColorLib/Tango.ColorLib.vcxproj2
-rw-r--r--Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.cpp110
-rw-r--r--Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.h6
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/AsyncAdornerControl.cs48
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs17
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml21
-rw-r--r--Software/Visual_Studio/Referenced Assemblies/mscoree.dllbin0 -> 324096 bytes
-rw-r--r--Software/Visual_Studio/Referenced Assemblies/msvcp140d.dllbin0 -> 742216 bytes
-rw-r--r--Software/Visual_Studio/Referenced Assemblies/ucrtbased.dllbin0 -> 1505600 bytes
-rw-r--r--Software/Visual_Studio/Referenced Assemblies/vcruntime140.dllbin0 -> 83792 bytes
-rw-r--r--Software/Visual_Studio/Referenced Assemblies/vcruntime140d.dllbin0 -> 110424 bytes
-rw-r--r--Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs10
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs27
25 files changed, 128 insertions, 149 deletions
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf
index 73b7beea4..2084948f9 100644
--- a/Software/DB/PPC/Tango.mdf
+++ b/Software/DB/PPC/Tango.mdf
Binary files differ
diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf
new file mode 100644
index 000000000..54bf4553c
--- /dev/null
+++ b/Software/DB/PPC/Tango_log.ldf
Binary files differ
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 6c0e0cf74..a5e112137 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 4d6ecff99..ce811b928 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
index 0d0ef0a18..e53f275f3 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt
@@ -1 +1 @@
-Sun 07/08/2018 0:25:00.31
+Sun 07/08/2018 16:34:22.22
diff --git a/Software/Visual_Studio/Native/Tango.ColorLib/ColorConverter.cpp b/Software/Visual_Studio/Native/Tango.ColorLib/ColorConverter.cpp
index d398453f8..2b8131657 100644
--- a/Software/Visual_Studio/Native/Tango.ColorLib/ColorConverter.cpp
+++ b/Software/Visual_Studio/Native/Tango.ColorLib/ColorConverter.cpp
@@ -1267,7 +1267,7 @@ bool Tango::ColorLib::ColorConverter::IsInGamut(double *InLab, SURROUND sur)
VectorXd V1(3);
VectorXd V2(3);
V1 << JLab[0], JLab[1], JLab[2];
- V1 << xCoord[0], xCoord[1], xCoord[2];
+ V2 << xCoord[0], xCoord[1], xCoord[2];
double dECMC;
m_Conv02->SymmetricaldECMC(V1, V2, dECMC);
if (dECMC < dETol)
diff --git a/Software/Visual_Studio/Native/Tango.ColorLib/Tango.ColorLib.vcxproj b/Software/Visual_Studio/Native/Tango.ColorLib/Tango.ColorLib.vcxproj
index bed1cc7bb..506745a12 100644
--- a/Software/Visual_Studio/Native/Tango.ColorLib/Tango.ColorLib.vcxproj
+++ b/Software/Visual_Studio/Native/Tango.ColorLib/Tango.ColorLib.vcxproj
@@ -23,7 +23,7 @@
<ProjectGuid>{625B2A26-97A9-45C9-8BCF-6BD30F593E17}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>TangoColorLib</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
diff --git a/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.cpp b/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.cpp
index 0a21d5f25..43132ab20 100644
--- a/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.cpp
+++ b/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.cpp
@@ -36,7 +36,7 @@ GBD::~GBD()
{
}
-void GBD::TriangleRayIntersection(double *origin, double *direction, bool intersect, double *xCoor)
+void GBD::TriangleRayIntersection(double *origin, double *direction, bool &intersect, double *xCoor)
{
int i, j;
@@ -47,23 +47,36 @@ void GBD::TriangleRayIntersection(double *origin, double *direction, bool inters
double t = LargeNumber;
double u = t;
double v = t;
- double *edge1 = new double[3];
- double *edge2 = new double[3];
- double *tvec = new double[3]; // vector from vert0 to ray origin
- double *pvec = new double[3];
- double *qvec = new double[3];
+ //double *edge1 = new double[3];
+ //double *edge2 = new double[3];
+ VectorXd tvec(3);
+ VectorXd qvec(3);
+ VectorXd pvec(3);
+ VectorXd edge1(3);
+ VectorXd edge2(3);
+ VectorXd VDirection(3);
+ VDirection << direction[0], direction[1], direction[2];
+ //double *tvec = new double[3]; // vector from vert0 to ray origin
+ //double *pvec = new double[3];
+ //double *qvec = new double[3];
double det = 0;
bool angleOK = false;
for (i = 0; i < m_nTriangles; ++i)
{
for (j = 0; j < 3; ++j)
{
- edge1[j] = m_vert1[i][j] - m_vert0[i][j];
- edge2[j] = m_vert2[i][j] - m_vert0[i][j];
- tvec[j] = origin[j] - m_vert0[i][j];
+ edge1(j)= m_vert1[i][j] - m_vert0[i][j];
+ edge2(j) = m_vert2[i][j] - m_vert0[i][j];
+ tvec(j) = origin[j] - m_vert0[i][j];
}
- crossProduct(direction, edge2, pvec);
+ crossProduct(VDirection, edge2, pvec);
det = dotProduct(edge1, pvec);
+ //std::cout << "edge1 " << edge1(0) <<" "<< edge1(1) <<" "<< edge1(2) << "\n";
+ //std::cout << "edge2 " << edge2(0) << " " << edge2(1) << " " << edge2(2)<< "\n";
+ //std::cout << "tvec " << tvec(0) << " " << tvec(1) << " " << tvec(2) << "\n";
+ //std::cout << "crossProduct " << pvec(0) << " " << pvec(1) << " " << pvec(2)<< "\n";
+ //std::cout << "Det " << det << "\n";
+
switch (rtri)
{
case TwoSided:
@@ -81,9 +94,14 @@ void GBD::TriangleRayIntersection(double *origin, double *direction, bool inters
{
u = dotProduct(tvec, pvec) / det;
crossProduct(tvec, edge1, qvec);
- v = dotProduct(direction, qvec) / det;
+ v = dotProduct(VDirection, qvec) / det;
t = dotProduct(edge2, qvec) / det;
ok = (angleOK && (u >= -eps) && (v >= -eps) && ((u + v) <= 1 + eps));
+ //std::cout << "u " << u << "\n";
+ //std::cout << "v " << v << "\n";
+ //std::cout << "Qvec " << qvec(0) << " " << qvec(1) << " " << qvec(2) << "\n";
+ //std::cout << "t " << t << "\n";
+ //std::cout << "OK " << ok << "\n";
}
else
ok = false;
@@ -106,60 +124,11 @@ void GBD::TriangleRayIntersection(double *origin, double *direction, bool inters
if (intersect)
{
for (j = 0; j < 3; ++j)
- xCoor[j] = m_vert0[i][j] + edge1[j] * u + edge2[j] * v;
- if (edge1 != NULL)
- {
- delete[]edge1;
- edge1 = NULL;
- }
- if (edge2 != NULL)
- {
- delete[]edge2;
- edge2 = NULL;
- }
- if (tvec != NULL)
- {
- delete[]tvec;
- tvec = NULL;
- }
- if (qvec != NULL)
- {
- delete[]qvec;
- qvec = NULL;
- }
- if (pvec != NULL)
- {
- delete[]pvec;
- pvec = NULL;
- }
+ xCoor[j] = m_vert0[i][j] + edge1(j) * u + edge2(j) * v;
return;
}
}
- if (edge1 != NULL)
- {
- delete[]edge1;
- edge1 = NULL;
- }
- if (edge2 != NULL)
- {
- delete[]edge2;
- edge2 = NULL;
- }
- if (tvec != NULL)
- {
- delete[]tvec;
- tvec = NULL;
- }
- if (qvec != NULL)
- {
- delete[]qvec;
- qvec = NULL;
- }
- if (pvec != NULL)
- {
- delete[]pvec;
- pvec = NULL;
- }
+
return;
}
@@ -289,23 +258,24 @@ void GBD::InitData(unsigned char* colorTransformBuffer, long colorTransformFileS
// dot product of two vectors.
-double GBD::dotProduct(double *vect_A, double*vect_B)
+double GBD::dotProduct(VectorXd vect_A, VectorXd vect_B)
{
- int product = 0;
+ double product = 0.0;
// Loop for calculate dot product
- int n = sizeof(vect_A);
+
+ int n = vect_A.size();
for (int i = 0; i < n; i++)
- product = product + vect_A[i] * vect_B[i];
+ product = product + vect_A(i) * vect_B(i);
return (product);
}
// cross product of two vectors
-void GBD::crossProduct(double *vect_A, double* vect_B,double *cross_P)
+void GBD::crossProduct(VectorXd vect_A, VectorXd vect_B, VectorXd &cross_P)
{
- cross_P[0] = vect_A[1] * vect_B[2] - vect_A[2] * vect_B[1];
- cross_P[1] = vect_A[0] * vect_B[2] - vect_A[2] * vect_B[0];
- cross_P[2] = vect_A[0] * vect_B[1] - vect_A[1] * vect_B[0];
+ cross_P(0) = vect_A(1) * vect_B(2) - vect_A(2) * vect_B(1);
+ cross_P(1) = -vect_A(0) * vect_B(2) + vect_A(2) * vect_B(0);
+ cross_P(2) = vect_A(0) * vect_B(1) - vect_A(1) * vect_B(0);
return;
}
diff --git a/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.h b/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.h
index 6ef4d3a51..61aadf37a 100644
--- a/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.h
+++ b/Software/Visual_Studio/Native/Tango.ColorLib/Utils/GBD.h
@@ -14,7 +14,7 @@ public:
int GetNTriangles() { return(m_nTriangles); };
C_RGB_XYZ_Lab getCenter(){ return(m_CenterLab);};
void InitData(unsigned char* colorTransformBuffer, long colorTransformFileSize);
- void TriangleRayIntersection(double *origin, double *direction, bool intersect, double *xCoor);
+ void TriangleRayIntersection(double *origin, double *direction, bool &intersect, double *xCoor);
private:
int m_prec;
int m_nDevChan;
@@ -31,8 +31,8 @@ private:
void SetNDev_Channels(int nDevChan) { m_nDevChan = nDevChan; };
void SetNTriangles(int nTriangles) { m_nTriangles = nTriangles; };
//void SetCenter( C_RGB_XYZ_Lab CenterLab);
- double dotProduct(double *vect_A, double*vect_B);
- void crossProduct(double *vect_A, double* vect_B, double *cross_P);
+ double dotProduct(VectorXd vect_A, VectorXd vect_B);
+ void crossProduct(VectorXd vect_A, VectorXd vect_B, VectorXd &cross_P);
};
#endif
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index 260670e08..039c01771 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -221,7 +221,7 @@ namespace Tango.PPC.Jobs.ViewModels
foreach (var stop in brushStops)
{
- //stop.IsOutOfGamut = TangoColorConverter.IsOutOfGamut(stop);
+ stop.IsOutOfGamut = TangoColorConverter.IsOutOfGamut(stop);
}
}
}
@@ -445,10 +445,10 @@ namespace Tango.PPC.Jobs.ViewModels
SpoolTypes = await _db.SpoolTypes.ToListAsync();
Customers = await _db.Customers.Where(x => x.OrganizationGuid == ApplicationManager.Machine.OrganizationGuid).ToListAsync();
- //if (!_check_gamut_thread.IsAlive)
- //{
- // _check_gamut_thread.Start();
- //}
+ if (!_check_gamut_thread.IsAlive)
+ {
+ _check_gamut_thread.Start();
+ }
//Job.Segments.ReloadAsyncIdle((current, total) =>
//{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/AsyncAdornerControl.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/AsyncAdornerControl.cs
index b20e93ff9..36779c571 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/AsyncAdornerControl.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/AsyncAdornerControl.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
@@ -23,39 +24,11 @@ namespace Tango.PPC.Common.Controls
public partial class AsyncAdornerControl : ContentControl
{
private bool _loaded;
-
- public enum GWL
- {
- ExStyle = -20
- }
-
- public enum WS_EX
- {
- Transparent = 0x20,
- Layered = 0x80000
- }
-
- public enum LWA
- {
- ColorKey = 0x1,
- Alpha = 0x2
- }
-
- [DllImport("user32.dll", EntryPoint = "GetWindowLong")]
- public static extern int GetWindowLong(IntPtr hWnd, GWL nIndex);
-
- [DllImport("user32.dll", EntryPoint = "SetWindowLong")]
- public static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, int dwNewLong);
-
- [DllImport("user32.dll", EntryPoint = "SetLayeredWindowAttributes")]
- public static extern bool SetLayeredWindowAttributes(IntPtr hWnd, int crKey, byte alpha, LWA dwFlags);
-
private Window _window;
public AsyncAdornerControl()
{
Loaded += AsyncAdornerControl_Loaded;
- LayoutUpdated += AsyncAdornerControl_LayoutUpdated;
IsVisibleChanged += AsyncAdornerControl_IsVisibleChanged;
}
@@ -71,11 +44,6 @@ namespace Tango.PPC.Common.Controls
}
}
- private void AsyncAdornerControl_LayoutUpdated(object sender, EventArgs e)
- {
- SyncBounds();
- }
-
public Type ViewType
{
get { return (Type)GetValue(ViewTypeProperty); }
@@ -94,6 +62,8 @@ namespace Tango.PPC.Common.Controls
{
if (!this.IsInDesignMode())
{
+ var startTime = Process.GetCurrentProcess().StartTime;
+
if (_loaded) return;
_loaded = true;
@@ -111,6 +81,11 @@ namespace Tango.PPC.Common.Controls
Thread thread = new Thread(() =>
{
+ if (DateTime.Now < startTime.AddSeconds(5))
+ {
+ Thread.Sleep(5000);
+ }
+
_window = new Window();
_window.WindowStyle = WindowStyle.None;
_window.ResizeMode = ResizeMode.NoResize;
@@ -129,8 +104,6 @@ namespace Tango.PPC.Common.Controls
_window.ShowActivated = false;
- //FrameworkElement element = Activator.CreateInstance(type) as FrameworkElement;
-
var cloned = FrameworkElementSerializer.Deserialize(xaml);
cloned.DataContext = dc;
@@ -138,11 +111,6 @@ namespace Tango.PPC.Common.Controls
_window.Show();
- int wl = GetWindowLong(handle, GWL.ExStyle);
- wl = wl | 0x80000 | 0x20;
- SetWindowLong(handle, GWL.ExStyle, wl);
- SetLayeredWindowAttributes(handle, 0, 128, LWA.Alpha);
-
SyncBounds();
System.Windows.Threading.Dispatcher.Run();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
index f2a90a454..6df09856e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
@@ -39,7 +39,8 @@ namespace Tango.PPC.Common.Controls
{
InitializeComponent();
- Loaded += TwineCatalogControl_Loaded;
+ list.ApplyTemplate();
+ list.Loaded += TwineCatalogControl_Loaded;
DataContextChanged += (x, y) =>
{
_catalog = DataContext as Catalog;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
index ca26b7761..181c05145 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -37,7 +37,7 @@ namespace Tango.PPC.UI
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
WindowStartupLocation = WindowStartupLocation.Manual;
- Topmost = true; // sure?
+ Topmost = false; // sure?
var screens = System.Windows.Forms.Screen.AllScreens;
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 eaf53b993..4f6221144 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
@@ -316,6 +316,11 @@
<Link>DB\Tango.mdf</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="..\..\..\DB\PPC\Tango_log.ldf">
+ <Link>DB\Tango_log.ldf</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <DependentUpon>Tango.mdf</DependentUpon>
+ </Content>
<Content Include="..\..\Build\Debug\Tango.ColorLib.dll">
<Link>Tango.ColorLib.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -375,6 +380,12 @@ 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>
+RD /S /Q "$(TargetDir)pt-BR\"
+
+copy /Y "$(SolutionDir)Referenced Assemblies\mscoree.dll" "$(TargetDir)"
+copy /Y "$(SolutionDir)Referenced Assemblies\msvcp140d.dll" "$(TargetDir)"
+copy /Y "$(SolutionDir)Referenced Assemblies\ucrtbased.dll" "$(TargetDir)"
+copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140.dll" "$(TargetDir)"
+copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140d.dll" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs
index 293435d0b..dd54873ce 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs
@@ -8,6 +8,7 @@ using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
using SimpleValidator.Extensions;
using System.ComponentModel.DataAnnotations;
+using Tango.SharedUI.Helpers;
namespace Tango.PPC.UI.ViewModels
{
@@ -32,6 +33,17 @@ namespace Tango.PPC.UI.ViewModels
set { _password = value; RaisePropertyChangedAuto(); }
}
+ private bool _isLoading;
+ /// <summary>
+ /// Gets or sets a value indicating whether the application is busy with loading modules.
+ /// </summary>
+ public bool IsLoading
+ {
+ get { return _isLoading; }
+ set { _isLoading = value; RaisePropertyChangedAuto(); }
+ }
+
+
public LoginViewVM()
{
LoginCommand = new RelayCommand(Login);
@@ -49,10 +61,14 @@ namespace Tango.PPC.UI.ViewModels
{
if (Validate())
{
+ IsLoading = true;
+ UIHelper.DoEvents();
+
var user = AuthenticationProvider.Login(Email, Password);
if (user == null)
{
+ IsLoading = false;
NotificationProvider.ShowWarning("Email or password are incorrect.");
}
@@ -60,6 +76,7 @@ namespace Tango.PPC.UI.ViewModels
{
await Task.Delay(500);
await NavigationManager.NavigateTo(NavigationView.HomeModule);
+ IsLoading = false;
};
}
}
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 7d170d04f..621bfabdb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -129,7 +129,7 @@
</commonControls:AsyncAdornerControl.Style>
<Grid>
<StackPanel Orientation="Horizontal">
- <touch:TouchBusyIndicator Width="50" Height="50" IsIndeterminate="True" />
+ <touch:TouchBusyIndicator Width="50" Height="50" IsIndeterminate="{Binding NotificationProvider.IsInGlobalBusyState}" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20" Text="{Binding NotificationProvider.GlobalBusyMessage}"></TextBlock>
</StackPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
index 6fbf713e9..74bb85e7d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
@@ -5,6 +5,7 @@
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:controls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.UI.Views"
@@ -16,14 +17,24 @@
<TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Login to your account</TextBlock>
<StackPanel Margin="0 60 0 0">
- <touch:TouchTextBox Text="{Binding Email,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" Watermark="Email" KeyboardMode="Email" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
- <touch:TouchTextBox Text="{Binding Password,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" IsPassword="True" Margin="0 40 0 0" Watermark="Password" KeyboardMode="AlphaNumeric" KeyboardAction="Go" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
+ <StackPanel Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <touch:TouchTextBox Text="{Binding Email,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" Watermark="Email" KeyboardMode="Email" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
+ <touch:TouchTextBox Text="{Binding Password,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" IsPassword="True" Margin="0 40 0 0" Watermark="Password" KeyboardMode="AlphaNumeric" KeyboardAction="Go" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
- <touch:TouchCheckBox Margin="0 30 0 0">Keep me logged in.</touch:TouchCheckBox>
+ <touch:TouchCheckBox Margin="0 30 0 0">Keep me logged in.</touch:TouchCheckBox>
- <touch:TouchButton Height="60" Margin="0 30 0 0" CornerRadius="3" IsDefault="True" DelayCommand="{Binding LoginCommand}" DelayCommandDuration="00:00:0.2">LOGIN</touch:TouchButton>
+ <touch:TouchButton Height="60" Margin="0 30 0 0" CornerRadius="3" IsDefault="True" DelayCommand="{Binding LoginCommand}" DelayCommandDuration="00:00:0.4">LOGIN</touch:TouchButton>
- <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
+ </StackPanel>
+ <StackPanel>
+ <controls:AsyncAdornerControl Height="130" Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel>
+ <touch:TouchBusyIndicator IsIndeterminate="{Binding IsLoading}" Width="80" Height="80" />
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoTitleFontSize}">Logging in...</TextBlock>
+ </StackPanel>
+ </controls:AsyncAdornerControl>
+ </StackPanel>
</StackPanel>
</StackPanel>
</Grid>
diff --git a/Software/Visual_Studio/Referenced Assemblies/mscoree.dll b/Software/Visual_Studio/Referenced Assemblies/mscoree.dll
new file mode 100644
index 000000000..9b0a8636d
--- /dev/null
+++ b/Software/Visual_Studio/Referenced Assemblies/mscoree.dll
Binary files differ
diff --git a/Software/Visual_Studio/Referenced Assemblies/msvcp140d.dll b/Software/Visual_Studio/Referenced Assemblies/msvcp140d.dll
new file mode 100644
index 000000000..255a33137
--- /dev/null
+++ b/Software/Visual_Studio/Referenced Assemblies/msvcp140d.dll
Binary files differ
diff --git a/Software/Visual_Studio/Referenced Assemblies/ucrtbased.dll b/Software/Visual_Studio/Referenced Assemblies/ucrtbased.dll
new file mode 100644
index 000000000..53f9d814f
--- /dev/null
+++ b/Software/Visual_Studio/Referenced Assemblies/ucrtbased.dll
Binary files differ
diff --git a/Software/Visual_Studio/Referenced Assemblies/vcruntime140.dll b/Software/Visual_Studio/Referenced Assemblies/vcruntime140.dll
new file mode 100644
index 000000000..2f8ef29c6
--- /dev/null
+++ b/Software/Visual_Studio/Referenced Assemblies/vcruntime140.dll
Binary files differ
diff --git a/Software/Visual_Studio/Referenced Assemblies/vcruntime140d.dll b/Software/Visual_Studio/Referenced Assemblies/vcruntime140d.dll
new file mode 100644
index 000000000..4bde6e99b
--- /dev/null
+++ b/Software/Visual_Studio/Referenced Assemblies/vcruntime140d.dll
Binary files differ
diff --git a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
index d80accb6a..210d4d3e8 100644
--- a/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
+++ b/Software/Visual_Studio/Tango.BL/ColorConversion/TangoColorConverter.cs
@@ -1,6 +1,7 @@
using Google.Protobuf;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
@@ -23,6 +24,7 @@ namespace Tango.BL.ColorConversion
NativePMR<ConversionInput, ConversionOutput> nativePMR = new NativePMR<ConversionInput, ConversionOutput>(Convert);
ConversionOutput output = nativePMR.Invoke(conversionInput);
+
return output;
}
@@ -87,16 +89,12 @@ namespace Tango.BL.ColorConversion
conversionInput.ColorSpace = (PMR.ColorLab.ColorSpace)brushStop.ColorSpace.Code;
conversionInput.InputCoordinates = new InputCoordinates();
- conversionInput.SegmentLength = 10; //TODO: for gradient ?
+ conversionInput.SegmentLength = brushStop.Segment.Length; //TODO: for gradient ?
conversionInput.InputCoordinates.Red = Math.Max(brushStop.Red, 1);
conversionInput.InputCoordinates.Green = Math.Max(brushStop.Green, 1);
conversionInput.InputCoordinates.Blue = Math.Max(brushStop.Blue, 1);
- //conversionInput.InputCoordinates.Red = 50;
- //conversionInput.InputCoordinates.Green = 100;
- //conversionInput.InputCoordinates.Blue = 200;
-
conversionInput.InputCoordinates.L = brushStop.L;
conversionInput.InputCoordinates.A = brushStop.A;
conversionInput.InputCoordinates.B = brushStop.B;
@@ -110,7 +108,7 @@ namespace Tango.BL.ColorConversion
conversionInput.ThreadA = 2.2555;//brushStop.Segment.Job.Rml.MediaColor.A;
conversionInput.ThreadB = -10.9325;//brushStop.Segment.Job.Rml.MediaColor.B;
- conversionInput.ForwardData = ByteString.CopyFrom(File.ReadAllBytes(@"D:\Development\Tango\Software\ColorData\CCT\test.cct")); //ByteString.CopyFrom(brushStop.Segment.Job.Rml.Ccts.FirstOrDefault().ForwardData);
+ conversionInput.ForwardData = ByteString.CopyFrom(brushStop.Segment.Job.Rml.Ccts.FirstOrDefault().ForwardData);
foreach (var ids_pack in brushStop.Segment.Job.Machine.Configuration.IdsPacks.OrderBy(x => x.PackIndex))
{
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
index fa5dc4acb..1eda2b300 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/BrushStop.cs
@@ -369,7 +369,7 @@ namespace Tango.BL.Entities
_b = lab.B;
//TODO: Remove this..
- IsOutOfGamut = _red > 250;
+ //IsOutOfGamut = _red > 250;
});
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
index 46c49efd2..74b8458bf 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
@@ -711,23 +711,26 @@ namespace Tango.Touch.Controls
public void ScrollToPosition(double y)
{
- if (_grid_content.ActualHeight > _border_viewport.ActualHeight)
+ if (_grid_content != null)
{
- if (y < 0)
+ if (_grid_content.ActualHeight > _border_viewport.ActualHeight)
{
- y = 0;
- }
- if (-y - _border_viewport.ActualHeight < -_grid_content.ActualHeight)
- {
- y = (_grid_content.ActualHeight - _border_viewport.ActualHeight);
- }
+ if (y < 0)
+ {
+ y = 0;
+ }
+ if (-y - _border_viewport.ActualHeight < -_grid_content.ActualHeight)
+ {
+ y = (_grid_content.ActualHeight - _border_viewport.ActualHeight);
+ }
- _grid_content.BeginAnimation(Grid.MarginProperty, null);
+ _grid_content.BeginAnimation(Grid.MarginProperty, null);
- _grid_content.Margin = new Thickness(0, -y, 0, 0);
- }
+ _grid_content.Margin = new Thickness(0, -y, 0, 0);
+ }
- SnapContentToBounds();
+ SnapContentToBounds();
+ }
}
public double GetScrollPosition()