From d675e2f2a9b826422a296704cbb99d8fb32c85e0 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 27 Jan 2020 12:17:33 +0200 Subject: Redundant. --- .../ViewModels/MainViewVM.cs | 37 ++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs index fb6568df8..408789d9f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/ViewModels/MainViewVM.cs @@ -23,7 +23,7 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels public class MainViewVM : StudioViewModel { #region Properties - + private DateTime _startSelectedDate; public DateTime StartSelectedDate { @@ -56,15 +56,20 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels public SelectedObjectCollection SelectedActionLogTypes { get { return _selectedActionLogTypes; } - set { _selectedActionLogTypes = value; - RaisePropertyChanged(nameof(SelectedActionLogTypes)); } + set + { + _selectedActionLogTypes = value; + RaisePropertyChanged(nameof(SelectedActionLogTypes)); + } } private ActionLog _selectedActionLog = null; public ActionLog SelectedActionLog { get { return _selectedActionLog; } - set { _selectedActionLog = value; + set + { + _selectedActionLog = value; SelectedItemChanged(); RaisePropertyChangedAuto(); InvalidateRelayCommands(); @@ -78,7 +83,7 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels set { _differenceObject = value; RaisePropertyChangedAuto(); } } - + private bool _isRunning; public bool IsRunning { @@ -87,7 +92,7 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels } #endregion - + public RelayCommand SearchCommand { get; set; } public RelayCommand CopyToClipBoardCommand { get; set; } public RelayCommand CopyRelateObjectIDCommand { get; set; } @@ -95,7 +100,7 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels public MainViewVM() { ActionLogs = new ObservableCollection(); - SearchCommand = new RelayCommand(GetActionLogs, ()=> !IsRunning); + SearchCommand = new RelayCommand(GetActionLogs, () => !IsRunning); CopyRelateObjectIDCommand = new RelayCommand(CopyRelateObjectID); CopyToClipBoardCommand = new RelayCommand(CopyToClipBoard, () => SelectedActionLog != null && SelectedActionLog.DifferenceObject != null); DateTime now = DateTime.Now; @@ -112,12 +117,12 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels { } - + private void CopyToClipBoard() { DataObject data = new DataObject(SelectedActionLog.DifferenceObject.ToJsonString()); System.Windows.Clipboard.SetDataObject(data); - + } private void CopyRelateObjectID() { @@ -137,26 +142,26 @@ namespace Tango.MachineStudio.ActionLogs.ViewModels using (ObservablesContext db = ObservablesContext.CreateDefault()) { DateTime startUtc = StartSelectedDate.ToUniversalTime(); - TimeSpan offsetTime = (EndSelectedDate.Date == DateTime.Now.Date)? DateTime.Now.TimeOfDay : new TimeSpan(23, 59, 59); - DateTime endUtc = EndSelectedDate.ToUniversalTime()+ offsetTime; + TimeSpan offsetTime = (EndSelectedDate.Date == DateTime.Now.Date) ? DateTime.Now.TimeOfDay : new TimeSpan(23, 59, 59); + DateTime endUtc = EndSelectedDate.ToUniversalTime() + offsetTime; IsRunning = true; ActionLogs = await new ActionLogsCollectionBuilder(db).Set(x => x.LastUpdated <= DbFunctions.TruncateTime(endUtc) && x.LastUpdated >= DbFunctions.TruncateTime(startUtc.Date)) .WithUsers() .WithActionType(SelectedActionLogTypes.SynchedSource.ToArray()) .Query(y => y.Where - (x => filter == null || - (x.ID.ToString().ToLower().StartsWith(filter) - || (x.RelatedObjectName != null && x.RelatedObjectName.ToLower().StartsWith(filter)) + (x => filter == null || + (x.ID.ToString().ToLower().StartsWith(filter) + || (x.RelatedObjectName != null && x.RelatedObjectName.ToLower().StartsWith(filter)) || (x.RelatedObjectGuid != null && x.RelatedObjectGuid.ToLower().StartsWith(filter)) || (x.User != null && x.User.Contact != null && x.User.Contact.FullName.ToLower().StartsWith(filter))))) .BuildAsync(); IsRunning = false; } } - + private void SelectedItemChanged() { - if (SelectedActionLog == null || SelectedActionLog.DifferenceObject== null) + if (SelectedActionLog == null || SelectedActionLog.DifferenceObject == null) return; DifferenceObject = SelectedActionLog.DifferenceObject; } -- cgit v1.3.1 From 67e464d684665ff08bf370ed3caaf87cfd76817a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 28 Jan 2020 19:47:27 +0200 Subject: Fixed issue with user creation validation. Added navigating to user after creation. Added software release notes 4.1, 1.1 Added action logs title design. --- .../Images/actionlogs_title.png | Bin 0 -> 12112 bytes .../Tango.MachineStudio.ActionLogs.csproj | 4 ++- .../Views/MainView.xaml | 36 +++++++++++++-------- .../ViewModels/MachineUpdatesViewVM.cs | 2 +- .../Views/MachinesView.xaml | 2 +- .../ViewModels/MainViewVM.cs | 8 ++++- .../Views/OrganizationManagementView.xaml | 2 +- .../Software Release Notes (4.1, 1.1).docx | Bin 0 -> 9706563 bytes 8 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Images/actionlogs_title.png create mode 100644 Software/Visual_Studio/Resources/Software Release Notes (4.1, 1.1).docx (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Images/actionlogs_title.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Images/actionlogs_title.png new file mode 100644 index 000000000..299c14c6d Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Images/actionlogs_title.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Tango.MachineStudio.ActionLogs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Tango.MachineStudio.ActionLogs.csproj index 0d6fa213c..280356aa8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Tango.MachineStudio.ActionLogs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Tango.MachineStudio.ActionLogs.csproj @@ -116,7 +116,9 @@ Settings.Designer.cs - + + + {f441feee-322a-4943-b566-110e12fd3b72} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Views/MainView.xaml index 80cc12a69..18921e2da 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Views/MainView.xaml @@ -24,7 +24,15 @@ - + + + + + Action Logs + Select start/end dates and action log types to trace system changes. + + + @@ -42,16 +50,16 @@ - - Start Date: - - - - End Date: - - - - + + Start Date: + + + + End Date: + + + + @@ -208,9 +216,9 @@ - - - + + + Object Changes