示例#1
0
 public InstanceViewModel(ServerViewModel server, string name)
     : base(server)
 {
     StartCommand = new RelayCommand<object>(ExecuteStart, CanStart);
     StopCommand = new RelayCommand<object>(ExecuteStop, CanStop);
     Name = name;
 }
示例#2
0
        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);
            }
        }
示例#3
0
        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)
        {

        }
示例#6
0
 public InstanceViewModelBase(ServerViewModel server)
 {
     Server = server;
 }
 public LoadingInstanceViewModel(ServerViewModel server)
     : base(server)
 {
 }
示例#8
0
 public FaultInstanceViewModel(ServerViewModel server)
     : base(server)
 {
     FaultDescription = server.Description;
 }
示例#9
0
 public InstanceViewModelBase(ServerViewModel server)
 {
     Server = server;
 }
 public FaultInstanceViewModel(ServerViewModel server)
     : base(server)
 {
     FaultDescription = server.Description;
 }