public LightController(MainWindow main)
        {
            mainwindow = main;
            InstanceContext site = new InstanceContext(this);

            aiclient = new AiServiceClient(site);
            aiclient.Join(true, "LIGHT", 0);
        }
        public MainWindow()
        {
            InitializeComponent();
            InstanceContext site = new InstanceContext(this);

            aiclient = new AiServiceClient(site);
            aiclient.Join(true, "Ai리모컨", 0);
            list.Items.Add("TV전원버튼");
            list.Items.Add("TV채널");
            list.Items.Add("전등전원버튼");
            list.Items.Add("전등단계");
        }
Exemple #3
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();
                aicontrol = new AiController(this);
                InstanceContext site = new InstanceContext(this);

                aiclient = new AiServiceClient(site);

                aiclient.Join(true, "Ai", 0);

                foreach (Data data in aiclient.GetDataList())
                {
                    List.Items.Add("명령어 : " + data.Msg);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("에러 : " + ex.Message);
            }
        }