aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MainViewVM.cs
blob: 306f15c5c5851dba6d76186a3e4a4e1e2a0e03e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.MachineStudio.Technician.Navigation;
using Tango.SharedUI;

namespace Tango.MachineStudio.Technician.ViewModels
{
    /// <summary>
    /// Represents the technician module main view, view model.
    /// </summary>
    /// <seealso cref="Tango.SharedUI.ViewModel" />
    public class MainViewVM : ViewModel
    {
        private TechNavigationManager _navigation;

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewVM"/> class.
        /// </summary>
        /// <param name="navigationManager">The navigation manager.</param>
        public MainViewVM(TechNavigationManager navigationManager)
        {
            _navigation = navigationManager;
            NavigateToViewCommand = new RelayCommand<string>(NavigateToView);
        }

        #endregion

        #region Commands

        /// <summary>
        /// Gets or sets the navigate to view command.
        /// </summary>
        public RelayCommand<String> NavigateToViewCommand { get; set; }

        #endregion

        #region Private Methods

        /// <summary>
        /// Navigates to the specified view.
        /// </summary>
        /// <param name="view">The view.</param>
        private void NavigateToView(string view)
        {
            _navigation.NavigateTo((TechNavigationView)Enum.Parse(typeof(TechNavigationView), view, true));
        }

        #endregion
    }
}
ackgroundBrush1 { get => backgroundBrush1; set => backgroundBrush1 = value; } } }