Esempio n. 1
0
        private void ThreadDeviceCheck()
        {
            while (mg.CloseWindows == 0)
            {
                Random rand   = new Random();
                int    number = rand.Next(mg.CountDevice());
                int    index  = 0;
                lock (obj)
                {
                    foreach (Device d in mg.GetDeiviceList())
                    {
                        if (index < number)
                        {
                            d.STATUS = Device.ERROR;
                        }
                        else
                        {
                            d.STATUS = Device.NOTERROR;
                        }
                        index++;
                    }
                }

                Thread.Sleep(1000);
            }
        }
Esempio n. 2
0
        public cctv()
        {
            InitializeComponent();

            Camera_Connect();
            management MG = management.instance();

            DeviceCollection = MG.GetDeiviceList();

            DeviceBox.Items.Add("전체보기");
            for (int i = 0; DeviceCollection.Count() > i; i++)
            {
                DeviceBox.Items.Add(DeviceCollection[i].DEVICEIP);
            }

            DeviceBox.SelectedItem = "전체보기";
        }