Esempio n. 1
0
        void IExtensionApplication.Initialize()
        {
            // Add one time initialization here
            // One common scenario is to setup a callback function here that
            // unmanaged code can call.
            // To do this:
            // 1. Export a function from unmanaged code that takes a function
            //    pointer and stores the passed in value in a global variable.
            // 2. Call this exported function in this function passing delegate.
            // 3. When unmanaged code needs the services of this managed module
            //    you simply call acrxLoadApp() and by the time acrxLoadApp
            //    returns  global function pointer is initialized to point to
            //    the C# delegate.
            // For more info see:
            // http://msdn2.microsoft.com/en-US/library/5zwkzwf4(VS.80).aspx
            // http://msdn2.microsoft.com/en-us/library/44ey4b32(VS.80).aspx
            // http://msdn2.microsoft.com/en-US/library/7esfatk4.aspx
            // as well as some of the existing AutoCAD managed apps.


            // Initialize your plug-in application here
            MyCommands myCommands = new MyCommands();

            myCommands.MyMenu();
            myCommands.MyRibbonTab();
            myCommands.MyHook();
            //myCommands.OpenWindow();
            myCommands.OpenWindowRequest += MyCommands_OpenWindowRequest;
        }
Esempio n. 2
0
 public Window1()
 {
     InitializeComponent();
     cmd = new MyCommands();
 }