Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
 public void Write()
 {
     if (Debug)
     {
         SerialXMLReadWrite <List <Group> > .Write(_Groups, _DebugFileName);
     }
     else
     {
         SerialBinaryReadWrite <List <Group> > .Write(_Groups, _FileName);
     }
 }
Exemplo n.º 3
0
 public void Write(string fileName)
 {
     if (Debug)
     {
         SerialXMLReadWrite <List <Manifest> > .Write(_Metadata, fileName);
     }
     else
     {
         SerialBinaryReadWrite <List <Manifest> > .Write(_Metadata, fileName);
     }
 }
Exemplo n.º 4
0
 public void Read(string fileName)
 {
     if (Debug)
     {
         _Metadata = SerialXMLReadWrite <List <Manifest> > .Read(fileName);
     }
     else
     {
         _Metadata = SerialBinaryReadWrite <List <Manifest> > .Read(fileName);// new List<DownloadManifest>();
     }
 }