コード例 #1
0
        /// <summary>
        /// Initializes the component.
        /// </summary>
        /// <param name="firstTime">if set to <c>true</c> [first time].</param>
        public static void initializeComponent(bool firstTime)
        {
            DialogResult dialogResult;

            //if (firstTime)
            //{
            //    MessageBox.Show("Zeroit Control", "Zeroit License", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            //}
            if (AnidasoCustomControl.Paint_())
            {
                string str = AnidasoCustomControl.RenderComplete();
                do
                {
                    if (str.ToLower().Trim() == "true")
                    {
                        return;
                    }
                    dialogResult = MessageBox.Show(string.Concat(str, "\n \n Design Time License Locked (Your project wont be affected)"), "License Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Exclamation);
                }while (dialogResult == DialogResult.Retry);
                if (dialogResult == DialogResult.Abort)
                {
                    cmd.EXECUTECMD("taskkill /im devenv.exe /f");
                }
                if (dialogResult == DialogResult.Ignore & firstTime)
                {
                    System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer()
                    {
                        Interval = 5000
                    };
                    timer.Tick += new EventHandler(AnidasoCustomControl.smethod_0);
                    timer.Start();
                    return;
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Initializes static members of the <see cref="AnidasoCustomControl"/> class.
        /// </summary>
        static AnidasoCustomControl()
        {
            int num  = 0;
            int num1 = 0;
            int num2;

            AnidasoCustomControl.myidentity = "";
            if (!AnidasoCustomControl.Paint_())
            {
                do
                {
                    if (num != num1)
                    {
                        break;
                    }
                    num1 = 1;
                    num2 = num;
                    num  = 1;
                }while (1 <= num2);
            }
            else
            {
                AnidasoCustomControl.initializeComponent(true);
            }
        }