protected override void OnActivated(EventArgs e) { base.OnActivated(e); // *** AddExt: example if (apphandler == null) { Handler handler = basicIdeCtl1.CreateHandler("Sub AppHandlerChanged"); apphandler = new AppHandler(handler); basicIdeCtl1.AddExtension(".AppHandler.", apphandler); } // *** }
private void Form1_Load(object sender, System.EventArgs e) { basicIdeCtl1.AddExtension("$Feature WWB-COM True", null); // *** AddBasic: optional // turn on tracing basicIdeCtl1.Trace(TraceConstants.All&~TraceConstants.QueryEvent); // *** // *** Handler: example Handler handler = basicIdeCtl1.CreateHandler("Sub AppHandlerChanged"); apphandler = new AppHandler(handler); basicIdeCtl1.AddExtension(".AppHandler.", apphandler); // *** // *** AddBasic: optional // load the file's most recently used file list from the registry string[] files = basicIdeCtl1.FileMRU; using (RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Polar Engineering\C#\IdeCtl\Handler")) for (int i = 0; i < files.Length; ++i) files[i] = (string)rk.GetValue("FileMRU" + (i + 1)); basicIdeCtl1.FileMRU = files; // *** // *** AddBasic: optional basicIdeCtl1.FileDir = Application.ExecutablePath + @"\..\..\.."; // *** }
private void basicIdeCtl1_Disconnecting(object sender, System.EventArgs e) { // *** Handler: example if (apphandler != null) { apphandler.Dispose(); apphandler = null; } // *** // *** AddBasic: optional // save the file menu's most recently used file list in the registry string[] files = basicIdeCtl1.FileMRU; using (RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Polar Engineering\C#\IdeCtl\Handler")) for (int i = 0; i < files.Length; ++i) rk.SetValue("FileMRU" + (i + 1), files[i]); // *** }
private void Form1_Load(object sender, System.EventArgs e) { basicNoUIObj.AddExtension("$Feature WWB-COM True", null); // *** AddBasic: required // replace with your Application/Server certificate's secret basicNoUIObj.Secret = new Guid("{00000000-0000-0000-0000-000000000000}"); basicNoUIObj.Initialize(); // *** // *** AddBasic: optional // turn on tracing basicNoUIObj.Trace(TraceConstants.All&~TraceConstants.QueryEvent); // *** // *** AddBasic: recommended // manage the Basic object/control using this form basicNoUIObj.AttachToForm(this, ManageConstants.All); // *** // *** AddHandler: example Handler handler = basicNoUIObj.CreateHandler("Sub AppHandlerChanged"); apphandler = new AppHandler(handler); basicNoUIObj.AddExtension(".AppHandler.", apphandler); // *** }
private void basicNoUIObj_Disconnecting(object sender, EventArgs e) { // *** Handler: example if (apphandler != null) { apphandler.Dispose(); apphandler = null; } // *** }