public MainWindow() { InitializeComponent(); string pbVersion = ConfigurationManager.AppSettings["PBVersion"]; if (String.IsNullOrEmpty(pbVersion)) { this.pbVersion = Orca.Version.PB126; } else { switch (pbVersion) { case "115": this.pbVersion = Orca.Version.PB115; break; case "125": this.pbVersion = Orca.Version.PB125; break; case "126": this.pbVersion = Orca.Version.PB126; break; } } }
/// <summary> /// constructor /// </summary> /// <param name="name">name of the entry</param> /// <param name="type">enum type of the object</param> /// <param name="createTime">creation datetime</param> /// <param name="size">size of object</param> /// <param name="library">path to library</param> /// <param name="comment">comment of entry</param> public LibEntry(string name, Objecttype type, DateTime createTime, int size, string library, orca.Orca.Version pbVersion, string comment = "") { this.name = name; this.type = type; this.createTime = createTime; this.size = size; this.comment = comment; this.library = library; this.pbVersion = pbVersion; }
public MainWindow() { InitializeComponent(); string pbVersion = ConfigurationManager.AppSettings["PBVersion"]; if (String.IsNullOrEmpty(pbVersion)) { this.pbVersion = Orca.Version.PB126; } else { switch (pbVersion) { case "115": this.pbVersion = Orca.Version.PB115; break; case "125": this.pbVersion = Orca.Version.PB125; break; case "126": this.pbVersion = Orca.Version.PB126; break; } } if (CmdlineArgs.Workspace != null) { this.openWorkspace(CmdlineArgs.Workspace); } else if (CmdlineArgs.Library != null) { this.openLibrary(CmdlineArgs.Library); } using (Stream s = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("PBDotNet.PBSyntax.xshd")) { using (XmlTextReader reader = new XmlTextReader(s)) { highlightingDefinition = HighlightingLoader.Load(reader, HighlightingManager.Instance); } } txtSource.SyntaxHighlighting = this.highlightingDefinition; txtUoSource.SyntaxHighlighting = this.highlightingDefinition; txtUoIVariables.SyntaxHighlighting = this.highlightingDefinition; txtUoSVariables.SyntaxHighlighting = this.highlightingDefinition; txtUoGVariables.SyntaxHighlighting = this.highlightingDefinition; txtUoExtFunctions.SyntaxHighlighting = this.highlightingDefinition; }
/// <summary> /// constructor /// </summary> /// <param name="file">path to lib</param> /// <param name="version">PB version</param> public Library(string file, Orca.Version version) { this.orca = new Orca(version); dir = file.Substring(0, file.LastIndexOf("\\")); this.file = file.Substring(file.LastIndexOf("\\") + 1); }