Пример #1
0
        private void PowerOffBtn_Click(object sender, RoutedEventArgs e)
        {
            share.EventLog(null, "[Click]\t", "Power Off");

            if (DelSerialCommandSendEventHandler != null)
            {
                DelSerialCommandSendEventHandler.Invoke(StaticDefine.COMMAND_POWER_OFF, StaticDefine.SERIAL_CMD_PW_OFF);
            }
        }
Пример #2
0
        public void KvmBtn_Click(object sender, RoutedEventArgs e)
        {
            Button KVMbutton = sender as Button;

            //Console.WriteLine("Click " + KVMbutton.Name);

            string TargetKVM = KVMbutton.Name.Substring(KVMbutton.Name.Length - 1);

            byte BdNumCode = 0;

            switch (TargetKVM)
            {
            case "1":     // Board 1
                BdNumCode = 0x30;
                break;

            case "2":     // Board 2
                BdNumCode = 0x31;
                break;

            case "3":     // Board 3
                BdNumCode = 0x32;
                break;

            case "4":     // Board 4
                BdNumCode = 0x33;
                break;

            case "5":     // Board 5
                BdNumCode = 0x34;
                break;

            case "6":     // Board 6
                BdNumCode = 0x35;
                break;

            case "7":     // Board 7
                BdNumCode = 0x36;
                break;

            case "8":     // Board 8
                BdNumCode = 0x37;
                break;

            case "9":     // Board 9
                BdNumCode = 0x38;
                break;

            case "0":      // Board 10
                BdNumCode = 0x39;
                break;

            case "H":       // Host PC
                BdNumCode = 0x3A;
                break;

            default:
                break;
            }

            if (DelSerialCommandSendEventHandler != null)
            {
                DelSerialCommandSendEventHandler.Invoke(StaticDefine.COMMAND_KVM_SELECT, BdNumCode);
            }
        }