Exemple #1
0
        public void gerarJson()
        {
            CookieDAO cdao = new CookieDAO();

            DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(List <CookieClass>));

            diretorioExiste();
            FileStream fs = new FileStream(@"C:\Cookie\cookie.json", FileMode.OpenOrCreate);

            ser.WriteObject(fs, cdao.listarCookie());
            fs.Close();
            MessageBox.Show("Arquivo criado !! - C:\\Cookie\\cookie.json");
        }
Exemple #2
0
 public ListarCookies()
 {
     InitializeComponent();
     cookies = new CookieDAO();
     dgCookies.ItemsSource = cookies.listarCookie();
 }