private void RestoreListView() { this.lvEvents.Items.Clear(); foreach (Event e in macro.Events) { ListViewItem i = new ListViewItem(e.ElapsedTick.ToString()); i.SubItems.Add(StringValue.GetStringValue(e.EventType)); i.SubItems.Add(e.Description); this.lvEvents.Items.Add(i); } }
public fMacro(Macro m) { InitializeComponent(); this.macro = m; foreach (Event e in m.Events) { ListViewItem i = new ListViewItem(e.ElapsedTick.ToString()); i.SubItems.Add(StringValue.GetStringValue(e.EventType)); i.SubItems.Add(e.Description); this.lvEvents.Items.Add(i); } }
public bool PermissionFeature(EFeatures efeature, EPermission ePermission, List <Features> features) { return(features.Any(feature => (feature.Permission.Equals(ePermission)) && (StringValue.GetStringValue(efeature).Equals(feature.Description)))); }
private void FillButtons() { buttons[Rate.NotUnderstand] = new RateInfo(Driver.FindElement(By.Id(StringValue.GetStringValue(Rate.NotUnderstand)))); buttons[Rate.Trivial] = new RateInfo(Driver.FindElement(By.Id(StringValue.GetStringValue(Rate.Trivial)))); buttons[Rate.Good] = new RateInfo(Driver.FindElement(By.Id(StringValue.GetStringValue(Rate.Good)))); }
private static void CreateDataPath(LoginAuthentication loginAuthentication, string login) { if (File.Exists(_path + login + ".xml")) { File.Delete(_path + login + ".xml"); } XmlDocument xmlDocument = new XmlDocument(); XmlNode nodeConjunto = xmlDocument.CreateNode(XmlNodeType.Element, "CONJUNTO", null); XmlNode nodeData = xmlDocument.CreateNode(XmlNodeType.Element, "DATA", null); XmlNode nodeCodeSession = xmlDocument.CreateElement("CODESESSION"); nodeCodeSession.InnerText = Utility.Cript(loginAuthentication.CodeSession); XmlNode nodeLogin = xmlDocument.CreateElement("LOGIN"); nodeLogin.InnerText = Utility.Cript(loginAuthentication.Login); XmlNode nodePassword = xmlDocument.CreateElement("PASSWORD"); nodePassword.InnerText = Utility.Cript(loginAuthentication.Password); XmlNode nodeLastdate = xmlDocument.CreateElement("LASTDATE"); nodeLastdate.InnerText = Utility.Cript(DateTime.Parse(DateTime.Now.ToString(), new CultureInfo("pt-BR")).ToString()); XmlNode nodeLimitDate = xmlDocument.CreateElement("LIMITDATE"); nodeLimitDate.InnerText = Utility.Cript(DateTime.Parse(loginAuthentication.LimitDate.ToString(), new CultureInfo("pt-BR")).ToString()); XmlNode nodeRemember = xmlDocument.CreateElement("REMEMBER"); nodeRemember.InnerText = Utility.Cript(loginAuthentication.Remember.ToString()); XmlNode nodeFeatures = xmlDocument.CreateNode(XmlNodeType.Element, "FEATURES", null); foreach (var feature in loginAuthentication.Features) { XmlNode nodeFeature = xmlDocument.CreateNode(XmlNodeType.Element, "FEATURE", null); XmlNode nodeDescription = xmlDocument.CreateElement("DESCRIPTION"); nodeDescription.InnerText = Utility.Cript(StringValue.GetStringValue(feature.Description)); XmlNode nodePermission = xmlDocument.CreateElement("PERMISSION"); nodePermission.InnerText = Utility.Cript(StringValue.GetStringValue(feature.Permission)); nodeFeature.AppendChild(nodePermission); nodeFeature.AppendChild(nodeDescription); nodeFeatures.AppendChild(nodeFeature); } nodeData.AppendChild(nodeCodeSession); nodeData.AppendChild(nodeLogin); nodeData.AppendChild(nodePassword); nodeData.AppendChild(nodeLastdate); nodeData.AppendChild(nodeLimitDate); nodeData.AppendChild(nodeRemember); nodeData.AppendChild(nodeFeatures); nodeConjunto.AppendChild(nodeData); xmlDocument.AppendChild(nodeConjunto); xmlDocument.Save(_path + login + ".xml"); VersionChecker.VersionChecker.InsertVersion(_path + login + ".xml", VersionChecker.VersionChecker.Version); xmlDocument.Save(_path + "LoginSaved.xml"); VersionChecker.VersionChecker.InsertVersion(_path + "LoginSaved.xml", VersionChecker.VersionChecker.Version); }