Пример #1
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            DBCredentials dbc = new DBCredentials();

            this.Hide();
            dbc.Show();
        }
Пример #2
0
        private void btnNo_Click(object sender, EventArgs e)
        {
            DBCredentials dbc = new DBCredentials();

            dbc.Hide();
            this.Hide();
            Form1 form1 = new Form1();

            form1.Show();
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();
            dbc   = new DBCredentials();
            aItem = new AddItem();
            db    = new Connect();
            dItem = new DelItem();
            sDB   = new ShowDB();
            hlr   = new Handler();
            if ((bool)Properties.Settings.Default["FirstRun"] == true)
            {
                Properties.Settings.Default["FirstRun"] = false;

                MessageBox.Show("Welcome!\n " +
                                "\n" +
                                "This is ItemDB v2" +
                                "\n" +
                                "This project was created by Micha Janssen");
                hlr.checkTables();
            }
            this.FormClosed += new FormClosedEventHandler(formClosed);
        }
Пример #4
0
        private void credentialCheck_Load(object sender, EventArgs e)
        {
            lblText.Text = "You already have stored login credentials.\nWant to change them?";
            btnNo.Text   = "No";
            btnYes.Text  = "Yes";
            if (hlr.JsonExists())
            {
                this.Hide();


                if (hlr.readJLDFromJson().Property("server").Value.ToString() != "")
                {
                    this.Show();
                }
                else
                {
                    DBCredentials dbc = new DBCredentials();
                }
            }
            else
            {
                hlr.createNewJson();
            }
        }