Squashed 'FSI.Lib/' content from commit 6aa4846
git-subtree-dir: FSI.Lib git-subtree-split: 6aa48465a834a7bfdd9cbeae8d2e4f769d0c0ff8
This commit is contained in:
64
FSI.Lib/Guis/Prj.Mgt/FrmMain.xaml.cs
Normal file
64
FSI.Lib/Guis/Prj.Mgt/FrmMain.xaml.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using FSI.Lib.Guis.Prj.Mgt.ViewModel;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace FSI.Lib.Guis.Prj.Mgt
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für Main.xaml
|
||||
/// </summary>
|
||||
public partial class FrmMain : Window
|
||||
{
|
||||
public ViewModelPrj Prj { get; set; }
|
||||
public bool ShowPdf { get; set; }
|
||||
public bool CloseAtLostFocus { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string[] EplExes { get; set; }
|
||||
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Loaded += Main_Loaded;
|
||||
Deactivated += FrmMain_Deactivated;
|
||||
}
|
||||
|
||||
private void FrmMain_Deactivated(object sender, System.EventArgs e)
|
||||
{
|
||||
if (CloseAtLostFocus)
|
||||
Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
private void Main_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (ShowPdf)
|
||||
{
|
||||
Title = "FSI PDF-Auswahl";
|
||||
}
|
||||
else
|
||||
{
|
||||
Title = "FSI Epl Projektauswahl";
|
||||
}
|
||||
|
||||
Title += " v" + Assembly.GetExecutingAssembly().GetName().Version; // Version in Titel eintragen
|
||||
|
||||
Prj = new ViewModelPrj(new PrjDataProvider())
|
||||
{
|
||||
DataPath = Path,
|
||||
ShowPdf = ShowPdf,
|
||||
EplExes = EplExes,
|
||||
};
|
||||
DataContext = Prj;
|
||||
|
||||
Prj.Load();
|
||||
}
|
||||
|
||||
private void tbSearch_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
tbSearch.Select(tbSearch.Text.Length, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user