예제 #1
0
        private void AddCheckMark(AnnAutomationManager _annAutomation)
        {

            AnnAutomationObject annObject = new AnnAutomationObject();

            annObject.Id = AnnAutomationManager.UserObjectId;

            annObject.Name = _CHECK_MARK_NAME;

            PictureObject annStamp = new PictureObject();
            
            annStamp.Pen = new AnnPen(Color.Beige, new AnnLength(2, AnnUnit.Pixel));
            annStamp.Brush = new AnnSolidBrush(Color.Yellow);
            annStamp.Name = _CHECK_MARK_NAME;
            annStamp.NameVisible = false;
            
            annObject.DrawDesignerType = typeof(AnnRectangleDrawDesigner);
            annObject.EditDesignerType = typeof(AnnRectangleEditDesigner);
            annObject.RunDesignerType = typeof(AnnRunDesigner);


            annObject.Object = annStamp;
            
            Image image = Image.FromHbitmap(ImageEdit.check.GetHbitmap());
                
            Bitmap btmp = new Bitmap(image);
            using (Graphics g = Graphics.FromImage(btmp))
            {
                g.FillRectangle(Brushes.Magenta,0,0,16,16);
               // g.DrawImage(image,0,0,16,16);
            }
            
            annObject.ToolBarImage = image;
            annObject.ToolBarToolTipText = "Check Mark";
            _annAutomation.Objects.Add(annObject);
        }
예제 #2
0
 void MarkObjects(Color[,] image)
 {
     Color[,] newImage = new Color[InputImage.Size.Width, InputImage.Size.Height];
     for (int x = 1; x < InputImage.Size.Width - 1; x++)
     {
         for (int y = 1; y < InputImage.Size.Height - 1; y++)
         {
             if(image[x,y].R > 0 && objectMap[x,y].R == 0){
                 objectCount++;
                 PictureObject p = new PictureObject(objectCount);
                 Objects.Add(p);
                 CheckNeighbouringPixels(image, x,y);
             }
         }
     }
 }
예제 #3
0
파일: Form1.cs 프로젝트: latys/zhuotie
        private void reportShow()
        {
            this.Invoke(new setStatusDelegate1(setStatus));
            int i = 0, j = 0;
            dbHepler db = new dbHepler();

            string sql = this.Invoke(new getsql(generatesql)) as string;
            MessageBox.Show(sql);
            // string sql = "select * from [20028] where XH='128590'";
            DataSet Student = db.LoadData(sql);
            report.Pages.Clear();
            //report.Load("Untitled.frx");
            ;

            //DataBand data = (DataBand)report.FindObject("data1");

            for (i = 0; i < Student.Tables[0].Rows.Count / 10; i++)
            {
                ReportPage page1 = new ReportPage();

                report.Pages.Add(page1);

                DataBand data = new DataBand();
                page1.Bands.Add(data);
                for (j = 0; j < 10; j++)
                {

                    TextObject text1 = new TextObject();
                    if (j % 2 == 0)
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 4, Units.Centimeters * 3 * j, Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }
                    else
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 4, Units.Centimeters * 3 * (j - 1), Units.Centimeters * 5, Units.Centimeters * 0.6f);

                    }

                    text1.Text = Student.Tables[0].Rows[10 * i + j]["name"].ToString();
                    data.Objects.Add(text1);

                    PictureObject pic = new PictureObject();
                    if (j % 2 == 0)
                    {
                        pic.Bounds = new RectangleF(0, Units.Centimeters * 3 * j, Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    else
                    {
                        pic.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (j - 1), Units.Centimeters * 2, Units.Centimeters * 2);

                    }
                    if (File.Exists("./" + "20"+Student.Tables[0].Rows[10 * i + j]["XH"].ToString().Substring(0,2) + "/" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString()+ ".jpg"))
                        pic.Image = Image.FromFile("./" +"20"+ Student.Tables[0].Rows[10 * i + j]["XH"].ToString().Substring(0,2) + "/" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString() + ".jpg");
                    data.Objects.Add(pic);

                    BarcodeObject bar = new BarcodeObject();
                    if (j % 2 == 0)
                    {
                        bar.Bounds = new RectangleF(0, Units.Centimeters * 3 * j + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    else
                    {
                        bar.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (j - 1) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);

                    }
                    //pic.Image = Image.FromFile("100001.jpg");
                    bar.Text = Student.Tables[0].Rows[10 * i + j]["ZKZH"].ToString();
                    data.Objects.Add(bar);

                }

            }

            if (Student.Tables[0].Rows.Count % 10 != 0)
            {
                Console.WriteLine((10 * i + j).ToString());
                ReportPage page2 = new ReportPage();

                report.Pages.Add(page2);

                DataBand data2 = new DataBand();
                page2.Bands.Add(data2);

                for (int k = 10 * (i - 1) + j; k < Student.Tables[0].Rows.Count; k++)
                {

                    TextObject text1 = new TextObject();
                    if (k % 2 == 0)
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 4, Units.Centimeters * 3 * (k % 10), Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }
                    else
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 4, Units.Centimeters * 3 * (k % 10 - 1), Units.Centimeters * 5, Units.Centimeters * 0.6f);

                    }

                    text1.Text = Student.Tables[0].Rows[k]["name"].ToString();
                    data2.Objects.Add(text1);

                    PictureObject pic = new PictureObject();
                    if (k % 2 == 0)
                    {
                        pic.Bounds = new RectangleF(0, Units.Centimeters * 3 * k % 10, Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    else
                    {
                        pic.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (k % 10 - 1), Units.Centimeters * 2, Units.Centimeters * 2);

                    }
                    if (File.Exists("./" + "20" + Student.Tables[0].Rows[k]["XH"].ToString().Substring(0,2) + "/" + Student.Tables[0].Rows[k]["XH"].ToString() + ".jpg"))
                        pic.Image = Image.FromFile("./" + "20"+Student.Tables[0].Rows[k]["XH"].ToString().Substring(0,2) + "/" + Student.Tables[0].Rows[k]["XH"].ToString()+ ".jpg");
                    data2.Objects.Add(pic);

                    BarcodeObject bar = new BarcodeObject();
                    if (k % 2 == 0)
                    {
                        bar.Bounds = new RectangleF(0, Units.Centimeters * 3 * (k % 10) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    else
                    {
                        bar.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (k % 10 - 1) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);

                    }
                    //pic.Image = Image.FromFile("100001.jpg");
                    bar.Text = Student.Tables[0].Rows[k]["ZKZH"].ToString();
                    data2.Objects.Add(bar);

                }
            }
            this.Invoke(new setStatusDelegate1(setStatus2));
            this.Invoke(new setStatusDelegate1(reportShow1));
        }
예제 #4
0
파일: ModPanel.cs 프로젝트: KHCmaster/PPD
        public ModPanel(PPDDevice device, IGameHost gameHost, PPDFramework.Resource.ResourceManager resourceManager, ISound sound) : base(device)
        {
            this.gameHost        = gameHost;
            this.sound           = sound;
            this.resourceManager = resourceManager;

            waitSprite = new SpriteObject(device);
            this.AddChild(waitSprite);
            waitSprite.AddChild(new TextureString(device, Utility.Language["InitializingMod"], 20, true, PPDColors.White)
            {
                Position = new Vector2(400, 220)
            });
            waitSprite.AddChild(new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            });

            updateSprite = new SpriteObject(device)
            {
                Hidden = true
            };
            this.AddChild(updateSprite);
            updateSprite.AddChild(new TextureString(device, Utility.Language["UpdatingMod"], 20, true, PPDColors.White)
            {
                Position = new Vector2(400, 220)
            });
            updateSprite.AddChild(new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            });

            back  = new PictureObject(device, resourceManager, Utility.Path.Combine("dialog_back.png"));
            black = new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            };
            back.AddChild(new TextureString(device, Utility.Language["Mod"], 30, PPDColors.White)
            {
                Position = new Vector2(35, 30)
            });
            var stackObject = new StackObject(device,
                                              updateMenu = new StackObject(device,
                                                                           new StackObject(device,
                                                                                           new SpaceObject(device, 0, 2),
                                                                                           new PictureObject(device, resourceManager, Utility.Path.Combine("square.png")))
            {
                IsHorizontal = false
            },
                                                                           new TextureString(device, String.Format(":{0}", Utility.Language["Update"]), 18, PPDColors.White))
            {
                IsHorizontal = true
            },
                                              new SpaceObject(device, 20, 0),
                                              settingMenu = new StackObject(device,
                                                                            new StackObject(device,
                                                                                            new SpaceObject(device, 0, 2),
                                                                                            new PictureObject(device, resourceManager, Utility.Path.Combine("delta.png")))
            {
                IsHorizontal = false
            },
                                                                            new TextureString(device, String.Format(":{0}", Utility.Language["Setting"]), 18, PPDColors.White))
            {
                IsHorizontal = true
            },
                                              new SpaceObject(device, 20, 0),
                                              new StackObject(device,
                                                              new SpaceObject(device, 0, 2),
                                                              new PictureObject(device, resourceManager, Utility.Path.Combine("checkgreen.png")))
            {
                Position     = new Vector2(0, 50),
                IsHorizontal = false
            },
                                              new TextureString(device, String.Format(":{0}", Utility.Language["ServerRankingSupport"]), 18, PPDColors.White)
            {
                Position = new Vector2(35, 50)
            })
            {
                IsHorizontal = true
            };

            back.AddChild(stackObject);
            stackObject.Update();
            stackObject.Position = new Vector2(760 - stackObject.Width, 50);

            var sprite = new SpriteObject(device)
            {
                Position = new Vector2(50, 80)
            };

            modListSprite = new SpriteObject(device);
            sprite.AddChild(modListSprite);
            sprite.AddChild(new TextureString(device, String.Format("{0}:", Utility.Language["Author"]), 20, PPDColors.White)
            {
                Position = new Vector2(425, 0)
            });
            sprite.AddChild(author = new TextureString(device, "", 20, PPDColors.White)
            {
                Position = new Vector2(450, 30)
            });
            sprite.AddChild(new TextureString(device, String.Format("{0}:", Utility.Language["Version"]), 20, PPDColors.White)
            {
                Position = new Vector2(425, 60)
            });
            sprite.AddChild(version = new TextureString(device, "", 20, PPDColors.White)
            {
                Position = new Vector2(450, 90)
            });
            sprite.AddChild(new TextureString(device, String.Format("{0}:", Utility.Language["Filename"]), 20, PPDColors.White)
            {
                Position = new Vector2(425, 120)
            });
            sprite.AddChild(filename = new TextureString(device, "", 20, 240, PPDColors.White)
            {
                Position = new Vector2(450, 150)
            });
            sprite.AddChild(notAvailable = new TextureString(device, Utility.Language["ModWarning"], 20, 280, 280, true, PPDColors.Red)
            {
                Position = new Vector2(425, 180),
                Hidden   = true
            });

            this.AddChild(scrollBar = new RectangleComponent(device, resourceManager, PPDColors.White)
            {
                Position        = new Vector2(456, 80),
                RectangleHeight = 330,
                RectangleWidth  = 5
            });
            this.AddChild(new RectangleComponent(device, resourceManager, PPDColors.White)
            {
                Position        = new Vector2(465, 80),
                RectangleHeight = 330,
                RectangleWidth  = 1
            });
            this.AddChild(sprite);
            this.AddChild(back);
            this.AddChild(black);

            Inputed    += ModPanel_Inputed;
            GotFocused += ModPanel_GotFocused;
        }
예제 #5
0
        public Report Create_maquette_fasrreport(int nid)
        {
            Maquette m = new Maquette();

            m = m.Select_maquette_id(nid, connection_string);
            Format f = new Format();

            f = f.Select_format_id(m.id_fk_format, connection_string);
            Add_report_page(f.Width, f.Height);
            report.Pages.Add(page[0]);

            page[0].ReportTitle      = new ReportTitleBand();
            page[0].ReportTitle.Name = "lkjhljkhlhnljkn";
            // set its height to 1.5cm
            page[0].ReportTitle.Height = Units.Millimeters * f.Height;
            PictureObject picture = new PictureObject();
            //picture.ForceLoadImage("C://Users//Svetlana//Desktop//1.jpg");

            float w = Convert.ToSingle(Math.Round(f.Width * 3.8));
            float h = Convert.ToSingle(Math.Round(f.Height * 3.8));

            picture.Bounds = new RectangleF(0, 0, w, h); //Set object bounds
            String s = Environment.CurrentDirectory + "\\Maquette\\" + m.Background_image;

            // Bitmap b1 = new Bitmap(s);
            // Bitmap b2 = new Bitmap(b1, new Size(f.Width*4, f.Height*4));


            // picture.Image = b2; //Set picture

            picture.Image = new Bitmap(s); //Set picture
            page[0].ReportTitle.Objects.Add(picture);


            Text_blocks        t  = new Text_blocks();
            List <Text_blocks> tb = t.Select_text_blocks(connection_string, nid);

            for (int i = 0; i < tb.Count; i++)
            {
                TextObject txt = new TextObject();
                float      wt  = Convert.ToSingle(Math.Round(tb[i].Width * 3.8));
                float      ht  = Convert.ToSingle(Math.Round(tb[i].Height * 3.8));
                txt.Bounds = new RectangleF(tb[i].X, tb[i].Y, wt, ht);
                txt.Text   = tb[i].Content;
                if (tb[i].Alignment_text.Trim() == "По левому краю")
                {
                    txt.HorzAlign = HorzAlign.Left;

                    /*По левому краю*/
                }
                else if (tb[i].Alignment_text.Trim() == "По центру")
                {
                    txt.HorzAlign = HorzAlign.Center; //По центру
                }

                else if (tb[i].Alignment_text.Trim() == "По правому краю")
                {
                    txt.HorzAlign = HorzAlign.Right; //По правому краю
                }

                else if (tb[i].Alignment_text.Trim() == "По ширине")
                {
                    txt.HorzAlign = HorzAlign.Justify; //По ширине
                }


                FontStyle styl = FontStyle.Regular;
                if (tb[i].Mark_text.Trim() == "Bold")
                {
                    styl = FontStyle.Bold;
                }

                else if (tb[i].Mark_text.Trim() == "Italic")
                {
                    styl = FontStyle.Italic;
                }

                else if (tb[i].Mark_text.Trim() == "Underline")
                {
                    styl = FontStyle.Underline;
                }

                else if (tb[i].Mark_text.Trim() == "Regular")
                {
                    styl = FontStyle.Regular;
                }

                else if (tb[i].Mark_text.Trim() == "Strikeout")
                {
                    styl = FontStyle.Strikeout;
                }
                FontFamily fam = new FontFamily(tb[i].Font_type);

                txt.Font = new Font(fam, tb[i].Font_size, styl);
                page[0].ReportTitle.Objects.Add(txt);
            }


            Image_blocks        im = new Image_blocks();
            List <Image_blocks> bl = im.Select_image_blocks(connection_string, nid);

            for (int i = 0; i < bl.Count; i++)
            {
                PictureObject pict = new PictureObject();
                //picture.ForceLoadImage("C://Users//Svetlana//Desktop//1.jpg");

                float wp = Convert.ToSingle(Math.Round(bl[i].Width * 3.8));
                float hp = Convert.ToSingle(Math.Round(bl[i].Height * 3.8));
                pict.Bounds = new RectangleF(0, 0, wp, hp); //Set object bounds
                String sp = Environment.CurrentDirectory + "\\Image_blocks\\" + bl[i].Image_content;
                // Bitmap b1 = new Bitmap(s);
                // Bitmap b2 = new Bitmap(b1, new Size(f.Width*4, f.Height*4));


                // picture.Image = b2; //Set picture

                pict.Image = new Bitmap(sp); //Set picture
                page[0].ReportTitle.Objects.Add(pict);
            }


            return(report);
        }
예제 #6
0
파일: HomeScene.cs 프로젝트: KHCmaster/PPD
        public override bool Load()
        {
            base.Load();
            OnLoadProgressed(0);
            back = new PictureObject(device, ResourceManager, Utility.Path.Combine("background.png"));
            OnLoadProgressed(1);
            hbm = new HomeBottomMenu(device, ResourceManager, Sound);
            OnLoadProgressed(10);
            header = new HomeTopHeader(device, ResourceManager, hbm);
            OnLoadProgressed(20);
            focusManager        = new FocusManager(this);
            sp                  = new SettingPanel(device, ResourceManager, GameHost as MyGame, Sound);
            mp                  = new MoviePanel(device, GameHost as MyGame, ResourceManager, Sound);
            glp                 = new GameListPanel(device, ResourceManager, Sound);
            fp                  = new FeedPanel(device, GameHost, ResourceManager, Sound);
            sp.LoadProgressed  += panel_LoadProgressed;
            mp.LoadProgressed  += panel_LoadProgressed;
            glp.LoadProgressed += panel_LoadProgressed;
            fp.LoadProgressed  += panel_LoadProgressed;

            glp.GameStarted += glp_GameStarted;
            hbm.ModeChanged += hbm_ModeChanged;

            panelList = new SortedList <HomeBottomMenu.Mode, HomePanelBase>
            {
                { HomeBottomMenu.Mode.Feed, fp }, { HomeBottomMenu.Mode.Game, glp }, { HomeBottomMenu.Mode.Movie, mp }, { HomeBottomMenu.Mode.Setting, sp }
            };

            sp.Load();
            mp.Load();
            glp.Load();
            fp.Load();

            foreach (HomePanelBase panel in panelList.Values)
            {
                if (panel != currentPanel)
                {
                    panel.Alpha = 0;
                }
            }
            if (!PPDGeneralSetting.Setting.IsFirstExecution)
            {
                focusManager.Focus(hbm);
                focusManager.Focus(fp);
                currentPanel = fp;
                this.AddChild(hbm);
                this.AddChild(header);
                this.AddChild(sp);
                this.AddChild(mp);
                this.AddChild(glp);
                this.AddChild(fp);
            }
            else
            {
                startPanel = new StartPanel(device, GameHost as MyGame, ResourceManager);
                startPanel.SettingFinished += startPanel_SettingFinished;
                this.AddChild(startPanel);
            }
            this.AddChild(back);

            ChangeControllerConfig();
            OnLoadProgressed(100);

            return(true);
        }
예제 #7
0
        private string GetLayerPicture(ReportComponentBase obj, out float Width, out float Height)
        {
            string result = String.Empty;

            Width  = 0;
            Height = 0;

            if (obj != null)
            {
                if (pictures)
                {
                    MemoryStream PictureStream = new MemoryStream();
                    System.Drawing.Imaging.ImageFormat FPictureFormat = System.Drawing.Imaging.ImageFormat.Bmp;
                    if (imageFormat == ImageFormat.Png)
                    {
                        FPictureFormat = System.Drawing.Imaging.ImageFormat.Png;
                    }
                    else if (imageFormat == ImageFormat.Jpeg)
                    {
                        FPictureFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
                    }
                    else if (imageFormat == ImageFormat.Gif)
                    {
                        FPictureFormat = System.Drawing.Imaging.ImageFormat.Gif;
                    }

                    Width  = obj.Width == 0 ? obj.Border.LeftLine.Width : obj.Width;
                    Height = obj.Height == 0 ? obj.Border.TopLine.Width : obj.Height;

                    if (Math.Abs(Width) * Zoom < 1 && Zoom > 0)
                    {
                        Width = 1 / Zoom;
                    }

                    if (Math.Abs(Height) * Zoom < 1 && Zoom > 0)
                    {
                        Height = 1 / Zoom;
                    }

                    using (System.Drawing.Image image =
                               new Bitmap(
                                   (int)(Math.Abs(Math.Round(Width * Zoom))),
                                   (int)(Math.Abs(Math.Round(Height * Zoom)))
                                   )
                           )
                    {
                        using (Graphics g = Graphics.FromImage(image))
                        {
                            if (obj is TextObjectBase)
                            {
                                g.Clear(Color.White);
                            }

                            float Left = Width > 0 ? obj.AbsLeft : obj.AbsLeft + Width;
                            float Top  = Height > 0 ? obj.AbsTop : obj.AbsTop + Height;

                            float dx = 0;
                            float dy = 0;
                            g.TranslateTransform((-Left - dx) * Zoom, (-Top - dy) * Zoom);

                            BorderLines oldLines = obj.Border.Lines;
                            obj.Border.Lines = BorderLines.None;
                            obj.Draw(new FRPaintEventArgs(g, Zoom, Zoom, Report.GraphicCache));
                            obj.Border.Lines = oldLines;
                        }

                        if (FPictureFormat == System.Drawing.Imaging.ImageFormat.Jpeg)
                        {
                            ExportUtils.SaveJpeg(image, PictureStream, 95);
                        }
                        else
                        {
                            image.Save(PictureStream, FPictureFormat);
                        }
                    }
                    PictureStream.Position = 0;

                    string hash = String.Empty;
                    if (obj is PictureObject)
                    {
                        PictureObject pic = (obj as PictureObject);
                        if (pic.Image == null)
                        {
                        }
                        else
                        {
                            using (MemoryStream picStr = new MemoryStream())
                            {
                                ImageHelper.Save(pic.Image, picStr);
                                using (StreamWriter picWriter = new StreamWriter(picStr))
                                {
                                    picWriter.Write(pic.Width);
                                    picWriter.Write(pic.Height);
                                    picWriter.Write(pic.Angle);
                                    picWriter.Write(pic.Transparency);
                                    picWriter.Write(pic.TransparentColor.ToArgb());
                                    picWriter.Write(pic.CanShrink);
                                    picWriter.Write(pic.CanGrow);
                                    hash = Crypter.ComputeHash(picStr);
                                }
                            }
                        }
                    }
                    else
                    {
                        hash = Crypter.ComputeHash(PictureStream);
                    }
                    result = HTMLGetImage(0, 0, 0, hash, true, null, PictureStream, false);
                }
            }
            return(result);
        }
예제 #8
0
            public ResultComponent(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, UserResult result, int rank) : base(device)
            {
                this.resourceManager = resourceManager;

                this.AddChild(new TextureString(device, ConvertRank(rank), 14, PPDColors.White)
                {
                    Position = new SharpDX.Vector2(0, 8)
                });

                this.AddChild(userIcon = new PictureObject(device, resourceManager, PathObject.Absolute(currentUserIconPath))
                {
                    Position = new SharpDX.Vector2(50, 0)
                });
                this.AddChild(new TextureString(device, result.User.Name, 12, 85, PPDColors.White)
                {
                    Position = new SharpDX.Vector2(90, 8)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(240, 4),
                    Alignment = PPDFramework.Alignment.Center,
                    MaxDigit  = 7,
                    Value     = (uint)result.Result.Score,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(317, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.CoolCount,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(380, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.GoodCount,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(440, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.SafeCount,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(497, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.SadCount,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(557, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.WorstCount,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });
                this.AddChild(new NumberPictureObject(device, resourceManager, Utility.Path.Combine("numpoint.png"))
                {
                    Position  = new SharpDX.Vector2(645, 4),
                    Alignment = Alignment.Center,
                    MaxDigit  = -1,
                    Value     = (uint)result.Result.MaxCombo,
                    Scale     = new SharpDX.Vector2(0.5f, 1)
                });

                AddBinding(new Binding(result.User, "ImagePath", this, "UserImagePath"));
                ChangeUserIconScale();
            }
예제 #9
0
        public GameResultComponent(PPDDevice device, IGameHost gameHost, PPDFramework.Resource.ResourceManager resourceManager, ISound sound) : base(device)
        {
            this.gameHost        = gameHost;
            this.resourceManager = resourceManager;
            this.sound           = sound;

            this.AddChild(back = new PictureObject(device, resourceManager, Utility.Path.Combine("dialog_back.png")));
            this.AddChild(new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.75f
            });

            back.AddChild(resultSprite = new SpriteObject(device)
            {
                Position = new SharpDX.Vector2(50, SpriteY),
                Clip     = new ClipInfo(gameHost)
                {
                    PositionX = 40,
                    PositionY = SpriteY,
                    Width     = 750,
                    Height    = ClipHeight
                }
            });
            back.AddChild(scrollBar = new RectangleComponent(device, resourceManager, PPDColors.White)
            {
                Position        = new Vector2(755, SpriteY),
                RectangleHeight = ScrollBarHeight,
                RectangleWidth  = 5
            });
            back.AddChild(new TextureString(device, Utility.Language["Result"], 30, PPDColors.White)
            {
                Position = new SharpDX.Vector2(35, 30)
            });
            back.AddChild(new TextureString(device, Utility.Language["Rank"], 14, PPDColors.White)
            {
                Position = new SharpDX.Vector2(50, 80)
            });
            back.AddChild(new TextureString(device, Utility.Language["Player"], 14, PPDColors.White)
            {
                Position = new SharpDX.Vector2(150, 80)
            });
            back.AddChild(new TextureString(device, Utility.Language["Score"], 14, PPDColors.White)
            {
                Position = new SharpDX.Vector2(270, 80)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "cool.png"))
            {
                Position = new SharpDX.Vector2(350, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "good.png"))
            {
                Position = new SharpDX.Vector2(410, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "safe.png"))
            {
                Position = new SharpDX.Vector2(470, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "sad.png"))
            {
                Position = new SharpDX.Vector2(530, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "worst.png"))
            {
                Position = new SharpDX.Vector2(580, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });
            back.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("eva", "combo.png"))
            {
                Position = new SharpDX.Vector2(650, 82),
                Scale    = new SharpDX.Vector2(0.5f)
            });

            Inputed    += GameResultComponent_Inputed;
            GotFocused += GameResultComponent_GotFocused;
            Alpha       = 0;
        }
예제 #10
0
파일: Form1.cs 프로젝트: latys/zhuotie
        private void reportShow()
        {
            this.Invoke(new setStatusDelegate1(setStatus));
            int      i = 0, j = 0;
            dbHepler db = new dbHepler();

            string sql = this.Invoke(new getsql(generatesql)) as string;

            MessageBox.Show(sql);
            // string sql = "select * from [20028] where XH='128590'";
            DataSet Student = db.LoadData(sql);

            report.Pages.Clear();
            //report.Load("Untitled.frx");
            ;

            //DataBand data = (DataBand)report.FindObject("data1");

            for (i = 0; i < Student.Tables[0].Rows.Count / 10; i++)
            {
                ReportPage page1 = new ReportPage();

                report.Pages.Add(page1);

                DataBand data = new DataBand();
                page1.Bands.Add(data);
                for (j = 0; j < 10; j++)
                {
                    TextObject text1 = new TextObject();
                    if (j % 2 == 0)
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 4, Units.Centimeters * 3 * j, Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }
                    else
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 4, Units.Centimeters * 3 * (j - 1), Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }

                    text1.Text = Student.Tables[0].Rows[10 * i + j]["name"].ToString();
                    data.Objects.Add(text1);


                    PictureObject pic = new PictureObject();
                    if (j % 2 == 0)
                    {
                        pic.Bounds = new RectangleF(0, Units.Centimeters * 3 * j, Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    else
                    {
                        pic.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (j - 1), Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    if (File.Exists("./" + "20" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString().Substring(0, 2) + "/" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString() + ".jpg"))
                    {
                        pic.Image = Image.FromFile("./" + "20" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString().Substring(0, 2) + "/" + Student.Tables[0].Rows[10 * i + j]["XH"].ToString() + ".jpg");
                    }
                    data.Objects.Add(pic);

                    BarcodeObject bar = new BarcodeObject();
                    if (j % 2 == 0)
                    {
                        bar.Bounds = new RectangleF(0, Units.Centimeters * 3 * j + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    else
                    {
                        bar.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (j - 1) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    //pic.Image = Image.FromFile("100001.jpg");
                    bar.Text = Student.Tables[0].Rows[10 * i + j]["ZKZH"].ToString();
                    data.Objects.Add(bar);
                }
            }

            if (Student.Tables[0].Rows.Count % 10 != 0)
            {
                Console.WriteLine((10 * i + j).ToString());
                ReportPage page2 = new ReportPage();

                report.Pages.Add(page2);

                DataBand data2 = new DataBand();
                page2.Bands.Add(data2);

                for (int k = 10 * (i - 1) + j; k < Student.Tables[0].Rows.Count; k++)
                {
                    TextObject text1 = new TextObject();
                    if (k % 2 == 0)
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 4, Units.Centimeters * 3 * (k % 10), Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }
                    else
                    {
                        text1.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 4, Units.Centimeters * 3 * (k % 10 - 1), Units.Centimeters * 5, Units.Centimeters * 0.6f);
                    }

                    text1.Text = Student.Tables[0].Rows[k]["name"].ToString();
                    data2.Objects.Add(text1);


                    PictureObject pic = new PictureObject();
                    if (k % 2 == 0)
                    {
                        pic.Bounds = new RectangleF(0, Units.Centimeters * 3 * k % 10, Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    else
                    {
                        pic.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (k % 10 - 1), Units.Centimeters * 2, Units.Centimeters * 2);
                    }
                    if (File.Exists("./" + "20" + Student.Tables[0].Rows[k]["XH"].ToString().Substring(0, 2) + "/" + Student.Tables[0].Rows[k]["XH"].ToString() + ".jpg"))
                    {
                        pic.Image = Image.FromFile("./" + "20" + Student.Tables[0].Rows[k]["XH"].ToString().Substring(0, 2) + "/" + Student.Tables[0].Rows[k]["XH"].ToString() + ".jpg");
                    }
                    data2.Objects.Add(pic);

                    BarcodeObject bar = new BarcodeObject();
                    if (k % 2 == 0)
                    {
                        bar.Bounds = new RectangleF(0, Units.Centimeters * 3 * (k % 10) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    else
                    {
                        bar.Bounds = new RectangleF(Units.Centimeters * 9 + Units.Centimeters * 0, Units.Centimeters * 3 * (k % 10 - 1) + Units.Centimeters * 2.5f, Units.Centimeters * 8, Units.Centimeters * 2);
                    }
                    //pic.Image = Image.FromFile("100001.jpg");
                    bar.Text = Student.Tables[0].Rows[k]["ZKZH"].ToString();
                    data2.Objects.Add(bar);
                }
            }
            this.Invoke(new setStatusDelegate1(setStatus2));
            this.Invoke(new setStatusDelegate1(reportShow1));
        }
예제 #11
0
        public FilterControl(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager, ISound sound, SongSelectFilter filter) : base(device)
        {
            this.sound  = sound;
            this.filter = filter;
            selection   = new GridSelection();

            PictureObject back;

            var mainSprite = new SpriteObject(device);

            mainSprite.AddChild(new TextureString(device, Utility.Language["SortField"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 80)
            });
            var sortFieldSprite = new SpriteObject(device);

            this.AddChild(sortFieldSprite);
            sortFieldSprite.AddChild(nameRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Name"])
            {
                Position = new Vector2(80, 120),
                Selected = true
            });
            nameRadio.Update();
            sortFieldSprite.AddChild(timeRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Time"])
            {
                Position = new Vector2(nameRadio.Position.X + nameRadio.Width + Margin, 120)
            });
            timeRadio.Update();
            sortFieldSprite.AddChild(updateDateRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["UpdateDate"])
            {
                Position = new Vector2(timeRadio.Position.X + timeRadio.Width + Margin, 120)
            });
            updateDateRadio.Update();
            sortFieldSprite.AddChild(bpmRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["BPM"])
            {
                Position = new Vector2(updateDateRadio.Position.X + updateDateRadio.Width + Margin, 120)
            });
            bpmRadio.Update();
            sortFieldSprite.AddChild(authorRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Author"])
            {
                Position = new Vector2(bpmRadio.Position.X + bpmRadio.Width + Margin, 120)
            });

            mainSprite.AddChild(new TextureString(device, Utility.Language["SortOrder"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 160)
            });
            var sortOrderSprite = new SpriteObject(device);

            this.AddChild(sortOrderSprite);
            sortOrderSprite.AddChild(ascRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Ascendant"])
            {
                Position = new Vector2(80, 200)
            });
            nameRadio.Update();
            sortOrderSprite.AddChild(descRadio = new RadioBoxComponent(device, resourceManager, Utility.Path, Utility.Language["Descendant"])
            {
                Position = new Vector2(ascRadio.Position.X + ascRadio.Width + Margin, 200)
            });

            mainSprite.AddChild(new TextureString(device, Utility.Language["Type"], 22, PPDColors.White)
            {
                Position = new Vector2(50, 240)
            });
            mainSprite.AddChild(easyCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "EASY")
            {
                Position = new Vector2(80, 280)
            });
            easyCheck.Update();
            mainSprite.AddChild(normalCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "NORMAL")
            {
                Position = new Vector2(easyCheck.Position.X + easyCheck.Width + Margin, 280)
            });
            normalCheck.Update();
            mainSprite.AddChild(hardCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "HARD")
            {
                Position = new Vector2(normalCheck.Position.X + normalCheck.Width + Margin, 280)
            });
            hardCheck.Update();
            mainSprite.AddChild(extremeCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, "EXTREME")
            {
                Position = new Vector2(hardCheck.Position.X + hardCheck.Width + Margin, 280)
            });
            mainSprite.AddChild(normalScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["NormalScore"])
            {
                Position = new Vector2(80, 320)
            });
            normalScoreCheck.Update();
            mainSprite.AddChild(acScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["ACScore"])
            {
                Position = new Vector2(normalScoreCheck.Position.X + normalScoreCheck.Width + Margin, 320)
            });
            acScoreCheck.Update();
            mainSprite.AddChild(acftScoreCheck = new CheckBoxComponent(device, resourceManager, Utility.Path, Utility.Language["ACFTScore"])
            {
                Position = new Vector2(acScoreCheck.Position.X + acScoreCheck.Width + Margin, 320)
            });

            mainSprite.AddChild(setDefaultButton = new ButtonComponent(device, resourceManager, Utility.Path, Utility.Language["SetDefault"])
            {
                Position = new Vector2(300, 370)
            });

            selectList = new SelectableComponent[] {
                nameRadio,
                timeRadio,
                updateDateRadio,
                bpmRadio,
                authorRadio,
                ascRadio,
                descRadio,
                easyCheck,
                normalCheck,
                hardCheck,
                extremeCheck,
                normalScoreCheck,
                acScoreCheck,
                acftScoreCheck,
                setDefaultButton
            };
            foreach (SelectableComponent comp in selectList)
            {
                selection.Add(comp.Position);
            }

            this.AddChild(mainSprite);
            this.AddChild(back = new PictureObject(device, resourceManager, Utility.Path.Combine("dialog_back.png")));
            this.AddChild(new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            });
            back.AddChild(new TextureString(device, Utility.Language["Filter"], 30, PPDColors.White)
            {
                Position = new Vector2(35, 30)
            });

            Inputed     += FilterControl_Inputed;
            GotFocused  += FilterControl_GotFocused;
            LostFocused += FilterControl_LostFocused;
        }
예제 #12
0
        public ModSettingPanel(PPDDevice device, IGameHost gameHost, PPDFramework.Resource.ResourceManager resourceManager, ISound sound, ModInfo modInfo) : base(device)
        {
            this.gameHost        = gameHost;
            this.sound           = sound;
            this.resourceManager = resourceManager;
            this.modInfo         = modInfo;

            back  = new PictureObject(device, resourceManager, Utility.Path.Combine("dialog_back.png"));
            black = new RectangleComponent(device, resourceManager, PPDColors.Black)
            {
                RectangleHeight = 450,
                RectangleWidth  = 800,
                Alpha           = 0.65f
            };
            back.AddChild(new TextureString(device, String.Format("{0}-{1}", Utility.Language["ModSetting"], modInfo.FileName), 30, PPDColors.White)
            {
                Position = new Vector2(35, 30)
            });
            StackObject stackObject;

            back.AddChild(stackObject = new StackObject(device,
                                                        new StackObject(device,
                                                                        new SpaceObject(device, 0, 2),
                                                                        new PictureObject(device, resourceManager, Utility.Path.Combine("circle.png")))
            {
                IsHorizontal = false
            },
                                                        new TextureString(device, String.Format(":{0}", Utility.Language["ChangeSetting"]), 18, PPDColors.White))
            {
                IsHorizontal = true
            });
            stackObject.Update();
            stackObject.Position = new Vector2(760 - stackObject.Width, 50);

            settingSprite = new SpriteObject(device)
            {
                Position = new Vector2(50, SpriteY)
            };
            settingSprite.AddChild(settingListSprite = new SpriteObject(device)
            {
                Clip = new ClipInfo(gameHost)
                {
                    PositionX = 40,
                    PositionY = ClipY,
                    Width     = 750,
                    Height    = ClipHeight
                }
            });

            float height = 0;

            foreach (ModSetting modSetting in modInfo.Settings)
            {
                var component = new ModSettingComponent(device, resourceManager, modSetting,
                                                        modSetting.GetStringValue(modInfo.ModSettingManager[modSetting.Key]))
                {
                    Position = new Vector2(0, height)
                };
                component.Update();
                settingListSprite.AddChild(component);
                height += component.Height + 10;
            }
            CurrentComponent.IsSelected = true;

            settingSprite.AddChild(rectangle = new LineRectangleComponent(device, resourceManager, PPDColors.Selection)
            {
                RectangleWidth  = 700,
                RectangleHeight = 100
            });

            this.AddChild(settingSprite);
            this.AddChild(back);
            this.AddChild(black);

            UpdateBorderPosition(true);

            Inputed += ModSettingPanel_Inputed;
        }
예제 #13
0
파일: LifeGage.cs 프로젝트: KHCmaster/PPD
        public LifeGage(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager) : base(device)
        {
            this.resourceManager = resourceManager;
            black = new PictureObject(device, resourceManager, Utility.Path.Combine("lifegage", "black.png"))
            {
                Position = new Vector2(0, 2)
            };
            frame = new PictureObject(device, resourceManager, Utility.Path.Combine("lifegage", "frame.png"))
            {
                Scale = new SharpDX.Vector2(0.99f, 0.95f)
            };
            this.AddChild(frame);
            this.AddChild(black);
            flareSprite   = new SpriteObject(device);
            backSprite    = new SpriteObject(device);
            overraySprite = new SpriteObject(device);
            onpuSprite    = new SpriteObject(device);
            this.AddChild(flareSprite);
            this.AddChild(overraySprite);
            this.AddChild(onpuSprite);
            this.AddChild(backSprite);
            for (int i = 0; i < 3; i++)
            {
                string content = "";
                switch (i)
                {
                case 0:
                    content = "danger";
                    break;

                case 1:
                    content = "normal";
                    break;

                case 2:
                    content = "full";
                    break;
                }
                var flare = new EffectObject(device, resourceManager, Utility.Path.Combine("lifegage", String.Format("{0}{1}", content, "flare.etd")))
                {
                    Position = new Vector2(56, 11)
                };
                flare.PlayType = Effect2D.EffectManager.PlayType.ReverseLoop;
                flare.Play();
                flareSprite.AddChild(flare);
                backSprite.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("lifegage", String.Format("{0}{1}", content, "back.png")))
                {
                    Position = new Vector2(2, 2)
                });
                overraySprite.AddChild(new PictureObject(device, resourceManager, Utility.Path.Combine("lifegage", String.Format("{0}{1}", content, "overray.png")))
                {
                    Position = new Vector2(2, 2)
                });
                flareSprite[i].Hidden = overraySprite[i].Hidden = backSprite[i].Hidden = true;
            }

            flareSprite[(int)state].Hidden = overraySprite[(int)state].Hidden = backSprite[(int)state].Hidden = false;

            onpus       = new List <OnpuObject>();
            CurrentLife = 50;

            InitializeComponentPosition();
        }
예제 #14
0
        public SongInfoControl(PPDDevice device, PPDFramework.Resource.ResourceManager resourceManager) : base(device)
        {
            menuRanking = new MenuRanking(device, resourceManager)
            {
                Position = new Vector2(500, 105)
            };
            menuRanking.Hidden = true;
            this.AddChild(menuRanking);
            state          = State.normal;
            infoboards     = new PictureObject[2];
            bestEvaluates  = new BestEvaluate[4];
            buttonAcs      = new PictureObject[4];
            buttonFts      = new PictureObject[4];
            buttonPerfects = new PictureObject[4];
            acs            = new PictureObject[4];
            fts            = new PictureObject[4];
            perfects       = new PictureObject[4];
            infoboards[0]  = new PictureObject(device, resourceManager, Utility.Path.Combine("infoboard1.png"))
            {
                Position = new Vector2(520, height - 14)
            };
            infoboards[1] = new PictureObject(device, resourceManager, Utility.Path.Combine("infoboard2.png"))
            {
                Position = new Vector2(500, 280)
            };
            infoboards[1].Hidden = true;
            this.AddChild(infoboards[0]);
            this.AddChild(infoboards[1]);
            TextureString easy, normal, hard, extreme;

            infoboards[0].AddChild(new TextureString(device, "BPM", 20, PPDColors.White)
            {
                Position = new Vector2(0, 15)
            });
            infoboards[0].AddChild(easy = new TextureString(device, "EASY", 20, PPDColors.White)
            {
                Position = new Vector2(0, 45)
            });
            infoboards[0].AddChild(normal = new TextureString(device, "NORMAL", 20, PPDColors.White)
            {
                Position = new Vector2(0, 75)
            });
            infoboards[0].AddChild(hard = new TextureString(device, "HARD", 20, PPDColors.White)
            {
                Position = new Vector2(0, 105)
            });
            infoboards[0].AddChild(extreme = new TextureString(device, "EXTREME", 20, PPDColors.White)
            {
                Position = new Vector2(0, 135)
            });
            infoboards[0].AddChild(new TextureString(device, "S.A.", 20, PPDColors.White)
            {
                Position = new Vector2(0, 165)
            });
            foreach (GameComponent gc in infoboards[0].Children)
            {
                gc.Position = new Vector2(90 - gc.Width, gc.Position.Y);
            }
            for (int i = 0; i < 4; i++)
            {
                infoboards[0].InsertChild(acs[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("ac.png"))
                {
                    Position = new Vector2(0, 35 + 30 * i)
                }, 0);

                infoboards[0].InsertChild(fts[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("ft.png"))
                {
                    Position = new Vector2(0, 35 + 30 * i)
                }, 0);

                infoboards[0].InsertChild(perfects[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("perfect.png"))
                {
                    Position = new Vector2(35, 35 + 30 * i)
                }, 0);

                infoboards[0].InsertChild(bestEvaluates[i] = new BestEvaluate(device, resourceManager)
                {
                    Position = new Vector2(80, 35 + 30 * i)
                }, 0);
            }
            infos = new TextureString[6];
            for (int i = 0; i < 6; i++)
            {
                var st = new TextureString(device, "", 20, 150, PPDColors.White)
                {
                    Position = new Vector2(100, 15 + 30 * i)
                };
                infos[i] = st;
                infoboards[0].AddChild(st);
            }
            focusedbpm = new TextureString(device, "BPM", 12, true, PPDColors.White)
            {
                Position = new Vector2(140, 10)
            };
            hiscore = new TextureString(device, "BPM", 12, true, PPDColors.White)
            {
                Position = new Vector2(140, 30)
            };
            difficulty = new TextureString(device, "BPM", 12, true, PPDColors.White)
            {
                Position = new Vector2(140, 50)
            };
            infoboards[1].AddChild(focusedbpm);
            infoboards[1].AddChild(hiscore);
            infoboards[1].AddChild(difficulty);
            buttons = new Button[4];
            for (int i = 0; i < buttons.Length; i++)
            {
                string text = "";
                switch (i)
                {
                case 0:
                    text = "EASY";
                    break;

                case 1:
                    text = "NORMAL";
                    break;

                case 2:
                    text = "HARD";
                    break;

                case 3:
                    text = "EXTREME";
                    break;
                }
                infoboards[1].AddChild(buttonAcs[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("ac.png"))
                {
                    Position = new Vector2(85 * i - 40, 75)
                });
                infoboards[1].AddChild(buttonFts[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("ft.png"))
                {
                    Position = new Vector2(85 * i - 40, 75)
                });
                infoboards[1].AddChild(buttonPerfects[i] = new PictureObject(device, resourceManager, Utility.Path.Combine("perfect.png"))
                {
                    Position = new Vector2(85 * i - 40 + 30, 75)
                });
                buttons[i] = new Button(device, resourceManager, Utility.Path, text)
                {
                    Position = new Vector2(85 * i, 100)
                };
                infoboards[1].AddChild(buttons[i]);
            }

            GotFocused  += SongInfoControl_GotFocused;
            LostFocused += SongInfoControl_LostFocused;
        }