Major upgrade
This commit is contained in:
81
Source/Program/GUI/View/DataLocationWindow.xaml.cs
Normal file
81
Source/Program/GUI/View/DataLocationWindow.xaml.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
// UNCLASSIFIED
|
||||
/*-------------------------------------------------------------------------
|
||||
RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION
|
||||
PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS
|
||||
AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT. DISCLOSURE TO
|
||||
UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO
|
||||
RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS
|
||||
CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS
|
||||
OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON
|
||||
COMPANY.
|
||||
|
||||
THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S.
|
||||
GOVERNMENT.
|
||||
|
||||
UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
|
||||
-------------------------------------------------------------------------*/
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using NLog;
|
||||
|
||||
namespace ProgramLib.GUI.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DataLocationWindow.xaml
|
||||
/// </summary>
|
||||
internal partial class DataLocationWindow : Window
|
||||
{
|
||||
private ILogger _logger;
|
||||
|
||||
public DataLocationWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
Uri iconUri = new Uri($"pack://application:,,,/{GetType().Assembly.GetName().Name};component/Resources/Icons/app.ico");
|
||||
this.Icon = BitmapFrame.Create(iconUri);
|
||||
|
||||
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
|
||||
|
||||
uutDataLocationTb.Text = Program.Instance().FileAndFolderManager.GetFolder(FileAndFolderManager.Folders.DATA_TEST);
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnMax_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.WindowState == WindowState.Maximized)
|
||||
{
|
||||
this.WindowState = WindowState.Normal;
|
||||
imgMax.Source = new BitmapImage(new System.Uri($"pack://application:,,,/{GetType().Assembly.GetName().Name};component/Resources/Images/Title_Bar_Buttons/maximize.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WindowState = WindowState.Maximized;
|
||||
imgMax.Source = new BitmapImage(new System.Uri($"pack://application:,,,/{GetType().Assembly.GetName().Name};component/Resources/Images/Title_Bar_Buttons/restore.png"));
|
||||
}
|
||||
}
|
||||
|
||||
private void btnMin_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.WindowState = WindowState.Minimized;
|
||||
}
|
||||
|
||||
private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void uutDataLocationBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Process.Start(@$"{uutDataLocationTb.Text}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user