using System;
using System.IO;
using System.Net;
using System.Linq;
using System.Xml;
using System.Reflection;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
using Windows.UI.Xaml.Shapes;
using Windows.Foundation;

namespace PdfCreator
{
    public static class DataAccess
    {
        public static Stream GetStream(string resName)
        {
            var asm = typeof(DataAccess).GetTypeInfo().Assembly;
            resName = string.Format("{0}.Resources.{1}", asm.FullName.Split(',')[0].Trim(), resName);
            return asm.GetManifestResourceStream(resName);
        }

        //public static DataSet GetDataSet()
        //{
        //    var ds = new DataSet();
        //    using (var s = GetStream("nwind.zip"))
        //    {
        //        var zip = new C1.C1Zip.C1ZipFile(s);
        //        //var entry = zip.Entries.[0];
        //        using (var zr = zip.Entries.Entries[0].OpenReader())
        //        {
        //            ds.ReadXml(zr);
        //        }
        //    }
        //    return ds;
        //}

    }
}
