private static PictureBoxInfo parseRawPictureBoxInfo(RawControlInfo rawInfo) { PictureBoxInfo pictureBoxInfo = new PictureBoxInfo(); pictureBoxInfo.groupNum = Parser.parseGroupNum(rawInfo.infoStr); pictureBoxInfo.groupName = Parser.parseGroupName(rawInfo.infoStr); pictureBoxInfo.zindex = Parser.parseZIndex(rawInfo.imageTag); pictureBoxInfo.fadeIn = Parser.parseFadeIn(rawInfo.infoStr); pictureBoxInfo.fadeOut = Parser.parseFadeOut(rawInfo.infoStr); pictureBoxInfo.location = Parser.parseLocation(rawInfo.imageTag); string path = Parser.parsePath(rawInfo.imageTag); pictureBoxInfo.path = String.Format("{0}/orig/{1}",Path.GetDirectoryName(path),Path.GetFileName(path)); pictureBoxInfo.size = Image.FromFile(String.Format("{0}/images/{1}",projectPath,Path.GetFileName(path))).Size; return pictureBoxInfo; }
private static ResizablePictureBox createResizablePictureBox(PictureBoxInfo pictureBoxInfo) { ResizablePictureBox resizablePictureBox = editor.CreateResizablePictureBox(String.Format("{0}\\{1}",projectPath,pictureBoxInfo.path)); resizablePictureBox.Location = pictureBoxInfo.location; resizablePictureBox.Size = pictureBoxInfo.size; return resizablePictureBox; }