mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
source code checkin
This commit is contained in:
parent
5f8fb2c825
commit
7e57b72e35
675 changed files with 168433 additions and 0 deletions
41
src/ConanServerManager/Windows/CommandLineWindow.xaml.cs
Normal file
41
src/ConanServerManager/Windows/CommandLineWindow.xaml.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using ServerManagerTool.Common.Utils;
|
||||
using System.Windows;
|
||||
using WPFSharp.Globalizer;
|
||||
|
||||
namespace ServerManagerTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CommandLineWindow.xaml
|
||||
/// </summary>
|
||||
public partial class CommandLineWindow : Window
|
||||
{
|
||||
private readonly GlobalizedApplication _globalizer = GlobalizedApplication.Instance;
|
||||
|
||||
public CommandLineWindow(string commandLine)
|
||||
{
|
||||
InitializeComponent();
|
||||
WindowUtils.RemoveDefaultResourceDictionary(this, Config.Default.DefaultGlobalizationFile);
|
||||
|
||||
this.DataContext = commandLine;
|
||||
}
|
||||
|
||||
public TextWrapping OutputTextWrapping
|
||||
{
|
||||
get { return OutputTextBox.TextWrapping; }
|
||||
set { OutputTextBox.TextWrapping = value; }
|
||||
}
|
||||
|
||||
private void CopyToClipboard_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Windows.Clipboard.SetText(this.DataContext as string);
|
||||
MessageBox.Show(_globalizer.GetResourceString("CommandLine_CopyButton_ConfirmLabel"), _globalizer.GetResourceString("CommandLine_CopyButton_ConfirmTitle"), MessageBoxButton.OK);
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show(_globalizer.GetResourceString("CommandLine_CopyButton_ErrorLabel"), _globalizer.GetResourceString("CommandLine_CopyButton_ErrorTitle"), MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue