Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            callback = new ClientCallback();
            callback.GetHostWarning += HandleHostWarning;
            callback.GetNetWarning  += HandleNetWarning;
            InstanceContext instanceContext = new InstanceContext(callback);

            client            = new ManagerService.ManagerServiceClient(instanceContext, "WSDualHttpBinding_IManagerService");
            lbMessages        = new List <string[]>();
            neuralNetworkData = new List <string>();
            goal         = "";
            ExistingNN   = new List <NNItem>();
            pause        = false;
            notification = false;

            try
            {
                client.Start();
                Sources = new List <string>();
                Devices = new List <string>();
                Filter  = "";
            }
            catch
            {
                System.Windows.MessageBox.Show("Не удалось подключиться к сервису");
            }
        }
Beispiel #2
0
        public SourceWindow(ManagerService.ManagerServiceClient client)
        {
            InitializeComponent();
            Devices         = Utilities.ParseDevicesList(client.GetDevicesList());
            SelectedDevices = new List <string>();
            Filter          = "";

            foreach (string key in Devices.Keys)
            {
                CheckBox cb = new CheckBox();
                cb.Content = String.Format("{0} ({1})", Devices[key], key);
                lbDevices.Items.Add(cb);
            }
        }