/tools/PhyreFly/src/PFOutputAttributes.cs

https://bitbucket.org/drummertom999/phyreballs · C# · 42 lines · 39 code · 3 blank · 0 comment · 0 complexity · e8fd0e9c241b7ecdf67553717dfe583b MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Xml.Linq;
  6. using System.Windows.Forms;
  7. namespace PhyreFly
  8. {
  9. public class PFOutputAttributes
  10. {
  11. public PFOutputAttributes(XElement node)
  12. {
  13. m_node = node;
  14. }
  15. public bool ReadFromFile()
  16. {
  17. try
  18. {
  19. Mode = m_node.Attribute("mode");
  20. Filename = m_node.Attribute("filename");
  21. RCName = m_node.Attribute("rcname");
  22. FileList = m_node.Attribute("fileList");
  23. PathPrefix = m_node.Attribute("pathprefix");
  24. return true;
  25. }
  26. catch (Exception e)
  27. {
  28. MessageBox.Show("Failed parsing output attributes: {0}", e.Message);
  29. return false;
  30. }
  31. }
  32. private XElement m_node;
  33. public XAttribute Mode;
  34. public XAttribute Filename;
  35. public XAttribute RCName;
  36. public XAttribute FileList;
  37. public XAttribute PathPrefix;
  38. }
  39. }