aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-08 17:48:58 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-08 17:48:58 +0300
commita0e25846735104f09a18647220db59804977e73a (patch)
tree63d918543e6862329dd08d4e6db3524ecc199390
parent17a77c30765fe8a0d3ca57a9ec60fb43b82432d2 (diff)
downloadTango-a0e25846735104f09a18647220db59804977e73a.tar.gz
Tango-a0e25846735104f09a18647220db59804977e73a.zip
Fixed issue with
"Application Started" event. Fixed issue with segment indexing after emb import.
-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/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs4
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs (renamed from Software/Visual_Studio/Tango.BL/ExtensionMethods/MediaColor.cs)0
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj2
9 files changed, 25 insertions, 20 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index e570d5638..dff82fd11 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 1589c0595..b6a391fd4 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 63994f592..7891f96b7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -1752,7 +1752,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
segment.Length = totalLength;
segment.Name = "Embroidery Segment";
- segment.SegmentIndex = vm.Paths.IndexOf(path) + 2;
+ segment.SegmentIndex = vm.Paths.IndexOf(path);
if (path.Brush is SolidColorBrush)
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
index 91aa049e9..f3ae1002b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs
@@ -78,21 +78,28 @@ namespace Tango.MachineStudio.Common.EventLogging
{
if (!_isInitialized)
{
- _db = ObservablesContext.CreateDefault();
- _db.Configuration.LazyLoadingEnabled = false;
+ try
+ {
+ _db = ObservablesContext.CreateDefault();
+ _db.Configuration.LazyLoadingEnabled = false;
- _db.ActionTypes.ToList();
- _db.EventTypesActions.ToList();
- _db.EventTypesCategories.ToList();
- _db.EventTypesGroups.ToList();
- _db.EventTypes.ToList();
+ _db.ActionTypes.ToList();
+ _db.EventTypesActions.ToList();
+ _db.EventTypesCategories.ToList();
+ _db.EventTypesGroups.ToList();
+ _db.EventTypes.ToList();
- foreach (var type in _db.EventTypes)
+ foreach (var type in _db.EventTypes)
+ {
+ _eventTypesGuids.Add((EventTypes)type.Code, type);
+ }
+
+ _isInitialized = true;
+ }
+ catch
{
- _eventTypesGuids.Add((EventTypes)type.Code, type);
+ _isInitialized = false;
}
-
- _isInitialized = true;
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
index 8b3233ab1..76c7b3e58 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
@@ -50,12 +50,6 @@ namespace Tango.MachineStudio.UI
exceptionTrapper = new WpfGlobalExceptionTrapper();
exceptionTrapper.Initialize(this);
exceptionTrapper.ApplicationCrashed += ExceptionTrapper_ApplicationCrashed;
-
- var eventLogger = ServiceLocator.Current.GetInstance<IEventLogger>();
- if (eventLogger != null)
- {
- eventLogger.Log(EventTypes.ApplicationStarted, "Application Started!");
- }
}
#region Global Exception Trapping
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
index 5776cadc2..512341f7e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
@@ -14,6 +14,7 @@ using Tango.MachineStudio.Common.StudioApplication;
using Tango.SharedUI;
using Tango.BL;
using Tango.MachineStudio.Common.EventLogging;
+using Tango.BL.Enumerations;
namespace Tango.MachineStudio.UI.ViewModels
{
@@ -66,6 +67,9 @@ namespace Tango.MachineStudio.UI.ViewModels
try
{
ObservablesEntitiesAdapter.Instance.Initialize();
+
+ _eventLogger.Log(EventTypes.ApplicationStarted, "Application Started!");
+
InvokeUI(() =>
{
_studioModuleLoader.LoadModules();
diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs
index e00715795..ff32ba02f 100644
--- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Machine.cs
@@ -31,7 +31,7 @@ namespace Tango.BL.Entities
foreach (var segment in job.Segments)
{
- segment.SegmentIndex = job.Segments.IndexOf(segment);
+ //segment.SegmentIndex = job.Segments.IndexOf(segment);
foreach (var stop in segment.BrushStops)
{
diff --git a/Software/Visual_Studio/Tango.BL/ExtensionMethods/MediaColor.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs
index e4a312775..e4a312775 100644
--- a/Software/Visual_Studio/Tango.BL/ExtensionMethods/MediaColor.cs
+++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/MediaColor.cs
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index d56324d8f..04c1b0a6b 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -97,7 +97,7 @@
<Compile Include="Enumerations\EventTypes.cs" />
<Compile Include="Enumerations\EventTypesCategories.cs" />
<Compile Include="Enumerations\EventTypesGroups.cs" />
- <Compile Include="ExtensionMethods\MediaColor.cs" />
+ <Compile Include="EntitiesExtensions\MediaColor.cs" />
<Compile Include="LiquidVolume.cs" />
<Compile Include="Entities\ActionType.cs" />
<Compile Include="Entities\Address.cs" />