Exemple #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            if (isGenuine)
            {
                if (MessageBox.Show(
                        "Clicking 'OK' will deactivate this copy of RabCab!" +
                        "\nDoing so will free your activation key for install on other systems." +
                        "\n\nClick 'OK' to continue deactivation.",
                        "Deactivate RabCab?", MessageBoxButtons.OKCancel) != DialogResult.OK)
                {
                    return;
                }
                // deactivate product without deleting the product key
                // allows the user to easily reactivate
                try
                {
                    InitPlugin.Activated = false;
                    ta.Deactivate(true);
                }
                catch (TurboActivateException ex)
                {
                    MessageBox.Show("Failed to deactivate: " + ex.Message);
                    return;
                }

                isGenuine = false;
                ShowTrial(true);
            }
            else
            {
                // Note: you can launch the TurboActivate wizard
                //       or you can create you own interface

                // launch TurboActivate.exe to get the product key from
                // the user, and activate.
                var TAProcess = new Process
                {
                    StartInfo =
                    {
                        FileName = Path.Combine(
                            Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                            "TurboActivate.exe"
                            )
                    },
                    EnableRaisingEvents = true
                };

                TAProcess.Exited += p_Exited;
                TAProcess.Start();
            }
        }
Exemple #2
0
        void mnuActDeact_Click(object sender, EventArgs e)
        {
            if (isGenuine)
            {
                // deactivate product without deleting the product key
                // allows the user to easily reactivate
                try
                {
                    ta.Deactivate(false);
                }
                catch (TurboActivateException ex)
                {
                    MessageBox.Show("Failed to deactivate: " + ex.Message);
                    return;
                }

                isGenuine = false;
                ShowTrial(true);
            }
            else
            {
                // Note: you can launch the TurboActivate wizard
                //       or you can create you own interface

                // launch TurboActivate.exe to get the product key from
                // the user, and activate.
                Process TAProcess = new Process
                {
                    StartInfo =
                    {
                        FileName = Path.Combine(
                            Path.GetDirectoryName(Application.ExecutablePath),
                            "TurboActivate.exe"
                            )
                    },
                    EnableRaisingEvents = true
                };

                TAProcess.Exited += p_Exited;
                TAProcess.Start();
            }
        }