48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace OfficeFlow
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
if (CheckFirstLaunch())
|
|
{
|
|
MainFrame.Navigate(new Pages.StartupPages.InitializeDataPage());
|
|
}
|
|
|
|
}
|
|
|
|
public bool CheckFirstLaunch()
|
|
{
|
|
var users = App.Entities.Users.Count();
|
|
|
|
return users == 0;
|
|
}
|
|
|
|
|
|
private void MainFrame_Navigated(object sender, NavigationEventArgs e)
|
|
{
|
|
Title = "OfficeFlow: " + (e.Content as Page).Title;
|
|
}
|
|
}
|
|
}
|