Exemplo n.º 1
0
        private void Button_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Tuple <bool, string> ret = Tools.InputDialog.OpenDialog("输入你想显示的内容", "", "更改发送按键显示内容");

            if (ret.Item1)
            {
                ToSendData data = ((Button)sender).Tag as ToSendData;
                ((Button)sender).Content = data.commit = ret.Item2;
            }
        }
Exemplo n.º 2
0
        private void Button_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ToSendData           data = ((Button)sender).Tag as ToSendData;
            Tuple <bool, string> ret  = Tools.InputDialog.OpenDialog(FindResource("QuickSendSetButton") as string,
                                                                     data.commit, FindResource("QuickSendChangeButton") as string);

            if (ret.Item1)
            {
                ((Button)sender).Content = data.commit = ret.Item2;
            }
        }
Exemplo n.º 3
0
        private void knowSendDataButton_click(object sender, RoutedEventArgs e)
        {
            ToSendData data = ((Button)sender).Tag as ToSendData;

            if (data.hex)
            {
                sendUartData(Tools.Global.Hex2Byte(data.text));
            }
            else
            {
                sendUartData(Encoding.UTF8.GetBytes(data.text));
            }
        }
Exemplo n.º 4
0
        private void Button_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ToSendData data = ((Button)sender).Tag as ToSendData;

            ((Button)sender).Content = data.commit = data.text;
        }