Files
GenericTeProgramLibrary/Source/Program/GUI/View/DataLocationWindow.xaml.cs
2025-10-24 15:18:11 -07:00

82 lines
2.9 KiB
C#

/*-------------------------------------------------------------------------
// 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}");
}
}
}