Exemple #1
0
        private void handleOpenWindow(ShowWindowMessage msg)
        {
            bool?  dialogResult = null;
            object returnVal    = null;

            switch (msg.Window)
            {
            case WindowType.SettingsWindow:
                var settingsWindow = new SettingsWindow();
                settingsWindow.Owner = this;
                dialogResult         = settingsWindow.ShowDialog();
                break;

            case WindowType.FetchWindow:
                var fetchWindow = new FetchWindow(msg.Parameter as FetchViewModel);
                fetchWindow.Owner = this;
                dialogResult      = fetchWindow.ShowDialog();
                returnVal         = msg.Parameter;
                break;

            case WindowType.DownloadOutputWindow:
                DownloadOutputWindow.ShowDownloadOutputWindow(this);
                break;

#if VIVIDL
            case WindowType.FormatSelectionWindow:
                var formatSelectionWindow = new FormatSelectionWindow(msg.Parameter as FormatSelectionViewModel);
                formatSelectionWindow.Owner = this;
                dialogResult = formatSelectionWindow.ShowDialog();
                break;

            case WindowType.VideoDataWindow:
                var videoDataWindow = new VideoDataWindow(msg.Parameter as VideoViewModel);
                videoDataWindow.Owner = this;
                dialogResult          = videoDataWindow.ShowDialog();
                break;

            case WindowType.PlaylistDataWindow:
                var playlistDataWindow = new PlaylistDataWindow(msg.Parameter as VideoViewModel);
                playlistDataWindow.Owner = this;
                dialogResult             = playlistDataWindow.ShowDialog();
                break;
#else
            case WindowType.VideoDataWindow:
            case WindowType.PlaylistDataWindow:
                break;
#endif
            }
            msg.Callback?.Invoke(dialogResult, returnVal);
        }
Exemple #2
0
        private void FetchItem_Click(object sender, RoutedEventArgs e)
        {
            Mod row = (Mod)ModGrid.SelectedItem;

            if (row != null)
            {
                FetchWindow fw = new FetchWindow(row, logger);
                fw.ShowDialog();
                if (fw.success)
                {
                    ShowMetadata(row.name);
                }
            }
        }