private void testToolStripMenuItem_Click(object sender, EventArgs e) { try { XMLMaker xw = new XMLMaker(); String ttxurl = "https://joshlucy.info/stand"; System.Drawing.Image img = DownloadImagefromURL(ttxurl); MessageBox.Show(img.ToString()); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { // chck cookie if logged in if not open login box /*XmlDocument doc = new XmlDocument(); * doc.Load(@"A:\programing\gimp\gimpcloud\desktop\Windows\gimpcloud\gimpcloud\XMLFile1.xml"); * * XmlNodeList opt1 = doc.GetElementsByTagName("id"); * string op1b = opt1[0].InnerText.Trim ();*/ string opb1 = "A01"; XMLMaker xw = new XMLMaker(); String op1b = xw.FileReader(); if (opb1.Equals(op1b)) { // image upload form may only Show the image to b opened but I may put a button incase it don't autoopen as a failsafe Form2 f2 = new Form2(); f2.Show(); } else { // Login form Form3 f3 = new Form3(); f3.Show(); } }
private void button1_Click(object sender, EventArgs e) { try { conn.Open(); adapter = new MySqlCommand("SELECT * FROM Main WHERE username='******' AND password='******'", conn); using (MySqlDataReader reader = adapter.ExecuteReader()) { while (reader.Read()) { // save to a xml file also need to work on logout script witch will replace the login varable instead of the UID of the user but with Null // so the script won't allow access XMLMaker mw = new XMLMaker(); mw.MyWriter(reader["UID"].ToString()); MessageBox.Show(reader.Read().ToString()); MessageBox.Show(""); MessageBox.Show("OK entered"); MessageBox.Show(reader["UID"].ToString()); Form2 f2 = new Form2(); f2.Show(); this.Close(); } } } catch (Exception ex) { // should b nothing for now MessageBox.Show("password or username incorrect " + ex); } finally { conn.Close(); } }