コード例 #1
0
        public async Task <ActionResult> SaveImage(HttpPostedFileBase __filename, string __lastInternalName)
        {
#endif
            FileUpload upload   = new FileUpload();
            string     tempName = await upload.StoreTempImageFileAsync(__filename);

            if (!string.IsNullOrWhiteSpace(__lastInternalName)) // delete the previous file we had open
            {
                await upload.RemoveTempFileAsync(__lastInternalName);
            }

            Size size = await ImageSupport.GetImageSizeAsync(tempName);

            UploadResponse resp = new UploadResponse {
                Result        = $"$YetaWF.confirm('{Utility.JserEncode(this.__ResStr("saveImageOK", "Image \"{0}\" successfully uploaded", __filename.FileName))}');",
                FileName      = tempName,
                FileNamePlain = tempName,
                RealFileName  = __filename.FileName,
                Attributes    = this.__ResStr("imgAttr", "{0} x {1} (w x h)", size.Width, size.Height),
            };

            return(new YJsonResult {
                Data = resp
            });
        }
コード例 #2
0
        public void Save()
        {
            // update node
            XmlDocument configFile = config.MetaBlogConfigFile;
            XmlNode     channelXml = null;

            if (User != null && User.Id > -1)
            {
                channelXml = configFile.SelectSingleNode(string.Format("//channel [user = '******']", this.User.Id));
            }
            if (channelXml != null)
            {
                configFile.DocumentElement.RemoveChild(channelXml);
            }

            // add new node
            XmlElement newChannelxml = configFile.CreateElement("channel");

            newChannelxml.AppendChild(
                xmlHelper.addTextNode(configFile, "name", Name));
            newChannelxml.AppendChild(
                xmlHelper.addTextNode(configFile, "user", User.Id.ToString()));
            newChannelxml.AppendChild(
                xmlHelper.addTextNode(configFile, "startNode", StartNode.ToString()));
            newChannelxml.AppendChild(
                xmlHelper.addTextNode(configFile, "fullTree", FullTree.ToString()));
            newChannelxml.AppendChild(
                xmlHelper.addTextNode(configFile, "documentTypeAlias", DocumentTypeAlias));

            // fields
            XmlElement fieldsxml = configFile.CreateElement("fields");

            fieldsxml.AppendChild(
                xmlHelper.addTextNode(configFile, "categories", FieldCategoriesAlias));
            fieldsxml.AppendChild(
                xmlHelper.addTextNode(configFile, "description", FieldDescriptionAlias));
            fieldsxml.AppendChild(
                xmlHelper.addTextNode(configFile, "excerpt", FieldExcerptAlias));
            newChannelxml.AppendChild(fieldsxml);


            // media
            XmlElement media = configFile.CreateElement("mediaObjectSupport");

            media.Attributes.Append(xmlHelper.addAttribute(configFile, "enabled", ImageSupport.ToString()));
            media.Attributes.Append(xmlHelper.addAttribute(configFile, "folderId", MediaFolder.ToString()));
            media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeAlias", MediaTypeAlias));
            media.Attributes.Append(xmlHelper.addAttribute(configFile, "mediaTypeFileProperty", MediaTypeFileProperty));
            newChannelxml.AppendChild(media);
            configFile.DocumentElement.AppendChild(newChannelxml);

            configFile.Save(IOHelper.MapPath(SystemFiles.MetablogConfig));
        }
コード例 #3
0
        internal static async Task <string> RenderImageAttributesAsync(string model)
        {
            if (model == null)
            {
                return("");
            }
            System.Drawing.Size size = await ImageSupport.GetImageSizeAsync(model);

            if (size.IsEmpty)
            {
                return("");
            }
            return(__ResStr("imgAttr", "{0} x {1} (w x h)", size.Width, size.Height));
        }
コード例 #4
0
        public async Task <ActionResult> SaveImage(HttpPostedFileBase __filename, string folderGuid, string subFolder, string fileType)
#endif
        {
            FileUpload upload      = new FileUpload();
            string     storagePath = ImageSelectionInfo.StoragePath(new Guid(folderGuid), subFolder, fileType);
            string     namePlain   = await upload.StoreFileAsync(__filename, storagePath, MimeSection.ImageUse);

            string name = namePlain;

            System.Drawing.Size size = ImageSupport.GetImageSize(namePlain, storagePath);

            HtmlBuilder hb = new HtmlBuilder();

            foreach (var f in await ImageSelectionInfo.ReadFilesAsync(new Guid(folderGuid), subFolder, fileType))
            {
                string plain = f.RemoveStartingAt(ImageSupport.ImageSeparator);
                string sel   = "";
                if (plain == namePlain)
                {
                    sel  = " selected";
                    name = f;
                }
                hb.Append(string.Format("<option title='{0}' value='{1}'{2}>{0}</option>", Utility.HtmlAttributeEncode(plain), Utility.HtmlAttributeEncode(f), sel));
            }

            // Upload control considers Json result a success. result has a function to execute, newName has the file name
            UploadResponse response = new UploadResponse {
                Result        = $@"$YetaWF.confirm('{Utility.JserEncode(this.__ResStr("saveImageOK", "Image \"{0}\" successfully uploaded", namePlain))}');",
                FileName      = name,
                FileNamePlain = namePlain,
                RealFileName  = __filename.FileName,
                Attributes    = this.__ResStr("imgAttr", "{0} x {1} (w x h)", size.Width, size.Height),
                List          = hb.ToString(),
            };

            return(new YJsonResult {
                Data = response
            });
        }
コード例 #5
0
 public Task InitializeApplicationStartupAsync()
 {
     ImageSupport.AddHandler(ImageType, GetBytesAsync: RetrieveImageAsync);
     return(Task.CompletedTask);
 }
コード例 #6
0
        public override void Run()
        {
#if WINDOWS_UWP
            Image image = ImageSupport.GetImage(new Uri("ms-appx:///Assets/ColorFont.png"));
#else
            #region Serialized Image

            // The image below is serialized using the ImageSerializer.Serialize() method.
            // Please see the "SerializeImages" method in the RPi.SenseHat.Tools project.
            const string serializedImage =
                "AOICAAAJAAAAAAAA////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA" +
                "////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////" +
                "////////////AAAA////////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////" +
                "////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////////AAAA////////////////////////" +
                "////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA" +
                "////////////////////////////AAAA////////////////////////AAAA////////////////////////////AAAA////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////" +
                "////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////AAAA////////////////////AAAA////////////////////////////AAAA////////////////////AAAA////////////////////" +
                "////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////" +
                "////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////////AAAA////////////////////////////AAAA////////////////////////////" +
                "AAAA////////////////////////////AAAA////////////////////////AAAA////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////" +
                "////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////" +
                "////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////AAAA////////////////AAAA////////////////////////////AAAA////////////AAAA////////" +
                "////////////////////AAAA////////////////////////////////////AAAA////////////////////////////AAAA////////////////////////////AAAA////////////////////////////////AAAA////////////////////////////AAAA////" +
                "////////////////////////AAAA////////////////////////////////////AAAA////////////AAAA////////////////AAAA////////////////////////////////AAAA////////////////////////////////AAAA////////////////////////" +
                "////AAAA////////////////////////////AAAA////////////////////AAAA////////////////////AAAA////////////////////AAAA////////////////////AAAA/////////////////////////////wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "CgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCyCgCyCgCy/wD//wD/CgCyCgCyCgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCy" +
                "CgCy/wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD/CgCyCgCy/wD/" +
                "/wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCy" +
                "CgCyCgCyCgCyCgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy" +
                "CgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCy" +
                "CgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/CgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCy" +
                "/wD//wD//wD//wD/CgCy/wD//wD/CgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD/" +
                "/wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCyCgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCyCgCyCgCyCgCyCgCy/wD//wD//wD/" +
                "CgCyCgCyCgCyCgCy/wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD/CgCyCgCy/wD//wD/CgCy" +
                "CgCy/wD//wD//wD//wD//wD/CgCyCgCy/wD//wD//wD//wD/CgCyCgCy/wD//wD//wD/CgCy/wD//wD//wD/CgCyCgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/CgCyCgCyCgCy/wD//wD/CgCyCgCyCgCy/wD//wD//wD//wD//wD//wD//wD/" +
                "CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD/CgCyCgCy/wD//wD/CgCyCgCy/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGRwCGRwCG/wD//wD//wD/RwCGRwCGAAAAAAAARwCGRwCG" +
                "/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAARwCGRwCG/wD//wD//wD/RwCGRwCGAAAAAAAAAAAAAAAAAAAA/wD/RwCGRwCGAAAAAAAAAAAAAAAAAAAA/wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/" +
                "/wD/RwCGRwCGAAAAAAAA/wD//wD//wD//wD/RwCGRwCGAAAAAAAA/wD/RwCGRwCGAAAARwCGRwCGAAAAAAAA/wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD/RwCGRwCGRwCG/wD/RwCGRwCGRwCGAAAA/wD/RwCGRwCGRwCG/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA" +
                "AAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD//wD/AAAARwCGRwCGAAAAAAAAAAAA/wD/RwCGRwCGAAAA/wD/RwCG" +
                "RwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD//wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD//wD/AAAAAAAAAAAARwCGRwCGAAAA/wD//wD/RwCG/wD/AAAARwCG/wD/" +
                "/wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD/RwCG/wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD/RwCGRwCG/wD//wD/" +
                "/wD//wD//wD/RwCGRwCG/wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAA/wD//wD/AAAA/wD//wD//wD/" +
                "RwCG/wD//wD/RwCG/wD//wD//wD//wD//wD//wD/RwCG/wD/AAAAAAAA/wD/RwCGRwCG/wD//wD/RwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD//wD//wD/RwCGRwCGAAAA/wD//wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAA" +
                "AAAARwCGRwCG/wD//wD//wD//wD//wD/RwCGRwCGRwCGAAAA/wD/RwCGRwCGAAAAAAAAAAAAAAAAAAAA/wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCGRwCGAAAA/wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAAAAAARwCG" +
                "RwCG/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD//wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD//wD//wD/RwCGRwCGRwCGRwCGRwCG/wD//wD/" +
                "RwCGRwCGAAAA/wD/RwCGRwCGAAAA/wD/RwCGRwCGAAAAAAAARwCGRwCG/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCG/wD//wD//wD//wD//wD/RwCGRwCG/wD//wD/RwCGRwCG/wD//wD//wD/RwCGRwCG/wD//wD//wD/RwCGRwCG" +
                "/wD//wD//wD//wD//wD//wD//wD/RwCGRwCG/wD//wD/RwCGRwCG/wD//wD//wD//wD//wD//wD//wD//wD//wD/RwCGRwCGAAAAAAAAAAAA/wD//wD/AAAARwCGRwCG/wD//wD//wD//wD//wD/RwCGRwCGAAAAAAAA/wD//wD/RwCGRwCG/wD//wD//wD//wD/RwCG" +
                "RwCGAAAAAAAA/wD//wD/RwCGRwCG/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/ngBGngBGAAAAAAAAngBGngBG/wD//wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD//wD/AAAAAAAA/wD/ngBGngBG" +
                "AAAA/wD/ngBGngBG/wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGAAAA/wD//wD/AAAAAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGAAAA" +
                "/wD//wD/ngBGngBGngBGngBGAAAAAAAA/wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGngBGngBGngBGngBGngBGAAAA/wD/ngBGngBGngBGngBGngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA" +
                "/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD//wD/AAAAAAAA/wD//wD//wD/ngBGngBGAAAA/wD//wD//wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBG" +
                "ngBGAAAA/wD//wD/ngBGngBGAAAA/wD//wD/ngBGngBGngBGngBGAAAAAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD//wD//wD//wD/ngBGngBGAAAAAAAA/wD//wD//wD/ngBGngBG/wD/AAAA/wD//wD//wD//wD/ngBGngBG/wD//wD//wD//wD//wD/ngBG" +
                "ngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBGngBGngBG/wD//wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD//wD/ngBGngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBG" +
                "AAAA/wD//wD/ngBGngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD/ngBGngBGAAAA/wD//wD/" +
                "/wD//wD//wD//wD/ngBGngBGAAAA/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD//wD//wD/ngBGngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD/" +
                "ngBGngBGngBGngBGngBG/wD//wD//wD//wD/ngBGngBGngBGngBGngBG/wD//wD/ngBGngBGngBGngBGngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD//wD/ngBGngBG/wD//wD/ngBG" +
                "ngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBG/wD//wD/ngBGngBGngBGngBGngBGngBG/wD//wD/ngBGngBGngBGngBG/wD//wD//wD/ngBGngBGngBGngBG/wD//wD//wD//wD//wD/AAAA/wD//wD/AAAA/wD//wD//wD/ngBGngBGngBGngBG" +
                "/wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD/ngBGngBGAAAAngBGngBGngBGAAAA/wD//wD/ngBGngBGngBGAAAA/wD//wD//wD//wD/AAAAAAAA/wD/ngBGngBGAAAA/wD//wD/AAAAAAAA/wD/ngBGngBGAAAA/wD//wD//wD/ngBGngBGngBGngBGAAAA" +
                "/wD/ngBGngBGngBGngBGngBG/wD//wD//wD/ngBGngBGAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAAngBGngBGAAAAAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD/AAAAAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGAAAA/wD/ngBGngBGngBGngBGngBGngBGngBGngBG/wD//wD/ngBGngBGAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAAngBGngBGAAAAAAAA/wD//wD/ngBGngBGngBG" +
                "ngBGAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGngBGngBGAAAAAAAA/wD//wD/ngBGngBGAAAA/wD//wD/ngBGngBGAAAA/wD//wD//wD//wD//wD/ngBGngBGAAAAAAAA/wD//wD/" +
                "ngBGngBG/wD//wD//wD//wD//wD//wD//wD/ngBGngBGAAAAAAAA/wD//wD//wD//wD//wD//wD/ngBGngBG/wD//wD//wD/ngBGngBGAAAAAAAA/wD//wD//wD//wD/ngBGngBG/wD//wD/ngBGngBGAAAAAAAA/wD//wD//wD//wD/ngBGngBG/wD//wD/ngBGngBG" +
                "ngBGngBGngBGngBG/wD//wD//wD//wD//wD//wD//wD//wD/6wAP6wAP6wAP6wAP6wAP6wAPAAAA/wD/6wAP6wAP6wAP6wAP6wAPAAAAAAAA/wD/6wAP6wAPAAAA/wD//wD//wD//wD//wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAP6wAP6wAP/wD//wD/" +
                "/wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD//wD/6wAP6wAPAAAA6wAP6wAP6wAP/wD//wD/6wAP6wAP6wAP6wAP6wAP6wAPAAAA/wD//wD/6wAP6wAPAAAA/wD//wD//wD//wD//wD/6wAP6wAPAAAA/wD//wD/6wAP6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP" +
                "AAAA/wD//wD//wD//wD//wD/6wAP6wAPAAAA6wAPAAAA6wAP6wAPAAAA/wD/6wAP6wAP6wAP6wAP6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAP6wAP6wAP6wAPAAAAAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAP6wAP" +
                "6wAP6wAPAAAAAAAA/wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD//wD//wD/6wAP6wAPAAAA/wD//wD//wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA6wAP/wD/6wAP6wAPAAAA/wD//wD//wD/6wAP6wAP" +
                "AAAAAAAA/wD//wD//wD/6wAP6wAP6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAAAAAAAAAA" +
                "AAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD//wD/AAAAAAAA6wAP6wAP/wD//wD/6wAP6wAP6wAP6wAP6wAP/wD//wD//wD/6wAP6wAPAAAAAAAAAAAAAAAA/wD/6wAP6wAPAAAAAAAA6wAP6wAPAAAA/wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD//wD/6wAP" +
                "6wAPAAAAAAAAAAAA/wD/6wAP6wAPAAAAAAAA6wAP6wAPAAAA/wD/6wAP6wAP6wAP6wAP6wAP/wD//wD//wD/6wAP6wAP6wAP/wD//wD//wD//wD//wD/6wAP6wAP/wD//wD/6wAP6wAPAAAA6wAP6wAP/wD//wD//wD//wD/6wAP6wAPAAAA/wD//wD/6wAP6wAP6wAP" +
                "6wAP6wAP6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAA6wAP6wAPAAAA/wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAPAAAAAAAA" +
                "AAAAAAAAAAAA/wD//wD/AAAA6wAP6wAPAAAAAAAAAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA/wD/6wAP6wAPAAAA6wAP/wD/6wAP6wAPAAAA/wD//wD/6wAP6wAP6wAP6wAPAAAAAAAA/wD/6wAP6wAPAAAA/wD/6wAP" +
                "6wAPAAAA/wD//wD/AAAAAAAA6wAP6wAPAAAAAAAA/wD//wD/AAAAAAAA6wAP6wAP/wD//wD//wD/AAAAAAAA6wAP6wAP/wD//wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD/6wAP6wAPAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAP/wD//wD/6wAP6wAP/wD//wD/6wAP" +
                "6wAP6wAP/wD/6wAP6wAPAAAA/wD//wD//wD/6wAP6wAPAAAA/wD//wD//wD//wD//wD//wD/6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP6wAPAAAAAAAA/wD/6wAP6wAP/wD/AAAA6wAP6wAPAAAA/wD//wD/AAAAAAAAAAAA6wAP6wAP/wD//wD/6wAP6wAP6wAP" +
                "6wAP6wAP/wD//wD//wD//wD//wD/6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP6wAP6wAPAAAAAAAA/wD//wD/6wAP6wAP6wAP6wAP6wAPAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/6wAP6wAPAAAAAAAA/wD/6wAP6wAPAAAA/wD/" +
                "/wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/6wAP6wAPAAAAAAAA6wAP6wAPAAAAAAAA/wD//wD/6wAP6wAP6wAP6wAP/wD//wD//wD//wD//wD/6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP6wAPAAAAAAAA/wD//wD//wD/6wAP6wAP6wAP6wAP6wAP6wAP/wD/" +
                "/wD/6wAP6wAP6wAP6wAP6wAP6wAP/wD//wD/6wAP6wAP6wAP6wAP6wAP6wAP6wAP6wAP/wD//wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/6wAP6wAPAAAAAAAA/wD//wD//wD//wD/6wAP6wAP/wD//wD//wD//wD//wD/6wAP6wAPAAAAAAAA" +
                "/wD//wD//wD//wD//wD//wD//wD//wD/6wAP6wAP/wD//wD/6wAP6wAPAAAA/wD//wD//wD//wD//wD/6wAP6wAPAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD/" +
                "/xYA/xYAAAAAAAAA/xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAAAAAAAAAA/wD//wD//wD//xYA/xYAAAAAAAAAAAAA/wD//wD//wD//xYA/xYA" +
                "AAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYAAAAA/wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD//wD//xYA/xYA/xYA/xYA/wD//wD//wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD/AAAA/xYA" +
                "/xYAAAAA/wD//xYA/xYAAAAA/xYA/xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAAAAAAAAAAAAAA/wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYAAAAAAAAA/wD//wD//wD//wD/AAAAAAAA/xYA/xYA/wD/" +
                "/wD//wD//wD//xYA/xYAAAAA/wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYA/xYA/xYA/xYAAAAA/wD//wD//xYA/xYA/xYA/xYA/wD//wD//wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD/" +
                "/wD//xYA/xYAAAAAAAAA/wD//wD//wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYA/wD//wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA" +
                "/xYA/xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYA/xYA/xYAAAAA/wD//wD//xYA/xYAAAAA/wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA" +
                "/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYAAAAAAAAA/wD//wD//wD//xYA/xYAAAAA/wD//wD//xYA/xYA/xYA/xYA/xYA/xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA" +
                "AAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//wD/AAAAAAAA/wD//wD//xYA/xYA/xYA/xYA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD//wD//wD/" +
                "/xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYA/xYA/xYA/xYA/xYA/xYAAAAA/wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD//xYA" +
                "/xYA/xYA/xYA/xYAAAAA/wD//xYA/xYA/xYA/xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//xYA/xYA/xYA/xYA/xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYAAAAA/wD//wD//wD//xYA/xYAAAAA" +
                "/wD//wD//wD//wD//xYA/xYA/wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAA/xYA/xYA/wD//wD//xYA/xYA/xYA/xYA/xYA/xYA/xYA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//wD//wD//xYA/xYAAAAA/wD//wD/" +
                "/wD//xYA/xYAAAAAAAAA/xYA/xYA/wD//wD//wD//wD/AAAAAAAA/xYA/xYAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//xYA/xYA/xYA/xYA" +
                "/xYA/xYA/xYA/xYA/wD//wD//wD//wD/AAAAAAAA/xYA/xYA/wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD//wD//xYA/xYAAAAAAAAA/xYA/xYA/xYA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAA/xYA/xYAAAAAAAAAAAAA/wD//wD/AAAA/xYA" +
                "/xYA/xYA/xYAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//xYA/xYAAAAAAAAA/wD//wD//wD//wD//wD//wD//xYA/xYA/wD//wD//wD//wD//wD//xYA/xYA/wD//wD//wD//wD//wD//wD//wD//wD//xYA/xYAAAAAAAAA/wD/" +
                "/xYA/xYAAAAA/wD//wD//wD//wD//wD//xYA/xYAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//xYA/xYA/xYA/xYA/xYA/xYA/wD//wD//wD//wD//wD//wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD/" +
                "/04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04A/wD//wD//04A/04AAAAA/04A/04AAAAAAAAA/wD//04A/04AAAAA/wD//wD//wD//wD//wD//04A/04AAAAA/wD//wD//wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04A" +
                "AAAA/wD//wD//04A/04AAAAA/wD//wD//04A/04A/wD//04A/04AAAAA/wD//wD//04A/04AAAAA/04A/04A/wD//wD//wD//04A/04AAAAA/wD//wD//wD//wD//wD//04A/04AAAAA/wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A" +
                "/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//wD//wD//wD//wD//wD//04A/04A/04A/04AAAAAAAAA/wD//04A/04AAAAA/04A/04A/wD//wD//wD//04A/04A/wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA" +
                "/wD//04A/04AAAAA/wD//wD//04A/04A/04A/04AAAAAAAAA/wD//04A/04A/04AAAAA/04A/04A/04AAAAA/wD//04A/04AAAAAAAAA/04A/04A/wD//wD//wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAAAAAA/wD//wD//wD//wD//04A/04A/04A/04A" +
                "/04A/04AAAAA/wD//04A/04A/04A/04A/04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAAAAAAAAAA/wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/04A/04AAAAAAAAA/04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA" +
                "/wD//04A/04AAAAA/wD//wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAAAAAAAAAAAAAAAAAA/wD//wD//04A/04AAAAA/wD//wD//wD//wD//04A/04A/04A/04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//wD//04A/04A" +
                "AAAA/wD//wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/04A/04A/wD//wD//wD//wD//04A/04AAAAA/wD//wD//04A/04AAAAA/04AAAAA/04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04A" +
                "/04A/04A/04AAAAAAAAA/wD//wD//04A/04A/04A/04A/04AAAAA/wD//04A/04AAAAA/wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/04A/04A/wD//wD//wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//wD//04A/04A/04A" +
                "/04AAAAAAAAA/wD//wD//04A/04A/04A/04A/04AAAAAAAAA/wD//wD//04A/04A/04A/04A/wD//wD//wD//wD//04A/04A/04A/04A/04AAAAA/wD//wD//04A/04AAAAAAAAA/wD//wD//04A/04AAAAAAAAA/04A/04AAAAA/04A/04AAAAAAAAA/04A/04AAAAA" +
                "/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAAAAAAAAAAAAAAAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAAAAAA/wD//wD//wD//wD//04A" +
                "/04A/wD//wD//04A/04AAAAA/wD//wD/AAAAAAAAAAAA/04A/04AAAAAAAAA/04A/04A/wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA/wD//wD//wD//04A/04AAAAA/wD//04A/04AAAAA/wD//04A/04A/wD/" +
                "/wD//04A/04AAAAA/wD//04A/04A/wD//wD//wD//04A/04A/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//04A/04AAAAAAAAA/04A/04AAAAAAAAA/wD//04A/04A/04A/04A/04AAAAA" +
                "AAAA/wD//04A/04AAAAAAAAA/04A/04A/wD//wD//04A/04AAAAA/wD//04A/04AAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//04A/04AAAAA/wD//wD//wD//wD//04A/04AAAAAAAAA/04A/04A/wD//wD//wD//04A/04A/wD//wD//wD/" +
                "/04A/04A/wD//wD//wD//04A/04AAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//04A/04A/wD//wD//wD//wD//wD//04A/04A/wD//wD//wD//wD//wD//wD//04A/04AAAAAAAAA/wD//wD//wD//04A/04A/wD//wD//wD//wD//04A/04AAAAAAAAA/wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD/" +
                "/5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//5IA/5IAAAAA/wD//wD//wD//wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IA/5IA/5IA/wD//wD//wD//5IA/5IA/5IA" +
                "AAAAAAAA/wD//wD//5IA/5IAAAAA/wD//5IA/5IA/wD//wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//5IA/5IAAAAA/wD//wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IAAAAA/wD//wD/" +
                "/wD//wD//wD//wD//wD/AAAA/5IA/5IA/5IA/wD//wD//5IA/5IAAAAA/wD//5IA/5IA/wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//wD//5IA/5IAAAAA/wD//wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//wD//5IA/5IAAAAAAAAA/wD/" +
                "/wD//5IA/5IAAAAAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//wD//wD//5IA/5IAAAAA/wD//wD//wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//5IA/5IAAAAAAAAA/5IA/5IAAAAA/wD//5IA/5IAAAAAAAAA/5IA/5IAAAAA/wD/" +
                "/wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IA/5IA/5IA/5IAAAAA/wD//5IA/5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA/5IA/5IA/wD//wD//wD//5IA/5IA/5IA" +
                "/5IA/5IAAAAA/wD//wD//5IA/5IA/5IA/5IA/wD//wD//wD//wD//5IA/5IAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IA/5IA/5IA/wD//wD//wD//wD//5IA/5IAAAAA/wD//5IA/5IAAAAA" +
                "/wD//5IA/5IA/wD//wD//5IA/5IA/5IA/5IA/wD//wD//5IA/5IAAAAA/wD/AAAA/5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IAAAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAA/5IA/5IA" +
                "AAAA/wD//5IA/5IAAAAA/wD//wD//wD//wD//wD//5IA/5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//wD//wD//5IA/5IA/5IA/wD//wD//wD//5IA/5IA/5IA/5IA/5IAAAAA/wD//wD//wD//5IA/5IAAAAAAAAA/wD//wD//wD//5IA/5IAAAAA/5IA/5IAAAAA/wD/" +
                "/wD//5IA/5IAAAAAAAAA/5IA/5IA/wD//wD//wD//wD/AAAA/5IA/5IAAAAAAAAA/wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//5IA/5IA/5IA/5IA/5IAAAAA/wD//5IA/5IA/5IA/5IA/5IAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA" +
                "/5IA/5IA/wD//wD//wD//wD//5IA/5IA/5IA/5IA/5IAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//5IA/5IA/5IA/5IA/5IA/5IA/wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//wD//wD//wD//5IA" +
                "/5IAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//wD//5IA/5IAAAAA/wD//wD//wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//wD//5IA/5IA/5IA/5IAAAAAAAAA/wD//5IA/5IAAAAA/wD//wD//5IA/5IA" +
                "AAAA/wD//wD//wD//5IA/5IA/wD//wD//wD//wD//5IA/5IA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//5IA/5IAAAAA/wD//5IA/5IAAAAA/wD//wD//wD/AAAA/5IA/5IAAAAAAAAA/wD//wD//5IAAAAAAAAA/wD//5IA/5IAAAAA/wD//wD//5IA" +
                "/5IA/5IA/5IA/5IA/5IA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//5IA/5IAAAAA/wD//wD//5IA/5IAAAAA/wD//5IA/5IAAAAAAAAA/wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//5IA/5IA/wD//wD//wD//wD//wD//5IA/5IA/5IA/wD//wD//5IA/5IA/5IAAAAAAAAA/wD//wD//wD//wD//wD//5IA/5IA/wD//wD//5IA/5IAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAA" +
                "AAAAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD/" +
                "/wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAAAAAA/wD//wD/" +
                "AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD/AAAA" +
                "AAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAA" +
                "AAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD/" +
                "/wD//wD/AAAAAAAA/wD//wD//wD//9EA/9EA/9EA/9EA/9EAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAAAAAAAAAA/9EA/9EA/9EA/9EAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAAAAAAAAAA/wD//wD/" +
                "AAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//9EA/9EAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//9EA/9EAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD/AAAA" +
                "AAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD/AAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD/AAAAAAAA/wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//9EA/9EA/9EA" +
                "/9EAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAAAAAA" +
                "/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/" +
                "/wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD//wD/AAAAAAAAAAAAAAAA/wD//wD//wD/AAAAAAAA/wD//9EA/9EAAAAAAAAA/wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAA" +
                "AAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD//wD/AAAA/wD//wD//wD/AAAAAAAA/wD//wD//wD/AAAAAAAAAAAAAAAAAAAAAAAA/wD//wD//wD//wD//wD//wD/" +
                "/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//9EA/9EAAAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD//wD/" +
                "/wD//wD/AAAAAAAAAAAA/wD//wD/AAAAAAAAAAAA/wD//wD//wD//wD//wD//wD//wD/AAAAAAAA/wD//wD/AAAAAAAA/wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD//wD/";

            #endregion Serialized Image

            Image image = ImageSerializer.Deserialize(serializedImage);
#endif
            // Create the font from the image.
            MultiColorFont font = MultiColorFont.LoadFromImage(
                image,
                " ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖÉÜabcdefghijklmnopqrstuvwxyzåäöéü0123456789.,?!\"#$%&-+*:;/\\<>()'`=",
                Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF));

            // Get the characters to scroll.
            IEnumerable <MultiColorCharacter> characters = font.GetChars(_scrollText);

            // Choose a background color (or draw your own more complex background!)
            Color backgroundColor = Color.FromArgb(0xFF, 0x00, 0x20, 0x00);

            // Create the character renderer.
            var characterRenderer = new MultiColorCharacterRenderer();

            // Create the text scroller.
            var textScroller = new TextScroller <MultiColorCharacter>(
                SenseHat.Display,
                characterRenderer,
                characters);

            while (true)
            {
                // Step the scroller.
                if (!textScroller.Step())
                {
                    // Reset the scroller when reaching the end.
                    textScroller.Reset();
                }

                // Clear the display.
                SenseHat.Display.Fill(backgroundColor);

                // Draw the scroll text.
                textScroller.Render();

                // Update the physical display.
                SenseHat.Display.Update();

                // Pause for a short while.
                Sleep(TimeSpan.FromMilliseconds(50));
            }
        }
コード例 #7
0
 public override Task ModuleSavingAsync()
 {
     System.Drawing.Size size = ImageSupport.GetImageSize(AdImage_Data);
     LargeSize = size.Height;
     return(Task.CompletedTask);
 }
コード例 #8
0
        public override void Run()
        {
            // A big thanks to Johan Vinet, pixel artist and animator, for the Mario animation! :-)
            // http://johanvinet.tumblr.com/
            // Twitter handle: @johanvinet

            // Get the pixels of the animation frames.
#if WINDOWS_UWP
            Image image = ImageSupport.GetImage(new Uri("ms-appx:///Assets/MiniMario.png"));
#else
            #region Serialized Image

            // The image below is serialized using the ImageSerializer.Serialize() method.
            // Please see the "SerializeImages" method in the RPi.SenseHat.Tools project.
            const string serializedImage =
                "ATAAAAAIAAAAAP///wD///8A//////8ATf//AE3//wBN///x6AD///8A////AP///wD//////wBN//8ATf//8ej//wBNAP///wD/" +
                "//8A////AP//////AE3//wBN///x6P//AE0A////AP///wD///8A//////8ATf//AE3//wBN///x6AD///8A////AP///wD/////" +
                "/wBN//8ATf//AE3//wBNAP///wD///8A////AP//////AE3//wBN//8ATf//AE0A////AP///wD///8A//////8ATf//AE3//wBN" +
                "//8ATf//AE0A////AP///wD//////wBN//8ATf//AE3//wBN//8ATQD///8A////AP//////AE3//wBN//8ATf//AE3//wBNAP//" +
                "/wD///8A//////8ATf//AE3//wBN//8ATf//AE0A////AP///wD//////wBN//8ATf//AE3//wBN//8ATQD///8A////AP//////" +
                "AE3//wBN//8ATf//AE3//wBNAP///wD/////q1I2///Mqv+rUjb/AAAA///MqgD///8A////AP//////zKr/q1I2/wAAAP//zKoA" +
                "////AP///wD///8A///////Mqv+rUjb/AAAA///MqgD///8A////AP///wD/////q1I2///Mqv+rUjb/AAAA///MqgD///8A////" +
                "AP////+rUjb/q1I2///Mqv+rUjb/AAAAAP///wD///8A/////6tSNv+rUjb//8yq/6tSNv8AAAAA////AP///wD/////q1I2///M" +
                "qv//zKr/q1I2/6tSNv//zKoA////AP//////zKr//8yq/6tSNv+rUjb//8yq/6tSNgD///8A///////Mqv//zKr/q1I2/6tSNv//" +
                "zKr/q1I2AP///wD/////q1I2///Mqv//zKr/q1I2/6tSNv//zKoA////AP////+rUjb/q1I2///Mqv//zKr/q1I2/6tSNgD///8A" +
                "/////6tSNv+rUjb//8yq///Mqv+rUjb/q1I2AP///wD///8A/////6tSNv//zKr//8yq///MqgD///8A////AP///wD//////8yq" +
                "///Mqv//zKr//8yqAP///wD//////wBN//8ATf//zKr//8yq///Mqv//zKoA////AP///wD///8A/////6tSNv//zKr//8yq///M" +
                "qgD///8A////AP///wD/////q1I2/6tSNv//zKr//8yqAP///wD///8A////AP////+rUjb/q1I2///Mqv//zKoA////AP///wD/" +
                "/////wBN//8ATf///yf/Ka3//x0rUwD///8A//////8ATf//AE3///8n/ymt//8prf///6MAAP//////8egA//////8ATf///yf/" +
                "Ka3//ymt////owD///HoAP///wD//////wBN//8ATf///yf/Ka3//x0rUwD///8A////AP////8prf///wBN//8ATf///yf/HStT" +
                "AP///wD///8A/////ymt////AE3//wBN////J/8dK1P///HoAP///wD//////wBN///x6P8prf//Ka3//x0rUwD///////HoAP//" +
                "//8prf//Ka3//ymt//8prf//HStT/4N2nAD/////fiVT/ymt//8prf//Ka3//ymt//8dK1MA////AP///wD//////wBN///x6P8p" +
                "rf//Ka3//x0rUwD///8A////AP////8prf//Ka3///8ATf//AE3///HoAP///wD/////q1I2/ymt//8prf//Ka3///8ATf//AE0A" +
                "////AP///wD///8A/////6tSNv+rUjb/fiVTAP///wD///8A////AP////9+JVMA////AP////+rUjYA////AP///wD///8A////" +
                "AP///wD///8A////AP////+rUjYA////AP///wD///8A/////6tSNv+rUjb/fiVTAP///wD///8A////AP////+rUjYA////AP//" +
                "//9+JVMA////AP///wD///8A////AP///wD///8A////AP////9+JVMA////";

            #endregion Serialized Image

            Image image = ImageSerializer.Deserialize(serializedImage);
#endif

            // Create a sprite map from the pixels.
            var spriteMap = new SpriteMap(image);

            // Keep track of the animation frame...
            int    animationIndex = 0;
            Sprite sprite         = spriteMap.GetSprite(animationIndex);

            // ...and when it's time to update it.
            TimeSpan frameDuration           = TimeSpan.FromMilliseconds(70);
            DateTime nextAnimationUpdateTime = DateTime.Now.Add(frameDuration);

            // Keep track of the location and orientation of the sprite.
            int spriteX = 0;
            int spriteY = 0;
            DisplayDirection direction      = DisplayDirection.Deg0;
            bool             flipHorizontal = false;
            bool             flipVertical   = false;

            while (true)
            {
                bool redrawSprite = false;

                //Is it time to update the animation ?
                if (DateTime.Now >= nextAnimationUpdateTime)
                {
                    // Yes. The next time to update is:
                    nextAnimationUpdateTime = DateTime.Now.Add(frameDuration);

                    // Needs to redraw the sprite.
                    redrawSprite = true;

                    // Select the next sprite index.
                    animationIndex++;
                    if (animationIndex >= 6)
                    {
                        animationIndex = 0;
                    }

                    // Pick out the sprite.
                    sprite = spriteMap.GetSprite(animationIndex);
                }

                if (SenseHat.Joystick.Update())                                                  // Has any of the buttons on the joystick changed?
                {
                    UpdatePosition(ref spriteX, ref spriteY);                                    // Move the sprite.

                    UpdateDrawingDirection(ref direction, ref flipHorizontal, ref flipVertical); // Re-orientate the sprite.

                    // Needs to redraw the sprite.
                    redrawSprite = true;
                }

                if (redrawSprite)
                {
                    SenseHat.Display.Clear(); // Clear the screen.

                    // Draw the sprite.
                    sprite.Draw(SenseHat.Display, spriteX, spriteY, true, direction, flipHorizontal, flipVertical);

                    SenseHat.Display.Update(); // Update the physical display.
                }

                // Take a short nap.
                Sleep(TimeSpan.FromMilliseconds(2));
            }
        }