Exemple #1
0
        private void initView()
        {
            WinDraw5 = WinDraw5.getInstance();


            string      HostName    = Dns.GetHostName();
            IPHostEntry ipHostEntry = Dns.GetHostEntry(HostName);

            this.cbIps.ItemsSource = null;
            List <String> ips = new List <string>();


            for (int i = 0; i < ipHostEntry.AddressList.Length; i++)
            {
                if (ipHostEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
                {
                    ips.Add(ipHostEntry.AddressList[i].ToString());
                }
            }

            this.cbIps.ItemsSource   = ips;
            this.cbIps.SelectedIndex = 0;
//
//            devices.Add(new Device {DeviceMac = "001",DeviceName = "stu01"});
//            devices.Add(new Device {DeviceMac = "002",DeviceName = "stu02"});
            this.lbPenPads.ItemsSource = devices;
        }
Exemple #2
0
        public static WinDraw5 getInstance()
        {
            if (instance == null)
            {
                instance             = new WinDraw5();
                instance.WindowState = WindowState.Maximized;
                instance.Activate();
            }

            return(instance);
        }