Esempio n. 1
0
        public void Load(string inFileName)
        {
            try
            {
                var xmlSerializer = new XmlSerializer(typeof(XmlIO));

                using (FileStream fs = new FileStream(inFileName, FileMode.Open))
                {
                    var xmlIO = xmlSerializer.Deserialize(fs) as XmlIO;

                    ExecTypeList    = xmlIO.ExecTypeList;
                    TreeViewList    = xmlIO.TreeViewList;
                    SelectedElement = TreeViewList[0];
                    SetParent();
                }
            }
            catch (Exception e)
            {
                ExecTypeList    = new List <string>();
                TreeViewList    = new List <OneElement>();
                SelectedElement = new OneElement(Database.Instance.ExecTypeList);
                TreeViewList.Add(SelectedElement);
                throw e;
            }
        }
Esempio n. 2
0
 public void SetParent(OneElement inParent)
 {
     Parent = inParent;
     foreach (var child in Children)
     {
         child.SetParent(this);
     }
 }
Esempio n. 3
0
 public OneElement(OneElement inParent, IReadOnlyList <string> inExecTypeList)
 {
     Parent = inParent;
     Title  = "新規";
     foreach (var execType in inExecTypeList)
     {
         ExecFlagDict.Add(execType, false);
     }
 }
Esempio n. 4
0
 public Database()
 {
     SelectedElement = new OneElement(ExecTypeList);
     TreeViewList.Add(SelectedElement);
 }