Example #1
0
        public void Read()
        {
            HasRead = true;
            if (Debug)
            {
                _Groups = SerialXMLReadWrite <List <Group> > .Read(_DebugFileName);

                for (int i = 0; i < _Groups.Count; i++)
                {
                    _Groups[i].Reinit();
                }
            }
            else
            {
                _Groups = SerialBinaryReadWrite <List <Group> > .Read(_FileName);

                for (int i = 0; i < _Groups.Count; i++)
                {
                    _Groups[i].Reinit();
                }
            }

            for (int i = 0; i < _Groups.Count; i++)
            {
                _Groups[i].OnStatusChanged += Group_OnStatusChanged;
            }

            if (OnRead != null)
            {
                OnRead();
            }
        }
 public void Read(string fileName)
 {
     if (Debug)
     {
         _Metadata = SerialXMLReadWrite <List <Manifest> > .Read(fileName);
     }
     else
     {
         _Metadata = SerialBinaryReadWrite <List <Manifest> > .Read(fileName);// new List<DownloadManifest>();
     }
 }