private void mniFileOpen_Click(object sender, EventArgs e) { if (dlgOpen.ShowDialog() == DialogResult.OK) { DocumentParser parser = new DocumentParser(dlgOpen.FileName); elDocument = parser.Document; UpdateStatistics(); } }
static void Main() { string projectPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), @"..\..\..\..\")); string exampleFile = Path.GetFullPath(Path.Combine(projectPath, @"test.eld")); DocumentParser parser = new DocumentParser(exampleFile); // Setup and run the application. Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm(parser.Document)); }