public void Reinit(CogaenEditExtensionPackage package, IEditorGui editor, String caption, String serviceName)
 {
     m_package = package;
     m_editor = editor.GetControl();
     editor.Reinit(serviceName, CogaenEditExtensionPackage.Connection);
     m_content.Content = m_editor;
     // Set the window title reading it from the resources.
     base.Caption = caption;
 }
        /// <summary>
        /// Default constructor of the package.
        /// Inside this method you can place any initialization code that does not require 
        /// any Visual Studio service because at this point the package object is created but 
        /// not sited yet inside Visual Studio environment. The place to do all the other 
        /// initialization is the Initialize method.
        /// </summary>
        public CogaenEditExtensionPackage()
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", this.ToString()));

            m_messageHandler = new MessageHandler(this, m_Data,Dispatcher.CurrentDispatcher);
            m_connection = new Connection(m_messageHandler);
            m_messageHandler.Connection = m_connection;

            Data.LiveGameObjects = new ObjectBuilder("LiveGameObjects", CogaenEditExtensionPackage.Data);

            m_mainInstance = this;

            DummyInit.Init();
        }
 public ServiceListCtrl(CogaenEditExtensionPackage package)
 {
     m_package = package;
     InitializeComponent();
 }
示例#4
0
        public EditorFactory(CogaenEditExtensionPackage package)
        {
            Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering {0} constructor", this.ToString()));

            this.editorPackage = package;
        }
示例#5
0
        /// <summary>
        /// Initialization routine for the Editor. Loads the list of properties for the ctl document 
        /// which will show up in the properties window 
        /// </summary>
        /// <param name="package"></param>
        private void PrivateInit(CogaenEditExtensionPackage package)
        {
            myPackage = 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(EditorPane));
            this.editorControl = new MyEditor();
            //this.objectBuilder = new ObjectBuilderControl();

            resources.ApplyResources(this.editorControl, "editorControl", CultureInfo.CurrentUICulture);
            //resources.ApplyResources(this.objectBuilder, "objectBuiler", CultureInfo.CurrentUICulture);
            //// Event handlers for macro recording.
            //this.editorControl.RichTextBoxControl.TextChanged += new System.EventHandler(this.OnTextChange);
            //this.editorControl.RichTextBoxControl.MouseDown += new MouseEventHandler(this.OnMouseClick);
            //this.editorControl.RichTextBoxControl.SelectionChanged += new EventHandler(this.OnSelectionChanged);
            //this.editorControl.RichTextBoxControl.KeyDown += new KeyEventHandler(this.OnKeyDown);
            
            //// Handle Focus event
            //this.editorControl.RichTextBoxControl.GotFocus += new EventHandler(this.OnGotFocus);

            // Call the helper function that will do all of the command setup work
            setupCommands();
        }
示例#6
0
 /// <summary>
 /// Constructor that calls the Microsoft.VisualStudio.Shell.WindowPane constructor then
 /// our initialization functions.
 /// </summary>
 /// <param name="package">Our Package instance.</param>
 public EditorPane(CogaenEditExtensionPackage package)
     : base(null)
 {
     PrivateInit(package);
 }