コード例 #1
0
ファイル: InputForm.cs プロジェクト: yhtsnda/aaasoft
 public static String GetInput(String Title, String Description, String DefaultValue)
 {
     InputForm form = new InputForm(Title, Description, DefaultValue);
     DialogResult dr = form.ShowDialog();
     if (dr == DialogResult.Cancel) return null;
     return form.Value;
 }
コード例 #2
0
        private void btnNewFolder_Click(object sender, EventArgs e)
        {
            String newFolderName = InputForm.GetInput("新建文件夹", "请输入文件夹名称:", "");

            if (newFolderName == null)
            {
                return;
            }

            newFolderName = newFolderName.Trim();
            if (String.IsNullOrEmpty(newFolderName))
            {
                MessageBox.Show("请输入正确的文件夹名称!");
                return;
            }
            CurrentFolder.CreateFolder(newFolderName);
            RefrushCurrentFolder();
        }