-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml.cs
More file actions
39 lines (35 loc) · 977 Bytes
/
Copy pathMainWindow.xaml.cs
File metadata and controls
39 lines (35 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Text;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Microsoft.VisualBasic.FileIO;
using Xabe.FFmpeg;
using Xabe.FFmpeg.Downloader;
using System.Threading.Tasks;
using System.Linq;
namespace WPF_utils;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
InitializeFFmpegAsync();
}
private void AppMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (MainTabControl != null && AppMenu != null)
{
MainTabControl.SelectedIndex = AppMenu.SelectedIndex;
}
}
private async void InitializeFFmpegAsync()
{
// Baixa os binários do FFmpeg caso não existam no diretório
await FFmpegDownloader.GetLatestVersion(FFmpegVersion.Official);
FFmpeg.SetExecutablesPath(".");
}
}