private bool checkpassword() { XmlTextReader read; if (pathkey == null) { read = new XmlTextReader(folderBrowserDialog1.SelectedPath + "\\p.xml"); } else { read = new XmlTextReader(pathkey + "\\p.xml"); } if (read.ReadState == ReadState.Error) { read.Close(); return(true); } else { try { while (read.Read()) { if (read.NodeType == XmlNodeType.Text) { checkpassword c = new checkpassword(); c.pass = read.Value; if (c.ShowDialog() == DialogResult.OK) { read.Close(); return(c.status); } } } } catch (Exception ex) { read.Close();//editedd at 2:00am //Console.WriteLine(); System.Diagnostics.Debug.WriteLine(ex.ToString()); return(true); } } read.Close(); return(false); }
private bool checkpassword() { XmlTextReader read; if (pathkey == null) { read = new XmlTextReader(folderBrowserDialog1.SelectedPath + "\\p.xml"); } else { read = new XmlTextReader(pathkey + "\\p.xml"); } if (read.ReadState == ReadState.Error) { return(true); } else { try { while (read.Read()) { if (read.NodeType == XmlNodeType.Text) { checkpassword c = new checkpassword(); c.pass = read.Value; if (c.ShowDialog() == DialogResult.OK) { read.Close(); return(c.status); } } } } catch { return(true); } } read.Close(); return(false); }
private bool checkpassword() { XmlTextReader read; if(pathkey ==null) read = new XmlTextReader(folderBrowserDialog1.SelectedPath + "\\p.xml"); else read = new XmlTextReader(pathkey + "\\p.xml"); if (read.ReadState == ReadState.Error) return true; else { try { while (read.Read()) if (read.NodeType == XmlNodeType.Text) { checkpassword c = new checkpassword(); c.pass = read.Value; if (c.ShowDialog() == DialogResult.OK) { read.Close(); return c.status; } } } catch { return true; } } read.Close(); return false; }