Exemplo n.º 1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public MainWindow()
        {
            this.InitializeComponent();
            this.DataContext = this.Vm;


            // タイトル
            this.Title = VersionTxt.MakeTextNmaeAndVersion();
        }
 private void VersionTxt_Validating(object sender, CancelEventArgs e)
 {
     if (NameTxt.Text == "")
     {
         MessageBox.Show("Version is required field example 1.0");
     }
     else if (!(Decimal.TryParse(VersionTxt.Text, out _)))
     {
         MessageBox.Show("Version value must be in decimal example 1.0");
         VersionTxt.Focus();
     }
 }