-
Notifications
You must be signed in to change notification settings - Fork 0
/
AboutDialog.cs
102 lines (90 loc) · 3.07 KB
/
AboutDialog.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Type: Intel.Mobile.WiMAXCU.UI.Dashboard.AboutDialog
// Assembly: WiMAXCU, Version=6.2.4357.25644, Culture=neutral, PublicKeyToken=null
// MVID: 3C622363-C72C-43B7-9311-DD8942A58F18
// Assembly location: E:\Extracted\program files\Intel\WiMAX\Bin\WiMAXCU.exe
using Intel.Mobile.WiMAXCU.Common;
using Intel.Mobile.WiMAXCU.UI.CustomControls;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Intel.Mobile.WiMAXCU.UI.Dashboard
{
public class AboutDialog : CustomForm
{
private static AboutDialog _instance = new AboutDialog();
private static AboutPanel _aboutPanel;
private IContainer components;
public static AboutDialog Singleton
{
get
{
return AboutDialog._instance;
}
}
static AboutDialog()
{
}
public AboutDialog()
{
this.InitializeComponent();
this.CustomInitializeComponents();
ScalingUtils.ScaleControlHierarchy((Control) this);
}
public void ReinitDialog()
{
AboutDialog._aboutPanel.SquirrelInfo();
}
protected override void OnVisibleChanged(EventArgs e)
{
if (this.Visible)
AboutDialog._aboutPanel.InitPanel();
else
AboutDialog._aboutPanel.CleanUp();
base.OnVisibleChanged(e);
}
private void OnKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Escape)
return;
this.Close();
}
private void CustomInitializeComponents()
{
this.AccessibleName = "AboutDialog";
this.KeyDown += new KeyEventHandler(this.OnKeyDown);
this.BackColor = CustomForm.FormBackColor;
if (AboutDialog._aboutPanel == null)
{
AboutDialog._aboutPanel = new AboutPanel();
AboutDialog._aboutPanel.Location = new Point(ImageHelper.Unscaled.FrameLeftPixel.Width, ImageHelper.Unscaled.FrameTopPixel.Height);
this.Controls.Add((Control) AboutDialog._aboutPanel);
}
this.SetSize();
}
public void SetSize()
{
this.Size = new Size(AboutDialog._aboutPanel.Width + ImageHelper.Unscaled.FrameLeftPixel.Width + ImageHelper.Unscaled.FrameRightPixel.Width, AboutDialog._aboutPanel.Height + ImageHelper.Unscaled.FrameTopPixel.Height + ImageHelper.Unscaled.FrameBottomPixel.Height);
this.Invalidate();
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
}
private void InitializeComponent()
{
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (AboutDialog));
this.SuspendLayout();
this.AutoScaleMode = AutoScaleMode.Inherit;
componentResourceManager.ApplyResources((object) this, "$this");
this.ForeColor = Color.Black;
this.FormType = FormTypeEnum.Dialog;
this.KeyPreview = true;
this.Name = "AboutDialog";
this.ShowInTaskbar = false;
this.ResumeLayout(false);
}
}
}