做文件保存,想默认文件名,有用户自己修改文件名,该怎么写?
string strStartPath = Application.StartupPath + "\\Map";            SaveFileDialog saveFileDialog = new SaveFileDialog();
            saveFileDialog.InitialDirectory = strStartPath;
            saveFileDialog.Filter = "文件(*.*)|*.*";            saveFileDialog.ShowDialog();
if (saveFileDialog.FileName == null)
            {
                string strNewName = "";
                FileInfo fi = new FileInfo(saveFileDialog.FileName);                strNewName = strStartPath + "\\" + fi.Name.Split(new char[] { '.' })[0];                if (fi.DirectoryName != strStartPath)
                {
                lab:
                    FileInfo fitmp = new FileInfo(strNewName + fi.Extension);                    if (fitmp.Exists)
                    {
                        strNewName += "1";
                        goto lab;
                    }
                    else
                    {
                        this.SelectFrom.ud_MapContrl.SaveToFile(strNewName + ".rwm", false);
                    }
                }
                else
                {
                    SelectFrom.ud_MapContrl.SaveToFile(saveFileDialog.FileName, false);
                }            }
这个不对,不知道错在那里?谢谢