www.pudn.com > WorkflowDesigner.rar > PackageInfoDlg.cs, change:2007-11-16,size:1161b


using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Text; 
using System.Windows.Forms; 
 
namespace WorkflowDesigner 
{ 
    public partial class PackageInfoDlg : Form 
    { 
        public PackageInfoDlg() 
        { 
            InitializeComponent(); 
            this.textBoxName.Text = Program.WorkflowControl.WfPackageDocument.Name; 
        } 
 
        private void buttonOk_Click(object sender, EventArgs e) 
        { 
            if (this.IsVaild()) 
            { 
                Program.WorkflowControl.RenamePackage(this.textBoxName.Text); 
                this.Close(); 
            } 
        } 
 
        private void buttonCancel_Click(object sender, EventArgs e) 
        { 
            this.Close(); 
        } 
 
        private bool IsVaild() 
        { 
            
            if (this.textBoxName.Text.Trim() == String.Empty) 
            { 
                MessageBox.Show("请输入包名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); 
                return false; 
            } 
            return true; 
        } 
 
       
    } 
}