示例#1
0
        /// <summary>
        /// 载入解决方案
        /// </summary>
        public void Load()
        {
            var sfd = new OpenFileDialog
            {
                Filter   = fileType,
                FileName = Context.FileName
            };

            if (sfd.ShowDialog() != true)
            {
                return;
            }
            Load(sfd.FileName);
            DataModelDesignModel.Screen.LastFile = sfd.FileName;
            DataModelDesignModel.SaveUserScreen();
        }
示例#2
0
        /// <summary>
        /// 新增解决方案
        /// </summary>
        public void CreateNew()
        {
            var sfd = new SaveFileDialog
            {
                Filter = fileType
            };

            if (sfd.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            Context.Solution = new SolutionConfig
            {
                Name         = Path.GetFileNameWithoutExtension(sfd.FileName),
                Caption      = Path.GetFileNameWithoutExtension(sfd.FileName),
                SaveFileName = sfd.FileName
            };
            DataModelDesignModel.Screen.LastFile = sfd.FileName;
            SaveSolution();
            Load(sfd.FileName);
            DataModelDesignModel.SaveUserScreen();
        }