private void btnYes_Click(object sender, EventArgs e) { DBCredentials dbc = new DBCredentials(); this.Hide(); dbc.Show(); }
private void btnNo_Click(object sender, EventArgs e) { DBCredentials dbc = new DBCredentials(); dbc.Hide(); this.Hide(); Form1 form1 = new Form1(); form1.Show(); }
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); }
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(); } }