Exemplo n.º 1
0
 private void Data_Button_Left_Click(object sender, EventArgs e)
 {
     //Data_Monitor_Field_rich.Select((Data_String_Number * 7), (((Data_String_Number + 1) * 7) - 1));
     Data_Monitor_Field_rich.Select(7, 13);
     Data_Register_box.Text = Data_Monitor_Field_rich.SelectedText;
     Data_Status_text.Text  = Data_String_Number.ToString();
     Properties.Settings.Default.Data_String = Data_Monitor_Field_rich.Text;
     Properties.Settings.Default.Save();
 }
Exemplo n.º 2
0
 private void Data_Button_Add_Click(object sender, EventArgs e)
 {
     Data_Monitor_Field_rich.Select((((Data_String_Number + 1) * 7) - 1), 0);
     Data_Monitor_Field_rich.SelectedText = ((Data_Monitor_Field_rich.Text != null) ? Environment.NewLine : null) + "0x" + (Convert.ToString(0, 16)).PadLeft(4, '0');
     Data_String_Number++;
     Data_Monitor_Selection();
     Data_Status_text.Text = Data_String_Number.ToString();
     Properties.Settings.Default.Data_String = Data_Monitor_Field_rich.Text;
     Properties.Settings.Default.Save();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Button Actions
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        ///

        private void Data_Button_Right_Click(object sender, EventArgs e)
        {
            int _register = (Data_Register_box.Text != null) ? Convert.ToInt32(Data_Register_box.Text, 16) : 0;

            Data_Monitor_Field_rich.Select((7 * Data_String_Number), (7 * (Data_String_Number + 1) - 1));
            Data_Monitor_Field_rich.SelectedText = "0x" + (Convert.ToString(_register, 16)).PadLeft(4, '0').ToUpper();
            Data_Register_box.Text = null;
            Data_Monitor_Selection();
            Data_Status_text.Text = Data_String_Number.ToString();
            Properties.Settings.Default.Data_String = Data_Monitor_Field_rich.Text;
            Properties.Settings.Default.Save();
        }
Exemplo n.º 4
0
        private void Data_Packet_Format()
        {
            int _max = (Data_Monitor_Field_rich.Text.Length / 7) + 1;

            for (int i = 0; i < _max; i++)
            {
                Data_Monitor_Field_rich.Select(((i * 7) + 2), (((i + 1) * 7) - 2));
                int _my = Convert.ToInt32(Data_Monitor_Field_rich.SelectedText, 16);
                Data_Packet[i] = _my;
            }
            int g = 0;
        }
Exemplo n.º 5
0
 private void Data_Monitor_Selection()
 {
     if (Data_Monitor_Field_rich.Text.Length <= 7)
     {
         Data_Monitor_Field_rich.Select(0, 6);
         Data_Monitor_Field_rich.SelectionColor = Color.Green;
     }
     else
     {
         Data_Monitor_Field_rich.Select(0, (7 * Data_String_Number) - 1);
         Data_Monitor_Field_rich.SelectionColor = System.Drawing.SystemColors.WindowText;
         Data_Monitor_Field_rich.Select((7 * Data_String_Number), (7 * (Data_String_Number + 1) - 1));
         Data_Monitor_Field_rich.SelectionColor = Color.Green;
     }
     Data_Monitor_Field_rich.Select((7 * (Data_String_Number + 1)), Data_Monitor_Field_rich.Text.Length);
     Data_Monitor_Field_rich.SelectionColor = System.Drawing.SystemColors.WindowText;
     Data_Monitor_Field_rich.DeselectAll();
 }