public SolutionWindow(Solution mSolution) { InitializeComponent(); _solution = mSolution; SyncFromSolution(); }
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; }
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; }
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; }
public File(Solution mSolution, string mFileName) { _solution = mSolution; FileName = mFileName; TemplateName = mFileName; Code = Utils.DefaultTemplateCode; Prefix = Utils.DefaultTemplatePrefix; Folder = Utils.DefaultSolutionFolderPrefix + mSolution.FileName + @"\"; }