Exemplo n.º 1
0
        public FormMusic(Player player,int index,Form form,string title,int positionX,int positionY,int lengthBar,System.Drawing.Color color)
        {
            this.windows = form;
            this.player = player;
            this.index = index;

            this.button.BackColor = color;
            this.button.Image = ((System.Drawing.Image)(rsc.GetObject("play")));
            this.button.Location = new System.Drawing.Point(530-lengthBar, positionY+2);
            this.button.MinimumSize = new System.Drawing.Size(40, 46);
            this.button.MaximumSize = new System.Drawing.Size(40, 46);
            button.Click += new System.EventHandler(this.playClick);
            System.Windows.Forms.Panel tmp2 = this.windows.Controls["panContent"] as System.Windows.Forms.Panel;
            tmp2.Controls.Add(this.button);

            this.title.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                    | System.Windows.Forms.AnchorStyles.Left)
                                    | System.Windows.Forms.AnchorStyles.Right)));
            this.title.BackColor = color;
            this.title.Text = "   "+title;
            this.title.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.title.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel, ((byte)(0)));
            this.title.ForeColor = System.Drawing.Color.Black;
            this.title.Location = new System.Drawing.Point(positionX, positionY);
            this.title.MinimumSize = new System.Drawing.Size(576-lengthBar, 50);
            this.title.MaximumSize = new System.Drawing.Size(576-lengthBar, 50);
            //title.Text = Path.GetFileName(files[cpt]);
            this.title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.title.Click += new System.EventHandler(this.selectedClick);
            System.Windows.Forms.Panel tmp = this.windows.Controls["panContent"] as System.Windows.Forms.Panel;
            tmp.Controls.Add(this.title);
        }
Exemplo n.º 2
0
 private static void Main(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     MainForm mf = new MainForm();
     Player player = new Player(mf);
     player.createMusicsList();
     Application.Run(mf);
 }