唐召明
authored
|
1
|
using HHECS.DAQClient.ViewModel;
|
唐召明
authored
|
2
3
|
using Microsoft.Extensions.DependencyInjection;
using System.ComponentModel;
|
唐召明
authored
|
4
|
using System.Configuration;
|
唐召明
authored
|
5
6
|
using System.Windows;
|
唐召明
authored
|
7
|
namespace HHECS.DAQClient
|
唐召明
authored
|
8
9
10
11
12
13
14
15
16
17
|
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = App.Current.Services.GetService<MainVM>();
|
唐召明
authored
|
18
19
20
21
22
23
24
|
_ = bool.TryParse(ConfigurationManager.AppSettings["IsProductionEnvironment"], out var isProductionEnvironment);
if (!isProductionEnvironment)
{
var txt = "(测试版)";
this.Title += txt;
NotifyIconContextContent.Text += txt;
}
|
唐召明
authored
|
25
26
27
28
29
30
31
32
33
|
}
protected override void OnClosing(CancelEventArgs e)
{
this.Hide();
e.Cancel = true;
}
}
}
|