using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; using Tango.MachineStudio.Common.Notifications; using Tango.PMR.Integration; using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { /// /// Represents the machine login dialog, view model. /// /// public class MachineLoginViewVM : DialogViewVM { /// /// Gets or sets the machine password. /// public String Password { get; set; } /// /// Gets or sets the intent. /// public ExternalBridgeLoginIntent Intent { get; set; } /// /// Gets or sets the login command. /// public RelayCommand LoginCommand { get; set; } /// /// Gets or sets the cancel command. /// public RelayCommand CancelCommand { get; set; } /// /// Initializes a new instance of the class. /// public MachineLoginViewVM() { Intent = ExternalBridgeLoginIntent.FullControl; LoginCommand = new RelayCommand(Login); CancelCommand = new RelayCommand(Cancel); } /// /// Invoked when user presses the login button. /// /// The password. private void Login(string password) { Password = password; Accept(); } } }