64 lines
1.7 KiB
C#
64 lines
1.7 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.Shapes;
|
|
|
|
namespace CeramicProjectTool
|
|
{
|
|
/// <summary>
|
|
/// MainWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
private readonly Dictionary<string, Page> pageList = new Dictionary<string, Page>
|
|
{
|
|
{"configPage", new Pages.ModelConfigPage() },
|
|
{"permissionPage", new Pages.PermissionConfigPage() }
|
|
};
|
|
|
|
private string currentPage = "configPage";
|
|
private void menuOpen_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void ModelConfigButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
if (currentPage == "configPage")
|
|
{
|
|
return;
|
|
}
|
|
MainFrame.Navigate(pageList["configPage"]);
|
|
currentPage = "configPage";
|
|
}
|
|
|
|
private void PermissionConfigButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
if (currentPage == "permissionPage")
|
|
{
|
|
return;
|
|
}
|
|
MainFrame.Navigate(pageList["permissionPage"]);
|
|
currentPage = "permissionPage";
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
MainFrame.Navigate(pageList["configPage"]);
|
|
}
|
|
}
|
|
}
|