コード例 #1
0
 /// <summary>
 /// Set data into the command.
 /// </summary>
 public void Make(ModelessCommandData commandData)
 {
     lock (this)
     {
         m_data = commandData;
     }
 }
コード例 #2
0
        private void RaisePrintSummaryCommand()
        {
            ModelessCommandData data = new ModelessCommandData();

            data.CommandType = ModelessCommandType.PrintMainPageStatistics;
            ThisApplication.thisApp.GetDockableAPIUtility().RunModelessCommand(data);
            m_exEvent.Raise();
        }
コード例 #3
0
        /// <summary>
        /// Called to execute an API command and update the UI after the command is finished.
        /// </summary>
        public void Execute(UIApplication app)
        {
            ModelessCommandData data = ThisApplication.thisApp.GetDockableAPIUtility().ModelessCommand.Take();

            ThisApplication.thisApp.GetDockableAPIUtility().RunModelessCommand(data);
            ThisApplication.thisApp.GetMainWindow().UpdateUI(ThisApplication.thisApp.GetDockableAPIUtility().ModelessCommand.Take());
            ThisApplication.thisApp.GetMainWindow().WakeUp();
        }
コード例 #4
0
        private void RaisePrintSpecificSummaryCommand(string guid)
        {
            ModelessCommandData data = new ModelessCommandData();

            data.CommandType    = ModelessCommandType.PrintSelectedPageStatistics;
            data.SelectedPaneId = guid;
            ThisApplication.thisApp.GetDockableAPIUtility().RunModelessCommand(data);
            m_exEvent.Raise();
        }
コード例 #5
0
        public void UpdateUI(ModelessCommandData data)
        {
            switch (data.CommandType)
            {
            case (ModelessCommandType.PrintMainPageStatistics):
            {
                Log.Message("***Main Pane***");
                Log.Message(data.WindowSummaryData);
                break;
            }

            case (ModelessCommandType.PrintSelectedPageStatistics):
            {
                Log.Message("***Selected Pane***");
                Log.Message(data.WindowSummaryData);
                break;
            }

            default:
                break;
            }
        }
コード例 #6
0
        /// <summary>
        /// A method to examine an incoming command and start the process of executing
        /// safely in the Idle() or ExternalEvent() loop.
        /// </summary>
        public void RunModelessCommand(ModelessCommandData command)
        {
            switch (command.CommandType)
            {
            case ModelessCommandType.PrintMainPageStatistics:
            {
                // command.WindowSummaryData = // GetPaneSummary(ThisApplication.thisApp.MainPageDockablePaneId);
                ModelessCommand.Make(command);
                break;
            }

            case ModelessCommandType.PrintSelectedPageStatistics:
            {
                command.WindowSummaryData = GetPaneSummary(command.SelectedPaneId);
                ModelessCommand.Make(command);
                break;
            }


            default:
                break;
            }
        }