示例#1
0
 private void ClBtn_Click(object sender, RoutedEventArgs e)
 {
     Color2Tb.Text      = "";
     Color1Tb.Text      = "";
     FromBox.Text       = "";
     ResultTb.Text      = "";
     ToBox.Text         = "";
     OperLabel.Content  = "";
     Color1Tb.Focusable = true;
     Color1Tb.Focus();
 }
示例#2
0
 private TextBox Focused()
 {
     if (Color1Tb.Focus())
     {
         return(Color1Tb);
     }
     else if (Color2Tb.Focus())
     {
         return(Color2Tb);
     }
     else if (FromBox.Focus())
     {
         return(FromBox);
     }
     else
     {
         return(Color1Tb);
     }
 }
示例#3
0
 private void Color1Tb_MouseDown(object sender, MouseButtonEventArgs e)
 {
     Color1Tb.Focusable  = true;
     Color1Tb.CaretIndex = Color1Tb.CaretIndex;
     Color1Tb.Focus();
 }
示例#4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     Color1Tb.Focus();
     ToBox.Text = "";
 }