添加项目文件。

This commit is contained in:
xyy
2026-05-04 14:46:58 +08:00
parent c6f78782dc
commit 9ca9bc2f12
56 changed files with 14562 additions and 0 deletions

50
Main.xaml.cs Normal file
View File

@@ -0,0 +1,50 @@
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 ShanghaiEnvironmentalTechnology
{
/// <summary>
/// Main.xaml 的交互逻辑
/// </summary>
public partial class Main : Window
{
public Main()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
string imagePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources/sleep2.jpg");
ImageBrush brush = new ImageBrush();
brush.ImageSource = new BitmapImage(new Uri(imagePath, UriKind.Absolute));
this.Background = brush;
}
/// <summary>
/// 进入主窗体事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Button_Click(object sender, RoutedEventArgs e)
{
MainWindow mainWindow = MainWindow.Instance;
mainWindow.ShowDialog(); // 显示 MainWindow
this.Close(); // 如果您希望在打开新窗口时关闭当前窗口
}
}
}