/// <summary> /// Initialization routine for the Editor. Loads the list of properties for the pnml document /// which will show up in the properties window /// </summary> /// <param name="package"></param> private void PrivateInit(PetrifierPackage package) { this.package = package; loading = false; gettingCheckoutStatus = false; trackSel = null; Control.CheckForIllegalCrossThreadCalls = false; // Create an ArrayList to store the objects that can be selected ArrayList listObjects = new ArrayList(); // Create the object that will show the document's properties // on the properties window. EditorProperties prop = new EditorProperties(this); listObjects.Add(prop); // Create the SelectionContainer object. selContainer = new Microsoft.VisualStudio.Shell.SelectionContainer(true, false); selContainer.SelectableObjects = listObjects; selContainer.SelectedObjects = listObjects; // Create and initialize the editor System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PetriNetEditorPane)); editorControl = new PetriNetDesigner(); editorControl.SelectionChanged += (sender, args) => { isDirty = true; RefreshObjectSelection(); }; resources.ApplyResources(this.editorControl, "editorControl", CultureInfo.CurrentUICulture); // Call the helper function that will do all of the command setup work setupCommands(); }
public EditorFactory(PetrifierPackage package) { Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering {0} constructor", this)); editorPackage = package; }
/// <summary> /// Constructor that calls the Microsoft.VisualStudio.Shell.WindowPane constructor then /// our initialization functions. /// </summary> /// <param name="package">Our Package instance.</param> public PetriNetEditorPane(PetrifierPackage package) : base(null) { PrivateInit(package); }