Squashed 'FSI.Lib/' content from commit dceb500

git-subtree-dir: FSI.Lib
git-subtree-split: dceb5008a2176c2b8ab5e55a73b1c25d31a7f841
This commit is contained in:
maier_S
2022-03-14 11:02:41 +01:00
commit 1a74bce2ad
51 changed files with 6124 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
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 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)
{
string path;
if (ShowPdf)
{
Title = "FSI PDF-Auswahl";
path = Settings.Setting<string>("Epl.Pdf.Path");
}
else
{
Title = "FSI Epl Projektauswahl";
path = Settings.Setting<string>("Epl.Prj.Path");
}
Title += " v" + Assembly.GetExecutingAssembly().GetName().Version; // Version in Titel eintragen
Prj = new ViewModelPrj(new PrjDataProvider())
{
DataPath = path,
ShowPdf = ShowPdf,
};
DataContext = Prj;
Prj.Load();
}
private void tbSearch_TextChanged(object sender, TextChangedEventArgs e)
{
tbSearch.Select(tbSearch.Text.Length, 0);
}
}
}