public PlayerControl(LayoutEditor newCreator) { InitializeComponent(); creator = newCreator; player = new Player(); filePath = ""; alias = ""; isOpen = false; isPlaying = false; positionControls(); updateButtonStates(); }
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); }
public PlayButton(string fileToPlay, Player player, string alias) { this.fileToPlay = fileToPlay; this.player = player; this.alias = alias; }