From e111c33bc87acf40202f9e5423e21b087a366f07 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 7 Jan 2019 16:06:38 +0200 Subject: Added new events !!! --- .../EventTypeActionsToStringConverter.cs | 40 ------------ .../Tango.MachineStudio.DB.csproj | 48 +-------------- .../Tango.MachineStudio.DB/ViewModelLocator.cs | 28 --------- .../ViewModels/ActionTypesViewVM.cs | 18 ------ .../ViewModels/EventTypesGroupsViewVM.cs | 17 ------ .../ViewModels/EventTypesViewVM.cs | 71 ---------------------- .../Views/DBViews/ActionTypeView.xaml | 31 ---------- .../Views/DBViews/ActionTypeView.xaml.cs | 28 --------- .../Views/DBViews/ActionTypesView.xaml | 25 -------- .../Views/DBViews/ActionTypesView.xaml.cs | 32 ---------- .../Views/DBViews/EventTypeView.xaml | 55 ----------------- .../Views/DBViews/EventTypeView.xaml.cs | 34 ----------- .../Views/DBViews/EventTypesGroupView.xaml | 31 ---------- .../Views/DBViews/EventTypesGroupView.xaml.cs | 28 --------- .../Views/DBViews/EventTypesGroupsView.xaml | 26 -------- .../Views/DBViews/EventTypesGroupsView.xaml.cs | 30 --------- .../Views/DBViews/EventTypesView.xaml | 38 ------------ .../Views/DBViews/EventTypesView.xaml.cs | 30 --------- .../ViewModels/MainViewVM.cs | 4 +- .../ViewModels/MainViewVM.cs | 10 +-- .../ViewModels/EventsViewVM.cs | 6 +- .../Views/EventDetailsView.xaml | 4 +- .../Views/EventsView.xaml | 10 +-- .../EventLogging/DefaultEventLogger.cs | 16 ++--- .../Html/IHtmlPresenter.cs | 14 ----- .../Tango.MachineStudio.Common.csproj | 3 +- .../Html/DefaultHtmlPresenter.cs | 25 -------- .../Html/HTML Templates/Thread Break.html | 48 --------------- .../Tango.MachineStudio.UI/Html/HtmlWindow.xaml | 37 ----------- .../Tango.MachineStudio.UI/Html/HtmlWindow.xaml.cs | 48 --------------- .../DefaultStudioApplicationManager.cs | 2 +- .../Tango.MachineStudio.UI.csproj | 11 +--- .../Tango.MachineStudio.UI/ViewModelLocator.cs | 4 -- .../ViewModels/LoginViewVM.cs | 2 +- .../ViewModels/MainViewVM.cs | 21 +------ 35 files changed, 29 insertions(+), 846 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Html/IHtmlPresenter.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/DefaultHtmlPresenter.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HTML Templates/Thread Break.html delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs deleted file mode 100644 index b33259e3e..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Data; -using Tango.BL.Entities; -using Tango.MachineStudio.DB.ViewModels; - -namespace Tango.MachineStudio.DB.Converters -{ - /// - /// Converts an event type action to string representation. - /// - /// - public class EventTypeActionsToStringConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) return ""; - - if (value is IEnumerable) - { - IEnumerable eventActions = value as IEnumerable; - return String.Join(", ", eventActions.Select(x => x.ActionType.Name)); - } - else - { - IEnumerable> eventActions = value as IEnumerable>; - return String.Join(", ", eventActions.Where(x => x.IsSelected).Select(x => x.Entity.Name)); - } - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index e719464f8..da427f4d8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -80,13 +80,11 @@ - - @@ -96,13 +94,11 @@ - - @@ -132,24 +128,12 @@ - - ActionTypesView.xaml - - - ActionTypeView.xaml - SpoolTypesView.xaml SpoolTypeView.xaml - - EventTypesGroupsView.xaml - - - EventTypesGroupView.xaml - HardwarePidControlTypesView.xaml @@ -354,18 +338,12 @@ OrganizationView.xaml - - EventTypesView.xaml - LiquidTypesRmlsView.xaml UsersView.xaml - - EventTypeView.xaml - LiquidTypesRmlView.xaml @@ -387,14 +365,6 @@ - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -403,14 +373,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -683,10 +645,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -695,10 +653,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -780,7 +734,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 409b66e12..736682e07 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -37,8 +37,6 @@ namespace Tango.MachineStudio.DB TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); @@ -62,8 +60,6 @@ namespace Tango.MachineStudio.DB TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); } @@ -211,22 +207,6 @@ namespace Tango.MachineStudio.DB } } - public static EventTypesViewVM EventTypesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static ActionTypesViewVM ActionTypesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - public static ContactsViewVM ContactsViewVM { get @@ -379,14 +359,6 @@ namespace Tango.MachineStudio.DB } } - public static EventTypesGroupsViewVM EventTypesGroupsViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - public static SpoolTypesViewVM SpoolTypesViewVM { get diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs deleted file mode 100644 index 69092a70d..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ActionTypesViewVM.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.MachineStudio.Common.Notifications; - -namespace Tango.MachineStudio.DB.ViewModels -{ - public class ActionTypesViewVM : DbTableViewModel - { - public ActionTypesViewVM(INotificationProvider notification) : base(notification) - { - - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs deleted file mode 100644 index abdb00e32..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesGroupsViewVM.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.MachineStudio.Common.Notifications; - -namespace Tango.MachineStudio.DB.ViewModels -{ - public class EventTypesGroupsViewVM : DbTableViewModel - { - public EventTypesGroupsViewVM(INotificationProvider notification) : base(notification) - { - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs deleted file mode 100644 index 6702b720f..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.MachineStudio.Common.Notifications; - -namespace Tango.MachineStudio.DB.ViewModels -{ - public class EventTypesViewVM : DbTableViewModel - { - public EventTypesViewVM(INotificationProvider notification) : base(notification) - { - SelectedActions = new ObservableCollection>(); - } - - private ObservableCollection> _selectedActions; - public ObservableCollection> SelectedActions - { - get { return _selectedActions; } - set { _selectedActions = value; RaisePropertyChangedAuto(); } - } - - protected override void OnEdit() - { - SelectedActions = Adapter.ActionTypes.Select(x => new MultiComboVM(x, () => RaisePropertyChanged(nameof(SelectedActions)))).ToObservableCollection(); - - foreach (var actionType in SelectedActions) - { - if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionType == actionType.Entity)) - { - actionType.IsSelected = true; - } - } - - base.OnEdit(); - } - - protected override void OnAdd() - { - SelectedActions = Adapter.ActionTypes.Select(x => new MultiComboVM(x, () => RaisePropertyChanged(nameof(SelectedActions)))).ToObservableCollection(); - - base.OnAdd(); - } - - protected override void OnBeforeEntitySave(DialogOpenMode mode, EventType eventType) - { - base.OnBeforeEntitySave(mode, eventType); - - - - Adapter.Context.EventTypesActions.RemoveRange(eventType.EventTypesActions); - - foreach (var actionType in SelectedActions) - { - if (actionType.IsSelected) - { - eventType.EventTypesActions.Add(new EventTypesAction() - { - ActionType = actionType.Entity, - EventType = eventType, - ActionTypeGuid = actionType.Entity.Guid, - EventTypeGuid = eventType.Guid - }); - } - } - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml deleted file mode 100644 index 11a472edb..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs deleted file mode 100644 index 05a56fb89..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypeView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for MachineView.xaml - /// - public partial class ActionTypeView : UserControl - { - public ActionTypeView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml deleted file mode 100644 index a9a14fb0c..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs deleted file mode 100644 index aad79c87a..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ActionTypesView.xaml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.MachineStudio.DB.CustomAttributes; -using Tango.MachineStudio.DB.Managers; -using Tango.SharedUI.Controls; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for MachinesView.xaml - /// - [DBView] - public partial class ActionTypesView : UserControl - { - public ActionTypesView() : base() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml deleted file mode 100644 index 4c1111ed7..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs deleted file mode 100644 index 6294b14e7..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypeView.xaml.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UserView.xaml - /// - public partial class EventTypeView : UserControl - { - public EventTypeView() - { - InitializeComponent(); - } - - private void comboRoles_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - comboActions.SelectedItem = null; - comboActions.Text = "Press to select"; - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml deleted file mode 100644 index 8f8ec1eae..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs deleted file mode 100644 index e164fa171..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UserView.xaml - /// - public partial class EventTypesGroupView : UserControl - { - public EventTypesGroupView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml deleted file mode 100644 index e6dff7f8a..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs deleted file mode 100644 index c11aeccc4..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesGroupsView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.MachineStudio.DB.CustomAttributes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UsersView.xaml - /// - [DBView] - public partial class EventTypesGroupsView : UserControl - { - public EventTypesGroupsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml deleted file mode 100644 index 19700c976..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs deleted file mode 100644 index 3c197b7f2..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EventTypesView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.MachineStudio.DB.CustomAttributes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UsersView.xaml - /// - [DBView] - public partial class EventTypesView : UserControl - { - public EventTypesView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs index 9876dca9e..3d282367a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs @@ -377,7 +377,7 @@ namespace Tango.MachineStudio.DataCapture.ViewModels using (_notification.PushTaskItem("Starting Recording...")) { Recorder.Start(); - _eventLogger.Log(EventTypes.RecordingStarted, "Recording Started..."); + _eventLogger.Log(EventTypes.RECORDING_STARTED, "Recording Started..."); _recordingBarItem.Push(); } @@ -393,7 +393,7 @@ namespace Tango.MachineStudio.DataCapture.ViewModels await Recorder.Stop(); _recordingBarItem.Pop(); - _eventLogger.Log(EventTypes.RecordingStopped, "Recording Stopped..."); + _eventLogger.Log(EventTypes.RECORDING_STOPPED, "Recording Stopped..."); } String recordingName = _notification.ShowTextInput("Enter recording name", "Recording name"); 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 8b0a89336..8ac8e6acd 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 @@ -738,8 +738,8 @@ namespace Tango.MachineStudio.Developer.ViewModels RemoveBrushStopCommand = new RelayCommand(RemoveSelectedBrushStops, () => SelectedBrushStop != null && CanWork); SaveJobCommand = new RelayCommand(SaveActiveJob, () => SelectedMachine != null && CanWork); DiscardJobCommand = new RelayCommand(BackToJobs, () => SelectedMachine != null && CanWork); - StartJobCommand = new RelayCommand(() => StartJob(), () => ActiveJob != null && CanWork && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution))); - StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.PreventJobExecution))); + StartJobCommand = new RelayCommand(() => StartJob(), () => ActiveJob != null && CanWork && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.PreventJob))); + StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && !MachineOperator.MachineEventsStateProvider.Events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.PreventJob))); StopJobCommand = new RelayCommand(StopJob, () => IsJobRunning && CanWork); CloseJobCompletionStatusCommand = new RelayCommand(CloseJobCompletionStatusBar); LoadJobCommand = new RelayCommand(() => LoadSelectedJob(), () => SelectedMachineJob != null && CanWork); @@ -1052,7 +1052,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { _speech.SpeakError(events.Last().EventType.Name); - if (events.ToList().Exists(x => x.ActionTypes.Contains(BL.Enumerations.ActionTypes.AbortRunningJob))) + if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob))) { if (JobHandler != null) { @@ -1209,7 +1209,7 @@ namespace Tango.MachineStudio.Developer.ViewModels private void OnSelectedJobEventChanged() { - if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted && !_dialog_shown) + if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown) { _dialog_shown = true; _notification.ShowModalDialog(new EventDetailsViewVM(SelectedJobEvent), (x) => @@ -1333,7 +1333,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (status.Message != null) { // TODO: Write to db when shlomo is not sending test messages anymore. - _eventLogger.Log(BL.Enumerations.EventTypes.JobStatus, status.Message, false); + _eventLogger.Log(BL.Enumerations.EventTypes.JOB_STATUS, status.Message, false); } } }; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs index 1f93a96dc..c813e9752 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs @@ -140,8 +140,6 @@ namespace Tango.MachineStudio.Logging.ViewModels _db = ObservablesContext.CreateDefault(); _db.EventTypes.Load(); - _db.EventTypesCategories.Load(); - _db.EventTypesGroups.Load(); DateTime now = DateTime.UtcNow.AddMonths(-1); @@ -183,7 +181,7 @@ namespace Tango.MachineStudio.Logging.ViewModels private void OnSelectedEventChanged() { - if (SelectedEvent != null && SelectedEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted && !_dialog_shown) + if (SelectedEvent != null && SelectedEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown) { _dialog_shown = true; _notification.ShowModalDialog(new EventDetailsViewVM(SelectedEvent), (x) => @@ -198,7 +196,7 @@ namespace Tango.MachineStudio.Logging.ViewModels private void DisplayTimeline(MachinesEvent ev) { - var events = Events.OrderBy(x => x.DateTime).SkipWhile(x => x != ev).Skip(1).TakeWhile(x => x.DateTime > ev.DateTime && x.Type != BL.Enumerations.EventTypes.ApplicationStarted).ToObservableCollection(); + var events = Events.OrderBy(x => x.DateTime).SkipWhile(x => x != ev).Skip(1).TakeWhile(x => x.DateTime > ev.DateTime && x.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED).ToObservableCollection(); events.Insert(0, ev); TimelineViewVM.Initialize(events.ToList()); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml index c75ef41ee..2dda7d342 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml @@ -73,9 +73,9 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml index 196b6f930..846ea1fe2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml @@ -136,7 +136,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -219,7 +219,7 @@ - - -
Thread Break
-
    -
  1. Open the cover.
  2. -
  3. Connect the broken thread.
  4. -
  5. Close the cover.
  6. -
  7. Press 'OK' when done.
  8. -
- - \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml deleted file mode 100644 index f984a985f..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml.cs deleted file mode 100644 index 9f37eba06..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml.cs +++ /dev/null @@ -1,48 +0,0 @@ -using MahApps.Metro.Controls; -using MaterialDesignThemes.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.Shapes; -using Tango.BL.Entities; -using Tango.Core.Commands; - -namespace Tango.MachineStudio.UI.Html -{ - /// - /// Interaction logic for DialogWindow.xaml - /// - public partial class HtmlWindow : Window - { - public HtmlWindow(HtmlPage html) - { - InitializeComponent(); - - webBrowser.Loaded += (_, __) => - { - webBrowser.NavigateToString(html.Html); - }; - } - - private void OKClicked(object sender, RoutedEventArgs e) - { - DialogResult = true; - Close(); - } - - private void CloseClicked(object sender, RoutedEventArgs e) - { - DialogResult = false; - Close(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index baa550017..1612eb36c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -265,7 +265,7 @@ namespace Tango.MachineStudio.UI.StudioApplication var eventLogger = TangoIOC.Default.GetInstance(); if (eventLogger != null) { - eventLogger.Log(EventTypes.ApplicationTerminated, "Application Terminated!"); + eventLogger.Log(EventTypes.APPLICATION_TERMINATED, "Application Terminated!"); eventLogger.FlushAll(); } 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 fb84d64bd..706b1c8f7 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 @@ -144,10 +144,6 @@
- - - HtmlWindow.xaml - @@ -243,10 +239,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -536,7 +528,6 @@ Tango.Embroidery.dll PreserveNewest - @@ -618,7 +609,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs index 3c548855d..b0a3a8c11 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs @@ -7,7 +7,6 @@ using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Diagnostics; using Tango.MachineStudio.Common.EventLogging; using Tango.MachineStudio.Common.FirmwareUpgrade; -using Tango.MachineStudio.Common.Html; using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common.Navigation; using Tango.MachineStudio.Common.Notifications; @@ -18,7 +17,6 @@ using Tango.MachineStudio.Common.Video; using Tango.MachineStudio.UI.Authentication; using Tango.MachineStudio.UI.Console; using Tango.MachineStudio.UI.FirmwareUpgrade; -using Tango.MachineStudio.UI.Html; using Tango.MachineStudio.UI.Modules; using Tango.MachineStudio.UI.Navigation; using Tango.MachineStudio.UI.Notifications; @@ -67,7 +65,6 @@ namespace Tango.MachineStudio.UI TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); - TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); @@ -84,7 +81,6 @@ namespace Tango.MachineStudio.UI TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(new TeamFoundationServiceExtendedClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs index 492e23963..4ebf3d96d 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -141,7 +141,7 @@ namespace Tango.MachineStudio.UI.ViewModels _authenticationProvider.Login(Email, Password); - _eventLogger.Log(EventTypes.ApplicationStarted, "Application Started!"); + _eventLogger.Log(EventTypes.APPLICATION_STARTED, "Application Started!"); _navigationManager.NavigateTo(NavigationView.MainView); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index e3a8b4e7c..c13c7379a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -20,7 +20,6 @@ using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Diagnostics; using Tango.MachineStudio.Common.EventLogging; -using Tango.MachineStudio.Common.Html; using Tango.MachineStudio.Common.Messages; using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common.Navigation; @@ -54,7 +53,6 @@ namespace Tango.MachineStudio.UI.ViewModels private bool _isDisconnecting; private Thread _updateCheckThread; private IEventLogger _eventLogger; - private IHtmlPresenter _htmlPresenter; private MachineStudioSettings _settings; /// @@ -282,7 +280,7 @@ namespace Tango.MachineStudio.UI.ViewModels IEventLogger eventLogger, IDiagnosticsFrameProvider frameProvider, ISpeechProvider speechProvider, - IHtmlPresenter htmlPresenter, TeamFoundationServiceExtendedClient tfs) : base() + TeamFoundationServiceExtendedClient tfs) : base() { TFSClient = tfs; _eventLogger = eventLogger; @@ -293,7 +291,6 @@ namespace Tango.MachineStudio.UI.ViewModels ApplicationManager = applicationManager; DiagnosticsFrameProvider = frameProvider; SpeechProvider = speechProvider; - _htmlPresenter = htmlPresenter; _settings = SettingsManager.Default.GetOrCreate(); @@ -782,21 +779,7 @@ namespace Tango.MachineStudio.UI.ViewModels /// The HTML page. private async void ResolveMachineEvent(MachinesEvent machineEvent) { - if (machineEvent.EventType.HtmlPage != null) - { - if (_htmlPresenter.DisplayHtml(machineEvent.EventType.HtmlPage)) - { - if (ApplicationManager.ConnectedMachine != null && machineEvent.EventType.Resolvable) - { - _eventLogger.Log(String.Format("Event '{0}' resolved by user.", machineEvent.EventType.Name)); - await ApplicationManager.ConnectedMachine.ResolveEvent((PMR.Diagnostics.EventType)machineEvent.Type); - } - } - } - else - { - _notificationProvider.ShowWarning("Could not locate guidance content for the specified event."); - } + } /// -- cgit v1.3.1