Пример #1
0
        private void UpdateRegistration()
        {
            _registerMenuItem.Enabled = !GScrollRegistry.CheckRegistration();

            if (_registerMenuItem.Enabled)
            {
                _registerMenuItem.Text = "Register";
            }
            else
            {
                _registerMenuItem.Text = "Registered - Thank You";
            }
        }
Пример #2
0
        private void menuItem2_Click(object sender, EventArgs e)
        {
            try
            {
                int registrationCode = Int32.Parse(_passTextBox.Text);
                if (GScrollRegistry.CheckRegistration(registrationCode))
                {
                    GScrollRegistry.SetRegistration(registrationCode);
                    MessageBox.Show("GScroll successfully activated", "GScroll Activated", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);

                    this.DialogResult = DialogResult.OK;
                    this.Close();
                    return;
                }
            }
            catch
            {
                //
            }
            MessageBox.Show("Please check your registration code and try again.", "Invalid Code", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
        }
Пример #3
0
        static void Main()
        {
            string workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName);

            System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(Documentation));
            using (StringReader fs = new StringReader(Properties.Resources.documentation))
            {
                Program.Documentation = (Documentation)xs.Deserialize(fs);
            }
            Cursor.Current = Cursors.WaitCursor;
            GScrollSettings settings = new GScrollSettings();

            if (!GScrollRegistry.CheckRegistration())
            {
                using (Register register = new Register())
                {
                    register.ShowDialog();
                }
            }
            Cursor.Current = Cursors.WaitCursor;
            Application.Run(settings);
        }