コード例 #1
0
        public void AddAgent()
        {
            var addAgent = new AddAgentViewModel(_windowManager);

            dynamic settings = new ExpandoObject();

            settings.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            settings.Owner = GetView();

            if (_windowManager.ShowDialog(addAgent, null, settings) == true)
            {
                var client = new TestAgentClient(addAgent.Hostname, addAgent.Port);
                client.Connect();
                _agents.Add(new TestAgentViewModel(client, this));
                client.TestOutputReceived += client_TestOutputReceived;

                NotifyOfPropertyChange(() => TestAgentNames);
                NotifyOfPropertyChange(() => Agents);
            }
        }
コード例 #2
0
 public void Connect()
 {
     _client.Connect();
 }