Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.AddIn;
- using Cup.Extensibility;
- using Cup.Extensibility.Library;
- using System.Windows.Forms;
- namespace CuPAddIn
- {
- [AddIn("CuPAddIn")]
- public class AddInBase : ICuPAddIn
- {
- private static bool started = false;
- private static Form1 form;
- public void OnBoot() { }
- public void OnExit()
- {
- if (form != null)
- {
- form.Close();
- form.Dispose();
- }
- started = false;
- }
- public void OnStart()
- {
- if (started)
- {
- form.ShowDialog();
- }
- else
- {
- ApiPipeline.Hook();
- form = new Form1();
- started = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement