Пример #1
0
        //
        public void Open(string name)
        {
            AgencyClient client = new AgencyClient();
            AgencyProxy  agency = client.GetAgency();

            Agent = agency.CreateAgent(name);
            Brain = Agent.GetBrain();
        }
Пример #2
0
        private void OpenRemote(object sender, EventArgs e)
        {
            AgencyClient client = new AgencyClient();
            AgencyProxy  agency = client.GetAgency();

            List <string>  names  = agency.GetBrainFactoryNames();
            ListViewDialog dialog = new ListViewDialog();

            dialog.ListView.Columns.Add("Name", 100);
            dialog.ListView.View = View.Details;

            foreach (var name in names)
            {
                ListViewItem item = new ListViewItem(name);
                dialog.ListView.Items.Add(item);
                //dialog.ListView.Items.Add(name);
            }
            dialog.ShowDialog();
            string    factoryName = dialog.ItemName;
            AgentForm form        = CreateAgentForm();

            form.OpenModel(factoryName);
        }