public ClipPlayerViewModel(ClipPlayer clipPlayer, TwitchClip twitchClip) { m_MediaElement = clipPlayer.Media; Commands = new AppCommands(ViewModel: this); Controller = new ControllerViewModel(this); this.TwitchClip = twitchClip; }
public int compareTo(TwitchClip twitchClip1, TwitchClip twitchClip2) { if (accentDescent == false) { return(_compareFunc(twitchClip1, twitchClip2)); } else { return(-1 * _compareFunc(twitchClip1, twitchClip2)); } }
public ClipPlayer(TwitchClip twitchClip) { this.twitchClip = twitchClip; InitializeComponent(); ViewModel = new ClipPlayerViewModel(this, twitchClip); this.DataContext = ViewModel; InitializeMainWindow(); ViewModel.Commands.OpenCommand.Execute(twitchClip.download_url); }
private void Button_Click_3(object sender, RoutedEventArgs e) { if (sender is Button button) { TwitchClip twitchClip = button.DataContext as TwitchClip; ProcessStartInfo startInfo = new ProcessStartInfo(@"explorer"); startInfo.Arguments = $"/select,\"{twitchClip.download_url}\""; startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; //startInfo.RedirectStandardOutput = true; //startInfo.RedirectStandardError = true; Process proc = Process.Start(startInfo); } }