public FormLST(ppxEditor editor, string lstParserVar) { try { InitializeComponent(); lstParser parser = (lstParser)Gui.Scripting.Variables[lstParserVar]; this.ShowHint = DockState.Document; this.Text = parser.Name; this.ToolTipText = editor.Archive.Filename + @"\" + parser.Name; ParserVar = lstParserVar; checkBoxWordWrap.Checked = syntaxHighlightingTextBoxLSTContents.WordWrap; syntaxHighlightingTextBoxLSTContents.ScrollBars = RichTextBoxScrollBars.Both & RichTextBoxScrollBars.ForcedBoth; syntaxHighlightingTextBoxLSTContents.Seperators.Add('\t'); syntaxHighlightingTextBoxLSTContents.HighlightDescriptors.Add(new HighlightDescriptor("//", Color.DimGray, null, DescriptorType.ToEOL, DescriptorRecognition.StartsWith, false)); syntaxHighlightingTextBoxLSTContents.InitText(parser.Text); syntaxHighlightingTextBoxLSTContents.TextChanged += new EventHandler(syntaxHighlightingTextBoxLSTContents_TextChanged); syntaxHighlightingTextBoxLSTContents.DragDrop += new DragEventHandler(syntaxHighlightingTextBoxLSTContents_DragDrop); syntaxHighlightingTextBoxLSTContents.EnableAutoDragDrop = true; buttonApplyCheck.Enabled = false; Gui.Docking.ShowDockContent(this, Gui.Docking.DockEditors, ContentCategory.Others); } catch (Exception ex) { Utility.ReportException(ex); } }
public static lstParser OpenLST([DefaultVar] ppxEditor editor, string arcname, string name) { var subfile = editor.GetSubfile(arcname, name); if (editor.FindSubfile(arcname, name)) { return(new lstParser(editor.ReadSubfile(arcname, name), subfile.Name)); } return(null); }