Projektdateien hinzufügen.
This commit is contained in:
50
VideoBrowser/Models/OpenOutputFolderButton.cs
Normal file
50
VideoBrowser/Models/OpenOutputFolderButton.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
namespace VideoBrowser.Models
|
||||
{
|
||||
using VideoBrowser.Controls.CefSharpBrowser;
|
||||
using VideoBrowser.Controls.CefSharpBrowser.Helpers;
|
||||
using VideoBrowser.Controls.CefSharpBrowser.ViewModels;
|
||||
using VideoBrowser.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="OpenOutputFolderButton" />.
|
||||
/// </summary>
|
||||
public class OpenOutputFolderButton : AddInButton
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpenOutputFolderButton"/> class.
|
||||
/// </summary>
|
||||
/// <param name="settings">The settings<see cref="SettingsViewModel"/>.</param>
|
||||
public OpenOutputFolderButton(SettingsViewModel settings)
|
||||
{
|
||||
this.SettingsViewModel = settings;
|
||||
this.Icon = Icons.Folder;
|
||||
this.ToolTip = "Open the output folder";
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SettingsViewModel.
|
||||
/// </summary>
|
||||
public SettingsViewModel SettingsViewModel { get; }
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// The Execute.
|
||||
/// </summary>
|
||||
/// <param name="viewModel">The viewModel<see cref="WebBrowserTabControlViewModel"/>.</param>
|
||||
protected override void Execute(WebBrowserTabControlViewModel viewModel)
|
||||
{
|
||||
ProcessHelper.Start(this.SettingsViewModel.OutputFolder);
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user