private void GView_SendDataList_EditingControlShowing_TextChanged(object sender, EventArgs e)
        {
            if (sender is DataGridViewTextBoxEditingControl control)
            {
                var cell_obj = control.Tag as DataGridViewCell;
                var value    = control.Text;

                switch ((ColumnId)cell_obj.OwningColumn.Tag)
                {
                case ColumnId.SendData:
                {
                    if ((value != null) && (value.Length > 0))
                    {
                        control.BackColor = (BinaryTextCompiler.Build(value) != null)
                                              ? (COLOR_COMMAND_FORMAT_OK)
                                              : (COLOR_COMMAND_FORMAT_NG);
                    }
                    else
                    {
                        control.BackColor = Color.White;
                    }
                }
                break;
                }
            }
        }
Exemplo n.º 2
0
        private void UpdateExpListView()
        {
            send_data_exp_ = CBox_ExpList.Text;

            if (send_data_exp_.Length > 0)
            {
#if BINARY_CODE_PARSER
                send_data_bin_ = BinaryTextCompiler.Build(send_data_exp_);
#else
                send_data_bin_ = HexTextEncoder.ToByteArray(send_data_exp_);
#endif

                CBox_ExpList.BackColor = (send_data_bin_ != null)
                                       ? (Ratatoskr.Resource.AppColors.Ok)
                                       : (Ratatoskr.Resource.AppColors.Ng);
            }
            else
            {
                send_data_bin_ = null;

                CBox_ExpList.BackColor = Color.White;
            }
        }
Exemplo n.º 3
0
 public void API_SendData(string gate_alias, string bin_text)
 {
     API_SendData(gate_alias, BinaryTextCompiler.Build(bin_text));
 }