Exemplo n.º 1
0
 void EditDefaultApp_Click(object sender, RoutedEventArgs e)
 {
     ProcessHelp.ShellExecute("ms-settings:defaultapps");
 }
Exemplo n.º 2
0
 void ShowEnvVarEditor_Click(object sender, RoutedEventArgs e)
 {
     ProcessHelp.Execute("rundll32.exe", "sysdm.cpl,EditEnvironmentVariables");
 }
Exemplo n.º 3
0
 public static void show_keys(string[] args)
 {
     ProcessHelp.Start(OS.GetTextEditor(), '"' + mpv.InputConfPath + '"');
 }
Exemplo n.º 4
0
        public static void Execute(string id, string[] args)
        {
            switch (id)
            {
            case "add-files-to-playlist": OpenFiles("append"); break;     // deprecated 2019

            case "cycle-audio": CycleAudio(); break;

            case "execute-mpv-command": Msg.ShowError("The command was removed, reset input.conf by deleting it, in the new menu use the on screen console."); break;     // deprecated 2020

            case "load-audio": LoadAudio(); break;

            case "load-sub": LoadSubtitle(); break;

            case "open-clipboard": OpenFromClipboard(); break;

            case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;

            case "open-files": OpenFiles(args); break;

            case "open-optical-media": Open_DVD_Or_BD_Folder(); break;

            case "open-url": OpenFromClipboard(); break;     // deprecated 2022

            case "play-pause": PlayPause(); break;

            case "playlist-first": PlaylistFirst(); break;

            case "playlist-last": PlaylistLast(); break;

            case "reg-file-assoc": RegisterFileAssociations(args[0]); break;

            case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;

            case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;

            case "show-about": ShowDialog(typeof(AboutWindow)); break;

            case "show-audio-devices": Msg.ShowInfo(Core.GetPropertyOsdString("audio-device-list")); break;

            case "show-audio-tracks": ShowAudioTracks(); break;

            case "show-command-palette": ShowCommandPalette(); break;

            case "show-commands": ShowCommands(); break;

            case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;

            case "show-decoders": ShowStrings(mpvHelp.GetDecoders().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;

            case "show-demuxers": ShowStrings(mpvHelp.GetDemuxers().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;

            case "show-history": ShowHistory(); break;

            case "show-info": ShowInfo(); break;

            case "show-input-editor": ShowDialog(typeof(InputWindow)); break;

            case "show-keys": ShowStrings(Core.GetPropertyString("input-key-list").Split(',')); break;

            case "show-media-info": ShowMediaInfo(args); break;

            case "show-menu": ShowMenu(); break;

            case "show-playlist": ShowPlaylist(); break;

            case "show-profiles": Msg.ShowInfo(mpvHelp.GetProfiles()); break;

            case "show-progress": ShowProgress(); break;

            case "show-properties": ShowProperties(); break;

            case "show-protocols": ShowStrings(mpvHelp.GetProtocols().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;

            case "show-recent": ShowRecent(); break;

            case "show-setup-dialog": ShowSetupDialog(); break;      // deprecated 2022

            case "show-subtitle-tracks": ShowSubtitleTracks(); break;

            case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;

            case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;

            default: Terminal.WriteError($"No command '{id}' found, reset input.conf by deleting it."); break;
            }
        }
Exemplo n.º 5
0
 void SupportTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
 {
     ProcessHelp.ShellExecute("https://github.com/stax76/mpv.net#Support");
 }
Exemplo n.º 6
0
 public static void open_config_folder(string[] args)
 {
     ProcessHelp.Start(Folder.AppDataRoaming + "mpv");
 }
Exemplo n.º 7
0
 void OpenSettingsTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
 {
     ProcessHelp.ShellExecute(Path.GetDirectoryName(core.ConfPath));
 }
Exemplo n.º 8
0
 void ShowManualTextBlock_MouseUp(object sender, MouseButtonEventArgs e)
 {
     ProcessHelp.ShellExecute("https://mpv.io/manual/master/");
 }
Exemplo n.º 9
0
        public static void Execute(string id, string[] args = null)
        {
            switch (id)
            {
            case "open-files": OpenFiles(args); break;

            case "update-check": UpdateCheck.CheckOnline(true); break;

            case "open-url": OpenURL(); break;

            case "open-optical-media": Open_DVD_Or_BD_Folder(); break;

            case "manage-file-associations":     // deprecated 2019
            case "show-setup-dialog": ShowDialog(typeof(SetupWindow)); break;

            case "cycle-audio": CycleAudio(); break;

            case "load-audio": LoadAudio(); break;

            case "load-sub": LoadSubtitle(); break;

            case "execute-mpv-command": ExecuteMpvCommand(); break;

            case "show-history": ShowHistory(); break;

            case "show-media-search": ShowDialog(typeof(EverythingWindow)); break;

            case "show-command-palette": ShowDialog(typeof(CommandPaletteWindow)); break;

            case "show-about": ShowDialog(typeof(AboutWindow)); break;

            case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;

            case "show-input-editor": ShowDialog(typeof(InputWindow)); break;

            case "open-conf-folder": ProcessHelp.ShellExecute(core.ConfigFolder); break;

            case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;

            case "show-info": ShowInfo(); break;

            case "playlist-first": PlaylistFirst(); break;

            case "playlist-last": PlaylistLast(); break;

            case "show-profiles": ShowTextWithEditor("profile-list", mpvHelp.GetProfiles()); break;

            case "show-properties": ShowProperties(); break;

            case "show-commands": ShowCommands(); break;

            case "show-keys": ShowTextWithEditor("input-key-list", core.get_property_string("input-key-list").Replace(",", BR)); break;

            case "add-files-to-playlist": OpenFiles("append"); break;     // deprecated 2019

            case "show-audio-devices": ShowTextWithEditor("audio-device-list", core.get_property_osd_string("audio-device-list")); break;

            case "show-decoders": ShowTextWithEditor("decoder-list", mpvHelp.GetDecoders()); break;

            case "show-protocols": ShowTextWithEditor("protocol-list", mpvHelp.GetProtocols()); break;

            case "show-demuxers": ShowTextWithEditor("demuxer-lavf-list", mpvHelp.GetDemuxers()); break;

            default: Msg.ShowError($"No command '{id}' found."); break;
            }
        }
Exemplo n.º 10
0
 public static void show_prefs(string[] args)
 {
     CreateMpvConf();
     ProcessHelp.Start(OS.GetTextEditor(), '"' + mpv.mpvConfPath + '"');
 }
Exemplo n.º 11
0
 void SupportTextBlock_MouseUp(object sender, MouseButtonEventArgs e) =>
 ProcessHelp.ShellExecute("https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#support");
Exemplo n.º 12
0
        public static void Execute(string id, string[] args)
        {
            switch (id)
            {
            case "add-files-to-playlist": OpenFiles("append"); break;     // deprecated 2019

            case "cycle-audio": CycleAudio(); break;

            case "execute-mpv-command": Msg.ShowError("Command was removed, reset input.conf."); break;

            case "load-audio": LoadAudio(); break;

            case "load-sub": LoadSubtitle(); break;

            case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;

            case "open-files": OpenFiles(args); break;

            case "open-optical-media": Open_DVD_Or_BD_Folder(); break;

            case "open-url": OpenURL(); break;

            case "playlist-first": PlaylistFirst(); break;

            case "playlist-last": PlaylistLast(); break;

            case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;

            case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;

            case "show-about": ShowDialog(typeof(AboutWindow)); break;

            case "show-audio-devices": ShowTextWithEditor("audio-device-list", Core.GetPropertyOsdString("audio-device-list")); break;

            case "show-command-palette": ShowCommandPalette(); break;

            case "show-commands": ShowCommands(); break;

            case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;

            case "show-decoders": ShowTextWithEditor("decoder-list", mpvHelp.GetDecoders()); break;

            case "show-demuxers": ShowTextWithEditor("demuxer-lavf-list", mpvHelp.GetDemuxers()); break;

            case "show-history": ShowHistory(); break;

            case "show-info": ShowInfo(); break;

            case "show-input-editor": ShowDialog(typeof(InputWindow)); break;

            case "show-keys": ShowTextWithEditor("input-key-list", Core.GetPropertyString("input-key-list").Replace(",", BR)); break;

            case "show-media-info": ShowMediaInfo(args); break;

            case "show-playlist": ShowPlaylist(); break;

            case "show-profiles": ShowTextWithEditor("profile-list", mpvHelp.GetProfiles()); break;

            case "show-properties": ShowProperties(); break;

            case "show-protocols": ShowTextWithEditor("protocol-list", mpvHelp.GetProtocols()); break;

            case "show-setup-dialog": ShowDialog(typeof(SetupWindow)); break;

            case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;

            case "update-check": UpdateCheck.CheckOnline(true); break;

            case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;

            default: Terminal.WriteError($"No command '{id}' found."); break;
            }
        }
Exemplo n.º 13
0
 void ExecutePowerShellScript(string file)
 {
     ProcessHelp.Execute("powershell.exe",
                         "-NoLogo -NoExit -NoProfile -ExecutionPolicy Bypass -File \"" + file + "\"");
 }