Esempio n. 1
0
        public AdminPanel(AsynchronousClient Client, bool NeedEncrypt)
        {
            InitializeComponent();

            for (int i = 0; i <= 255; i++)
            {
                cbPortNumber.Items.Add(i);
            }

            for (int i = 0; i <= 255; i++)
            {
                cbDeviceNumber.Items.Add(i);
            }

            cbDeviceType.Items.Add("Датчики");
            cbDeviceType.Items.Add("Простое устройство");
            cbDeviceType.Items.Add("Диммеры");
            cbDeviceType.Items.Add("Счётчики");

            cbRole.Items.Add("user");
            cbRole.Items.Add("admin");

            chbLinkWith.Checked = false;
            tbNameLinkedDevice.Enabled = false;

            AdminClient = Client;
            NeedToEncypt = NeedEncrypt;
        }
Esempio n. 2
0
 public Devices(AsynchronousClient Server)
 {
     InitializeComponent();
     _serv = Server;
     _serv.IsNeedUpdateThreeEvent += new IsNeedUpdateThreeDelegate(Client_IsNeedUpdateThreeEvent);
     _serv.Send("GetUpdate/Простое устройство", _serv._srv.encryptIt);
 }
Esempio n. 3
0
 public Sensors(AsynchronousClient Server)
 {
     InitializeComponent();
     _serv = Server;
     _serv.IsNeedUpdateThreeEvent += new IsNeedUpdateThreeDelegate(Client_IsNeedUpdateThreeEvent);
     _serv.Send(@"GetUpdate/Датчики", Server._srv.encryptIt);
 }
Esempio n. 4
0
 public Dimmers(AsynchronousClient Server)
 {
     InitializeComponent();
     _serv = Server;
     _serv.IsNeedUpdateThreeEvent += new IsNeedUpdateThreeDelegate(Client_IsNeedUpdateThreeEvent);
     _serv.Send("GetUpdate/Диммеры", _serv._srv.encryptIt);
 }
Esempio n. 5
0
 public Chat(AsynchronousClient Server, bool SendType, OpenWindow _OpW)
 {
     InitializeComponent();
     _serv = Server;
     _sendType = SendType;
     _serv.IsNeedUpdateThreeEvent += new IsNeedUpdateThreeDelegate(Client_IsNeedUpdateThreeEvent);
     _serv.IsNeedShowChatMessageEvent += new IsNeedShowChatMessage(_serv_IsNeedShowChatMessageEvent);
     _serv.Send("GetOnLineClients", _serv._srv.encryptIt);
 }
Esempio n. 6
0
 public Settings(AsynchronousClient Server)
 {
     InitializeComponent();
     _serv = Server;
     _param = XMLLoader.getSetting();
     tbIP.Text = _param.IP;
     tbPort.Text = _param.Port.ToString();
     chbUseEncrypt.Checked = _param.IsNeedUseEncrypt;
     chbUseKeepAlive.Checked = _param.IsNeedUseKeepAlive;
     chbCTRL_ENTER.Checked = _param.SendType;
 }
Esempio n. 7
0
 private void Form1_Load(object sender, EventArgs e)
 {
     AsynchronousClient.StartClient();
 }
Esempio n. 8
0
 static void Main(string[] args)
 {
     Console.WriteLine("Asynchronous Client");
     AsynchronousClient.StartClient();
     Console.ReadKey();
 }