Пример #1
0
        private static LinkedResource GetDefaultLogoFromEmbeddedResource()
        {
            try
            {
                var defaultLogo  = new Bitmap(DefaultImages.DefaultLogo);
                var memoryStream = new MemoryStream();
                defaultLogo.Save(memoryStream, ImageFormat.Png);
                memoryStream.Seek(0, SeekOrigin.Begin);

                return(new LinkedResource(memoryStream, "image/png"));
            }
            catch (Exception)
            {
                return(LinkedResource.CreateLinkedResourceFromString("Logo"));
            }
        }
 public void GetReady()
 {
     lrc = AlternateView.CreateAlternateViewFromString("test", new ContentType("text/plain")).LinkedResources;
     lr  = LinkedResource.CreateLinkedResourceFromString("test", new ContentType("text/plain"));
 }
Пример #3
0
 public void GetReady()
 {
     lr = LinkedResource.CreateLinkedResourceFromString("test", new ContentType("text/plain"));
 }
Пример #4
0
 public LinkedResourceTest()
 {
     lr = LinkedResource.CreateLinkedResourceFromString("test", new ContentType("text/plain"));
 }
Пример #5
0
 public LinkedResourceCollectionTest()
 {
     lrc = AlternateView.CreateAlternateViewFromString("test", new ContentType("text/plain")).LinkedResources;
     lr  = LinkedResource.CreateLinkedResourceFromString("test", new ContentType("text/plain"));
 }