public void AddQuestion(Question question) { XDocument xDocument = XDocument.Load(_configFilePath); var questionsNode = xDocument.Element("questions"); if (questionsNode == null || !questionsNode.HasElements) return; XNode node = new XElement(); questionsNode.Add(); }
public void DeleteQuestion(Question question) { XDocument xDocument = XDocument.Load(_configFilePath); var questionsNode = xDocument.Element("questions"); if (questionsNode == null || !questionsNode.HasElements) return; var element = questionsNode.XPathSelectElement(string.Format("//question[@id='{0}']", question.Id)); element.Remove(); xDocument.Save(_configFilePath); }
public void EditQuestion(Question question) { XDocument xDocument = XDocument.Load(_configFilePath); var questionsNode = xDocument.Element("questions"); if (questionsNode == null || !questionsNode.HasElements) return; var element = questionsNode.XPathSelectElement(string.Format("//question[@id='{0}']", question.Id)); if (element == null) return; element.SetElementValue("text", question.Text); xDocument.Save(_configFilePath); }
internal QuestionUserControl(Question question) : this() { Question = question; }
internal QuestionEventArgs(Question question) { Question = question; }
internal QuestionMoveEventArgs(Question question, Direction direction) { Question = question; Direction = direction; }