Esempio n. 1
0
 //ValuesListView的SelectedIndexChanged事件
 private void StartEdit(object sender, EventArgs e)
 {
     try
     {
         if (ValuesListView.SelectedItems.Count > 0)
         {
             BandTextBox.Text  = "Band " + (ValuesListView.SelectedIndices[0] + 1).ToString();
             ValueTextBox.Text = BandValues[ValuesListView.SelectedIndices[0]].ToString("0.000000");
             CurrentBand       = ValuesListView.SelectedIndices[0];
             ValueTextBox.Focus();
             ValueTextBox.SelectAll();
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }
 public ConnectionWindow()
 {
     InitializeComponent();
     ValueTextBox.SelectAll();
 }
Esempio n. 3
0
 protected override void OnActivated(EventArgs e)
 {
     ValueTextBox.SelectAll();
     base.OnActivated(e);
 }