Exemplo n.º 1
0
        public static SessionQuetEmail Load(string path)
        {
            FileStream fs = new FileStream(path, FileMode.Open);

            try
            {
                BinaryFormatter  bf  = new BinaryFormatter();
                SessionQuetEmail tmp = (SessionQuetEmail)bf.Deserialize(fs);
                fs.Close();
                tmp._cancel = false;
                return(tmp);
            }
            catch (Exception ex)
            {
                fs.Close();
                return(null);
            }
        }
Exemplo n.º 2
0
        public void LoadSession(string path)
        {
            FileStream fs = new FileStream(path, FileMode.Open);

            try
            {
                BinaryFormatter  bf  = new BinaryFormatter();
                SessionQuetEmail tmp = (SessionQuetEmail)bf.Deserialize(fs);
                fs.Close();

                this.LinkBanDau   = tmp.LinkBanDau ?? null;
                _lstLinkDaTruyCap = tmp._lstLinkDaTruyCap;
                _lstEmail         = tmp._lstEmail;
                _linkDangQuet     = tmp._linkDangQuet;
                this.SoLuong      = tmp.SoLuong;
                _cancel           = false;
            }
            catch
            {
                fs.Close();
            }
        }