You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
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;
using SparkClient.ViewModel.BaseWindow;
namespace SparkClient.Views.Dialog
{
/// <summary>
/// LoadingDialog.xaml 的交互逻辑
/// </summary>
public partial class LoadingDialog : Window
{
private Window parentWindow;
public LoadingDialog(string DiaCode)
{
InitializeComponent();
this.MinWidth = 1000;
this.MinHeight = 1000;
this.WindowState = WindowState.Maximized;
if (string.IsNullOrWhiteSpace(DiaCode))
{
DCodeTextBlock.Visibility = Visibility.Hidden;
DCodeTextBlock.Text = "";
}
else
{
DCodeTextBlock.Text = DiaCode;
}
parentWindow = WindowManager.MainWindow;
}
public void setValue(int i)
{
ProgressBar.Value = i;
}
private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
this.WindowState = WindowState.Minimized;
}
private void LoadingDialog_OnStateChanged(object? sender, EventArgs e)
{
if(parentWindow != null)parentWindow.WindowState = WindowState;
}
private void LoadingDialog_OnSizeChanged(object sender, SizeChangedEventArgs e)
{
}
}
}