diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-29 00:52:48 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-29 00:52:48 +0300 |
| commit | 330c34d62c8dfe8ce03041c82b41f51e13ecefed (patch) | |
| tree | d0fdf3bae352ad57a63a34760b8616de42d7c5a4 /Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels | |
| parent | 233e2ec157a443170f873934e0fa8083cf543ede (diff) | |
| download | Tango-330c34d62c8dfe8ce03041c82b41f51e13ecefed.tar.gz Tango-330c34d62c8dfe8ce03041c82b41f51e13ecefed.zip | |
Home navigation, start events view..
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels')
3 files changed, 48 insertions, 0 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/EventsViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/EventsViewVM.cs new file mode 100644 index 000000000..074a9c789 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/EventsViewVM.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.FSE.Common; + +namespace Tango.FSE.UI.ViewModels +{ + public class EventsViewVM : FSEViewModel + { + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs index 79aa75609..81927608f 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs @@ -29,6 +29,17 @@ namespace Tango.FSE.UI.ViewModels NavigationManager.MenuItems.Add(new NavigationMenuItem(() => { + NavigationManager.NavigateTo<InternalModule>(nameof(EventsView)); + }) + { + Name = "Events", + Index = 1, + Description = "View the active and history of the connected machine events.", + Image = ResourceHelper.GetImageFromResources("Images/Menu/events.png"), + }); + + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { NavigationManager.NavigateTo<InternalModule>(nameof(SettingsView)); }) { diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs index 3564f9b7b..a55e6cf64 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LayoutViewVM.cs @@ -10,6 +10,7 @@ using Tango.FSE.Common; using Tango.FSE.Common.Navigation; using Tango.FSE.Common.Notifications; using Tango.FSE.UI.Panes; +using Tango.FSE.UI.Views; using Tango.Integration.ExternalBridge; using Tango.SharedUI.Helpers; using Tango.Transport; @@ -126,6 +127,16 @@ namespace Tango.FSE.UI.ViewModels /// </summary> public RelayCommand ReportIssueCommand { get; set; } + /// <summary> + /// Navigates to the events view. + /// </summary> + public RelayCommand NavigateToEventsCommand { get; set; } + + /// <summary> + /// Navigates to the home view. + /// </summary> + public RelayCommand NavigateHomeCommand { get; set; } + #endregion #region Constructors @@ -150,6 +161,9 @@ namespace Tango.FSE.UI.ViewModels _transportInActionTimer = new ActionTimer(TimeSpan.FromMilliseconds(50)); ReportIssueCommand = new RelayCommand(OpenBugReportDialog); + + NavigateToEventsCommand = new RelayCommand(NavigateToEvents); + NavigateHomeCommand = new RelayCommand(NavigateHome); } #endregion @@ -292,6 +306,16 @@ namespace Tango.FSE.UI.ViewModels BugReporter.ShowBugReportDialog(); } + private void NavigateToEvents() + { + NavigationManager.NavigateTo<InternalModule>(nameof(EventsView)); + } + + private void NavigateHome() + { + NavigationManager.NavigateTo(NavigationView.Home); + } + #endregion //Not used |
