Files
CustomerPanel-Test/forms/configInfo.xaml.cs

81 lines
2.8 KiB
C#

using System;
using System.Windows;
using C4IT_CustomerPanel.libs;
using System.Diagnostics;
namespace C4IT_CustomerPanel.forms
{
/// <summary>
/// Interaktionslogik für configInfo.xaml
/// </summary>
public partial class ConfigInfo
{
private ConfigClass conf;
public ConfigInfo()
{
InitializeComponent();
Left = FormHelper.CenterOfScreen().X;
Top = FormHelper.CenterOfScreen().Y;
Topmost = true;
Focus();
}
public void SetConfigInfo(ConfigClass config)
{
TxtMatrixServer.Text = config.GetMatrixServer(false);
TxtUpdateIntervalTickets.Text = config.GetTimerIntervalTicket().ToString();
TxtUpdateIntervalRegularAnnouncements.Text = config.GetTimerIntervalRegular().ToString();
TxtUpdateIntervalAdHocAnnouncements.Text = config.GetTimerIntervalAdHoc().ToString();
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fvi.ProductVersion;
TxtCopyRight.Text = "© Copyright " + DateTime.Now.Year ;
TxtVersion.Text = "Version: " + version;
Title = Title + " " + DateTime.Now.Year + " / Version: "+version;
conf = config;
}
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}
private void OnCcClicked(object sender, EventArgs e)
{
string cc = @"Icon Creator & Copyright - Austin Andrews (@templarian)
License - https://creativecommons.org/licenses/by/3.0/
Link to material - http://modernuiicons.com/
";
MessageBox.Show(cc,"Additional Copyrights");
}
private void Header_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed)
DragMove();
}
private void OnCloseButtonClick(object sender, RoutedEventArgs e)
{
Close();
}
private void ConfigInfo_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == System.Windows.Input.Key.Escape)
Close();
}
private void Button_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
}
}
}