Esempio n. 1
0
        public void AfterCreate(IPaintPluginContext pluginContext)
        {
            this.pluginContext = pluginContext;

            optionsControl = new MyUserControl(ApplicationContext);

            string imageDir = pluginContext.PluginDir;

            canDraw = false;

            if (imageDir != null)
            {
                imageDir += @"\Images\";

                try
                {
                    icon = Image.FromFile(imageDir + "Icon.bmp");
                }
                catch { }

                try
                {
                    cursor = new Cursor(imageDir + "Cursor.cur");
                }
                catch { }
            }
        }
Esempio n. 2
0
 public void BeforeDestroy()
 {
     optionsControl.Dispose();
     optionsControl = null;
     if (cursor != null)
     {
         cursor.Dispose();
     }
     if (icon != null)
     {
         icon.Dispose();
     }
 }