Ejemplo n.º 1
0
        /// <summary>
        /// Construct the plugin's form.  Attach the plugin to the application.
        /// </summary>
        /// <param name="aApplication">an interface to the application that will receive this plugin</param>
        public MainForm(IPluginReceiver aApplication)
        {
            InitializeComponent();
            mApplication = aApplication;
            bool lDepictionAvailable = ExistsInPath(dot);
            bool lProver9Available   = ExistsInPath(prover9) && ExistsInPath(mace4);

            mApplication.Install(
                DecideActiveBuffer,
                DecideSelectedText,
                lDepictionAvailable ? DepictActiveBuffer : (Action)null,
                lDepictionAvailable ? DepictSelectedText : (Action)null,
                lProver9Available ? ExecuteProver9OnActiveBuffer : (Action)null);
        }
Ejemplo n.º 2
0
        public static bool WndProc(ref Message msg)
        {
            bool res = false;

            // some ISetupForm plugins like tvplugin need the wndproc method to determine when system has been resumed.
            foreach (ISetupForm plugin in _setupForms)
            {
                if (plugin is IPluginReceiver)
                {
                    IPluginReceiver pluginRev = plugin as IPluginReceiver;
                    res = pluginRev.WndProc(ref msg);
                    if (res)
                    {
                        break;
                    }
                }
            }
            return(res);
        }