using ServerManagerTool.Common.Lib;
using ServerManagerTool.Common.Utils;
using System;
using System.Net;
using System.Windows;
using System.Windows.Input;
using WPFSharp.Globalizer;
namespace ServerManagerTool
{
///
/// Interaction logic for OpenRCONWindow.xaml
///
public partial class OpenRCONWindow : Window
{
private GlobalizedApplication _globalizer = GlobalizedApplication.Instance;
public string ServerIP
{
get { return (string)GetValue(ServerIPProperty); }
set { SetValue(ServerIPProperty, value); }
}
public static readonly DependencyProperty ServerIPProperty = DependencyProperty.Register(nameof(ServerIP), typeof(string), typeof(OpenRCONWindow), new PropertyMetadata(IPAddress.Loopback.ToString()));
public int RCONPort
{
get { return (int)GetValue(RCONPortProperty); }
set { SetValue(RCONPortProperty, value); }
}
public static readonly DependencyProperty RCONPortProperty = DependencyProperty.Register(nameof(RCONPort), typeof(int), typeof(OpenRCONWindow), new PropertyMetadata(32330));
public string Password
{
get { return (string)GetValue(PasswordProperty); }
set { SetValue(PasswordProperty, value); }
}
public static readonly DependencyProperty PasswordProperty = DependencyProperty.Register(nameof(Password), typeof(string), typeof(OpenRCONWindow), new PropertyMetadata(String.Empty));
public OpenRCONWindow()
{
InitializeComponent();
WindowUtils.RemoveDefaultResourceDictionary(this, Config.Default.DefaultGlobalizationFile);
LoadDefaults();
this.DataContext = this;
}
public ICommand ConnectCommand => new RelayCommand