public InstanceViewModel(ServerViewModel server, string name) : base(server) { StartCommand = new RelayCommand<object>(ExecuteStart, CanStart); StopCommand = new RelayCommand<object>(ExecuteStop, CanStop); Name = name; }
private void StartGetServers(ClientAppConfig appConfig) { m_Servers = new List<ServerViewModel>(); foreach (var serverConfig in appConfig.Servers) { var server = new ServerViewModel(serverConfig); m_Servers.Add(server); } }
private void OnNewServerCreated(NewServerCreatedMessage message) { var servers = App.ClientConfig.Servers.ToList(); servers.Add(message.Server); App.ClientConfig.Servers = servers.ToArray(); var serverModel = new ServerViewModel(message.Server); m_Servers.Add(serverModel); Instances = null; App.SaveConfig(); }
public EditServerDetailViewModel(ServerViewModel server) : base(true) { m_Server = server; this.Name = server.Name; this.Host = server.Config.Host; this.Port = server.Config.Port; this.UserName = server.Config.UserName; CloseCommand = new RelayCommand<object>((s) => Messenger.Default.Send<CloseEditServerMessage>(CloseEditServerMessage.Empty)); RemoveCommand = new RelayCommand<object>(ExecuteRemoveCommand); }
public LoadingInstanceViewModel(ServerViewModel server) : base(server) { }
public InstanceViewModelBase(ServerViewModel server) { Server = server; }
public FaultInstanceViewModel(ServerViewModel server) : base(server) { FaultDescription = server.Description; }