string filePath = "/script/widget.php?UserName=%s&Password=%s&URL=%s"; // ici, tu récupères les champs userName, passWord, url // tu formattes ta chaine pour rentrer les données string filepath1 = String.Format(filePath,userName,passWord,url XmlTextReader txtReader1 = new XmlTextReader(filePath1);
string UserName = ""; string Password = ""; string URL = ""; string filePath = "/script/widget.php?UserName=%s&Password=%s&URL=%s"; XmlTextReader txtReader = new XmlTextReader(filePath); string filePath1 = String.Format(filePath, UserName, Password, URL); XmlTextReader txtReader1 = new XmlTextReader(filePath1);
XmlTextReader txtReader = new XmlTextReader(filePath);
private void majCom() { string UserName = ""; string Password = ""; string URL = ""; // ici on récupère les champs string filePath = "/script/widget.php?UserName=%s&Password=%s&URL=%s"; // ici on formate la chaîne pour rentrer des données string filePath1 = String.Format(filePath, UserName, Password, URL); XmlTextReader txtReader = new XmlTextReader(filePath); comsdataset.Clear(); comsdataset.ReadXml(txtReader); dataGridView1.DataSource = comsdataset; dataGridView1.DataMember = "commande"; // retourne la methode cellFormating de la page 2 pour la colorisation des cellules dataGridView1.CellFormatting += dataGridView1_CellFormatting; // retourne le style lors du click sur le bouton de la page 2 this.dataGridViewComStyle(); afficherStat = false; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question// Fonction qui écrit les données d'authentification dans la base de registre windows private void WriteValue(string MotDePasse, string UserName, string URL) { RegistryKey Nkey = Registry.CurrentUser; try { RegistryKey valKey = Nkey.OpenSubKey("Software\\Amenothes\\MyKey", true); if(valKey == null) { Nkey.CreateSubKey("Software\\Amenothes\\MyKey"); } valKey.SetValue("Password", toMD5(txtBoxMDP.Text)); valKey.SetValue("UserName", txtBoxUserName.Text); valKey.SetValue("URL", txtBoxURL.Text); } catch(Exception er) { MessageBox.Show(er.Message, "Amenothes", MessageBoxButtons.OK, MessageBoxIcon.Stop); } finally { Nkey.Close(); } }