Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VersionCheckPlugin"/> class.
        /// </summary>
        /// <param name="con">The connect object.</param>
        /// <param name="appObject">The application object.</param>
        /// <param name="addinInstance">The add-in instance.</param>
        public VersionCheckPlugin(Connect con, DTE2 appObject, AddIn addinInstance) : base(con, appObject, addinInstance)
        {
            VersionCheckPluginInstance = this;

            if (this.Enabled && LastVersionCheck.AddDays(CHECK_EVERY_DAYS) < DateTime.Today)
            {
                //create this form on the main thread
                versionCheckForm = new BIDSHelper.Core.VersionCheckNotificationForm(this);
                versionCheckForm.Show(); //will hide itself

                worker.DoWork += new DoWorkEventHandler(worker_DoWork);
                worker.RunWorkerAsync();
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="VersionCheckPlugin"/> class.
        /// </summary>
        /// <param name="con">The connect object.</param>
        /// <param name="appObject">The application object.</param>
        /// <param name="addinInstance">The add-in instance.</param>
        public VersionCheckPlugin(Connect con, DTE2 appObject, AddIn addinInstance) : base(con, appObject, addinInstance)
        {
            VersionCheckPluginInstance = this;

            if (this.Enabled && LastVersionCheck.AddDays(CHECK_EVERY_DAYS) < DateTime.Today)
            {
                //create this form on the main thread
                versionCheckForm = new BIDSHelper.Core.VersionCheckNotificationForm(this);
                versionCheckForm.Show(); //will hide itself

                worker.DoWork += new DoWorkEventHandler(worker_DoWork);
                worker.RunWorkerAsync();
            }
        }