Beispiel #1
0
        //--------------------------------------------------------

        public BlockFormCmd()
        {
            m_blockForm = null;

            m_previewClientGraphicsNode = null;
            m_triangleStripGraphics     = null;
            m_graphicsCoordinateSet     = null;
            m_graphicsColorSet          = null;
            m_graphicsColorIndexSet     = null;
        }
Beispiel #2
0
        public override void StartCommand()
        {
            //set the IsometricView
            //Get the CommandManager object
            CommandManager oCommandManager;

            oCommandManager = m_inventorApplication.CommandManager;

            //Get control definition for the homeview command
            ControlDefinition oControlDef;

            oControlDef = oCommandManager.ControlDefinitions["AppIsometricViewCmd"];

            //Excute the command
            oControlDef.Execute();

            //call base command button's StartCommand (to also start interaction)
            base.StartCommand();

            ////implement this command specific functionality
            //subscribe to desired interaction event(s)
            //base.SubscribeToEvent(Interaction.InteractionTypeEnum.kSelection);

            this.InitializePreviewGraphics();

            //Create and display the Dialog
            m_blockForm = new BlockForm(m_inventorApplication, this);

            if (m_blockForm != null)
            {
                m_blockForm.Activate();
                m_blockForm.TopMost       = true;
                m_blockForm.ShowInTaskbar = false;
                m_blockForm.Show();
            }

            //enable interaction
            EnableInteraction();
        }
Beispiel #3
0
        public override void StopCommand()
        {
            //implement this command specific functionality
            TerminatePreviewGraphics();
            m_inventorApplication.ActiveView.Update();

            //destroy the command dialog
            m_blockForm.Hide();
            m_blockForm.Dispose();
            m_blockForm = null;

            ////call base command button's StopCommand (to disconnect interaction sinks)
            //base.StopCommand();

            //stop interaction events
            StopInteraction();

            //un-press the button
            m_buttonDefinition.Pressed = false;

            //set the command status to not-running
            m_commandIsRunning = false;
        }