public SolutionWindow(Solution mSolution)
        {
            InitializeComponent();

            _solution = mSolution;
            SyncFromSolution();
        }
Example #2
0
        public static Solution SolutionFromSaveDialog()
        {
            var saveFileDialog = new SaveFileDialog {Filter = FilterSolution};
            if (!saveFileDialog.ShowDialog().Value) return null;

            var templateSolution = new Solution(saveFileDialog.FileName);
            templateSolution.SaveToFile();
            return templateSolution;
        }
Example #3
0
        public static Solution SolutionFromOpenDialog()
        {
            var openFileDialog = new OpenFileDialog {Filter = FilterSolution};
            if (!openFileDialog.ShowDialog().Value) return null;

            var templateSolution = new Solution(openFileDialog.FileName);
            templateSolution.LoadFromFile();
            return templateSolution;
        }
Example #4
0
        public static File FileCreateFromSaveDialog(Solution mSolution)
        {
            var input = Interaction.InputBox("Template file name without extension (will be placed in solution folder)",
                                             "Insert template file name");
            if (string.IsNullOrEmpty(input)) return null;

            var templateFile = new File(mSolution, input);
            templateFile.SaveToFile();
            return templateFile;
        }
Example #5
0
        public File(Solution mSolution, string mFileName)
        {
            _solution = mSolution;
            FileName = mFileName;

            TemplateName = mFileName;
            Code = Utils.DefaultTemplateCode;
            Prefix = Utils.DefaultTemplatePrefix;
            Folder = Utils.DefaultSolutionFolderPrefix + mSolution.FileName + @"\";
        }