private void btnSure_Click(object sender, EventArgs e)
 {
     if (txtTitle.Text.Trim() == "")
     {
         TXMessageBoxExtensions.Info("请输入标题!");
         txtTitle.Focus();
         return;
     }
     if (MyCommon.HasFilterChars(txtTitle.Text))
     {
         TXMessageBoxExtensions.Info("不能包含有" + MyCommon.Chars2String() + "等字符!");
         txtTitle.Focus();
         return;
     }
     if (TheNode == null)
     {
         if (IsTemplet)
         {
             if (!System.IO.File.Exists(txtLocalPath.Text.Trim()))
             {
                 TXMessageBoxExtensions.Info("文件不存在!");
                 btnExplorer.Focus();
                 return;
             }
             int pages = GetPages();
             if (pages == 0)
             {
                 TXMessageBoxExtensions.Info("文件格式不正确!");
                 return;
             }
         }
     }
     this.DialogResult = DialogResult.OK;
 }
예제 #2
0
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     if (txtTitle.Text.Trim() == "")
     {
         return;
     }
     if (MyCommon.HasFilterChars(txtTitle.Text))
     {
         TXMessageBoxExtensions.Info("不能包含有" + MyCommon.Chars2String() + "等字符!");
         txtTitle.Focus();
         return;
     }
     this.DialogResult = DialogResult.OK;
 }