protected override void DisposeManagedResources() { base.DisposeManagedResources(); PlaylistMenu.Dispose(); PlaylistMenu = null; PlaylistElementMenu.Dispose(); PlaylistElementMenu = null; DeleteCommand = null; NewCommand = null; }
private void sidemenu_MouseClick(object sender, MouseEventArgs e) { var selectedNode = sidemenu.HitTest(e.X, e.Y).Node; if (selectedNode != null) { if (e.Button == MouseButtons.Right && SelectedLibrary() == LibraryType.Playlist) { sidemenu.SelectedNode = selectedNode; deleteplaylistcontextmenuitem.Visible = true; PlaylistMenu.Show(sidemenu.PointToScreen(e.Location)); } } }
private void SelectSong(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (e.RowIndex >= 0 && e.ColumnIndex >= 0) { DataGridView.CurrentCell = DataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]; SongViewMenu.Show(DataGridView, DataGridView.PointToClient(MousePosition)); } else if (!String.IsNullOrWhiteSpace(playlistName)) { PlaylistMenu.Show(DataGridView, DataGridView.PointToClient(MousePosition)); } } }
static void Main(string[] args) { PlaylistMenu.StartMainMenu(); }
private void load() { track.ValueChanged += ev => { ev.OldValue?.Stop(); ev.OldValue?.Dispose(); }; dependencies.Cache(backgroundVideo = new BackgroundVideo { Track = { BindTarget = track } }); QueueManager queue; dependencies.Cache(queue = new QueueManager { Track = { BindTarget = track }, Video = { BindTarget = video } }); ProgressOverlay progress; dependencies.Cache(progress = new ProgressOverlay()); PlaylistMenu menu; dependencies.Cache(menu = new PlaylistMenu { RelativeSizeAxes = Axes.Y }); InternalChildren = new Drawable[] { queue, new VisualizerContainer { RelativeSizeAxes = Axes.Both, Track = { BindTarget = track }, Children = new Drawable[] { backgroundVideo, new TriangleVisualizer { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre }, new BarVisualizer { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre }, new ProjectileVisualizer { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre }, progress, menu } }, new SongMenu(Direction.Vertical) { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, PlayPause = queue.TogglePause, OpenPlaylist = menu.Show, ClosePlaylist = menu.Hide } }; }