|
20 | 20 |
|
21 | 21 | namespace ReClassNET.Forms |
22 | 22 | { |
23 | | - public partial class MainForm : IconForm |
| 23 | + public partial class MainForm |
24 | 24 | { |
| 25 | + public void ShowDefaultCodeGeneratorForm(IReadOnlyList<ClassNode> classes) |
| 26 | + { |
| 27 | + Contract.Requires(classes != null); |
| 28 | + |
| 29 | + ShowCodeGeneratorForm(classes, new CppCodeGenerator(currentProject.TypeMapping)); |
| 30 | + } |
| 31 | + |
| 32 | + public void ShowCodeGeneratorForm(ICodeGenerator generator) |
| 33 | + { |
| 34 | + Contract.Requires(generator != null); |
| 35 | + |
| 36 | + ShowCodeGeneratorForm(currentProject.Classes, generator); |
| 37 | + } |
| 38 | + |
| 39 | + public void ShowCodeGeneratorForm(IReadOnlyList<ClassNode> classes, ICodeGenerator generator) |
| 40 | + { |
| 41 | + Contract.Requires(classes != null); |
| 42 | + Contract.Requires(generator != null); |
| 43 | + |
| 44 | + new CodeForm(generator, classes, Program.Logger).Show(); |
| 45 | + } |
| 46 | + |
25 | 47 | public void AttachToProcess(string processName) |
26 | 48 | { |
27 | 49 | var info = Program.CoreFunctions.EnumerateProcesses().FirstOrDefault(p => string.Equals(p.Name, processName, StringComparison.OrdinalIgnoreCase)); |
@@ -93,15 +115,6 @@ void UpdateClassNodes(BaseNode node) |
93 | 115 | memoryViewControl.ClassNode = currentProject.Classes.FirstOrDefault(); |
94 | 116 | } |
95 | 117 |
|
96 | | - /// <summary>Shows the code form with the given <paramref name="generator"/>.</summary> |
97 | | - /// <param name="generator">The generator.</param> |
98 | | - private void ShowCodeForm(ICodeGenerator generator) |
99 | | - { |
100 | | - Contract.Requires(generator != null); |
101 | | - |
102 | | - LinkedWindowFeatures.ShowCodeGeneratorForm(currentProject.Classes, generator); |
103 | | - } |
104 | | - |
105 | 118 | /// <summary>Opens the <see cref="InputBytesForm"/> and calls <paramref name="callback"/> with the result.</summary> |
106 | 119 | /// <param name="title">The title of the input form.</param> |
107 | 120 | /// <param name="callback">The function to call afterwards.</param> |
|
0 commit comments