CommonLib/UI/BaseWindow.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Windows.Media;
namespace CommonLib
{
public class BaseWindow : Window
{
ResourceDictionary style1;
bool closeStoryBoardCompleted = false;
DoubleAnimation closeAnimation1;
public BaseWindow()
{
style1 = new ResourceDictionary();
style1.Source = new Uri("CommonLib;component/UI/BaseWindowStyle.xaml", UriKind.Relative);
InitializeStyle();
this.Loaded += delegate
{
InitializeEvent();
};
this.Closing += new System.ComponentModel.CancelEventHandler(BaseWindow_Closing);
}
private void InitializeStyle()
{
this.Style = (System.Windows.Style)style1["BaseWindowStyle"];
}
private void InitializeEvent()
{
ControlTemplate baseWindowTemplate1 = (ControlTemplate)style1["BaseWindowControlTemplate"];
//Button minBtn = (Button)baseWindowTemplate.FindName("btnMin", this);
//minBtn.Click += delegate
//{
// this.WindowState = WindowState.Minimized;
//};
//Button maxBtn = (Button)baseWindowTemplate.FindName("btnMax", this);
//maxBtn.Click += delegate
//{
// this.WindowState = (this.WindowState == WindowState.Normal ? WindowState.Maximized : WindowState.Normal);
//};
Button closeBtn = (Button)baseWindowTemplate1.FindName("btnClose", this);
closeBtn.Click += delegate
{
this.Close();
};
Border borderTitle = (Border)baseWindowTemplate1.FindName("borderTitle", this);
borderTitle.MouseMove += delegate(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
后面还有 38 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。