示例#1
0
        public static void initSound(eObject obj, Panel panel)
        {
            int Left = obj.x1 * Constant.cardWidth / 100;
            int Top = obj.y1 * Constant.cardHeight / 100;
            int Width = (obj.x2 - obj.x1) * Constant.cardWidth / 100;
            int Height = (obj.y2 - obj.y1) * Constant.cardHeight / 100;

            string fileToPlay = obj.data;
            Player player = new Player();
            PlayButton newButton = new PlayButton(fileToPlay,player,fileToPlay);

            newButton.Text = "PLAY";
            newButton.Location = new System.Drawing.Point(Left, Top);
            newButton.Size = new System.Drawing.Size(Height, Width);
            panel.Controls.Add(newButton);
            newButton.Click += new EventHandler(newButton_Click);
        }
示例#2
0
        public static void initSound(eObject obj, Panel panel)
        {
            int Left   = obj.x1 * Constant.cardWidth / 100;
            int Top    = obj.y1 * Constant.cardHeight / 100;
            int Width  = (obj.x2 - obj.x1) * Constant.cardWidth / 100;
            int Height = (obj.y2 - obj.y1) * Constant.cardHeight / 100;

            string     fileToPlay = obj.data;
            Player     player     = new Player();
            PlayButton newButton  = new PlayButton(fileToPlay, player, fileToPlay);


            newButton.Text     = "PLAY";
            newButton.Location = new System.Drawing.Point(Left, Top);
            newButton.Size     = new System.Drawing.Size(Height, Width);
            panel.Controls.Add(newButton);
            newButton.Click += new EventHandler(newButton_Click);
        }