Exemple #1
0
        void ws_GetThongBaoDonCompleted(object sender, GetThongBaoDonCompletedEventArgs e)
        {
            IsolatedStorageFileStream fs = new IsolatedStorageFileStream("Temp.doc", FileMode.OpenOrCreate, FileAccess.ReadWrite, str);
            BinaryWriter br = new BinaryWriter(fs);

            br.Write(Convert.FromBase64String(e.Result));
            richEdit.LoadDocument(fs, DocumentFormat.Doc);
            fs.Close();
            fs.Dispose();
        }
 void ws_GetThongBaoDonCompleted(object sender, GetThongBaoDonCompletedEventArgs e)
 {
     if (e.Result != "")
     {
         //Load thong bao len RichEidit
         IsolatedStorageFileStream fs = new IsolatedStorageFileStream("Temp.doc", FileMode.OpenOrCreate, FileAccess.ReadWrite, str);
         BinaryWriter br = new BinaryWriter(fs);
         br.Write(Convert.FromBase64String(e.Result));
         richEdit.LoadDocument(fs, DocumentFormat.Doc);
         this.Title = tieude;
         fs.Close();
         fs.Dispose();
     }
     else
     {
         richEdit.Text = "Nội dung thông báo trống";
     }
 }
 void ws_GetThongBaoDonCompleted(object sender, GetThongBaoDonCompletedEventArgs e)
 {
     if (e.Result != "")
     {
         //Load thong bao len RichEidit
         IsolatedStorageFileStream fs = new IsolatedStorageFileStream("Temp.doc", FileMode.OpenOrCreate, FileAccess.ReadWrite, str);
         BinaryWriter br = new BinaryWriter(fs);
         br.Write(Convert.FromBase64String(e.Result));
         richEdit.LoadDocument(fs, DocumentFormat.Doc);
         this.Title = tieude;
         fs.Close();
         fs.Dispose();
     }
     else
     {
         richEdit.Text = "Nội dung thông báo trống";
     }
 }