Beispiel #1
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            VotingsUser.Theme++;
            if (VotingsUser.Theme > 3)
            {
                VotingsUser.Theme = 0;
            }

            CommonHelpers.ChangeTheme(VotingsUser.Theme);

            VotingsUser.ChangeSetting("theme", VotingsUser.Theme.ToString());
        }
        public RegisterLoginForm()
        {
            InitializeComponent();

            MaterialSkinManager.Instance.AddFormToManage(this);

            panelFixer.BackColor = MaterialSkinManager.Instance.ColorScheme.PrimaryColor;

            this.Text                    = Properties.Resources.loginIntoNet;
            labelPassLogin.Text          = Properties.Resources.pass;
            labelPasswordRegister.Text   = Properties.Resources.pass;
            labelPasswordRegister2.Text  = Properties.Resources.passRepeat;
            labelPrivateKeyRegister.Text = Properties.Resources.privateKey;
            labelPublicKeyLogin.Text     = Properties.Resources.userHash;
            labelPublicKeyRegister.Text  = Properties.Resources.userHash;
            buttonLogin.Text             = Properties.Resources.toLogin;
            buttonRegister.Text          = Properties.Resources.register;
            tabPageLogin.Text            = Properties.Resources.login;
            tabPageRegister.Text         = Properties.Resources.registration;



            if (VotingsUser.CheckUserExists())
            {
                VotingsUser.GetKeysFromConfig();

                tabControl1.SelectTab("tabPageLogin");
                textBoxPublicKeyLogin.Text = VotingsUser.PublicKey;

                CommonHelpers.ChangeTheme(VotingsUser.Theme);
            }
            else
            {
                tabControl1.SelectTab("tabPageRegister");
                var tab = tabControl1.TabPages["tabPageLogin"];
                tabControl1.TabPages.Remove(tab);
            }


            Icon = Properties.Resources.votingIcon;
        }