private void ShowWindowForPassingFile(string fileName) { Cursor.Current = Cursors.WaitCursor; try { if (fileName == null) { return; } Form form = CreateEmptyWindowForFile(fileName); ParseTextControl control = new ParseTextControl(); control.RuleType = RuleType.Goal; control.Dock = DockStyle.Fill; form.Controls.Add(control); form.Show(); control.ParseString(File.ReadAllText(fileName)); } finally { Cursor.Current = Cursors.Default; } }
private void ShowWindowForPassingFile(string fileName) { Cursor.Current = Cursors.WaitCursor; try { if (fileName == null) return; Form form = CreateEmptyWindowForFile(fileName); ParseTextControl control = new ParseTextControl(); control.RuleType = RuleType.Goal; control.Dock = DockStyle.Fill; form.Controls.Add(control); form.Show(); control.ParseString(File.ReadAllText(fileName)); } finally { Cursor.Current = Cursors.Default; } }