예제 #1
0
 public InputBox(string caption, object content)
 {
     InitializeComponent();
     this.Title   = caption;
     Text.Content = content;
     this.Loaded += (_, __) => TxtValue.Focus();
 }
 private void UnsetEditBtn()
 {
     BtnConfirm.Enabled  = false;
     BtnRollBack.Enabled = false;
     TxtValue.Text       = string.Empty;
     TxtValue.Focus();
 }
        private void BtnNew_Click(object sender, EventArgs e)
        {
            var str = TxtValue.Text.Trim();

            // Console.WriteLine(pathName);

            EnvironmentListView.Items.Add(str);
            envirList.Add(str);
            TxtValue.Clear();
            TxtValue.Focus();
        }
예제 #4
0
 private void TxtValue_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (decimal.TryParse(TxtValue.Text.Replace(",", "").Replace(".", "").TrimStart('0'), out decimal result))
     {
         result /= 100;
         value   = result;
         TxtValue.TextChanged -= TxtValue_TextChanged;
         TxtValue.Text         = result.ToString("N2", nfi);
         TxtValue.TextChanged += TxtValue_TextChanged;
         TxtValue.Select(TxtValue.Text.Length, 0);
     }
 }
예제 #5
0
 public FrmGetDetail(string request)
 {
     InitializeComponent();
     LblRequest.Text = request;
     TxtValue.Focus();
 }
예제 #6
0
 public void SelText()
 {
     TxtValue.Focus();
     TxtValue.SelectAll();
 }