-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCloseF.cs
More file actions
165 lines (150 loc) · 4.91 KB
/
CloseF.cs
File metadata and controls
165 lines (150 loc) · 4.91 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
using System;
using System.Windows.Forms;
namespace creaturevisualizer
{
sealed class CloseF
: Form
{
internal enum InstanceType
{
blueprint,
instance
}
#region cTor
/// <summary>
/// Returns:
/// cancel = 'DialogResult.Cancel'
/// lose = 'DialogResult.Ignore'
/// apply = 'DialogResult.OK'
/// save = 'DialogResult.Yes'
/// @note A stock resource cannot be autosaved.
/// @note This dialog cannot be cancelled (ie. cannot return to state)
/// if it is invoked because the instance is changing. That is, the
/// instance *is* going to change, at present.
/// </summary>
/// <param name="type"></param>
/// <param name="cancancel"></param>
/// <param name="hasresdir"></param>
internal CloseF(InstanceType type, bool cancancel, bool hasresdir)
{
InitializeComponent();
if (!cancancel)
{
DialogResult = DialogResult.Ignore;
bu_cancel.Enabled = false;
}
else
DialogResult = DialogResult.Cancel;
bu_apply.Enabled = hasresdir;
switch (type)
{
case InstanceType.blueprint:
bu_apply.Text += "blueprint";
break;
case InstanceType.instance:
bu_apply.Text += "instance";
break;
}
}
#endregion cTor
#region Designer
Label la_head;
Button bu_cancel;
Button bu_ignore;
Button bu_save;
Button bu_apply;
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The
/// Forms designer might not be able to load this method if it was
/// changed manually.
/// </summary>
private void InitializeComponent()
{
this.la_head = new System.Windows.Forms.Label();
this.bu_cancel = new System.Windows.Forms.Button();
this.bu_ignore = new System.Windows.Forms.Button();
this.bu_save = new System.Windows.Forms.Button();
this.bu_apply = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// la_head
//
this.la_head.Dock = System.Windows.Forms.DockStyle.Top;
this.la_head.Location = new System.Drawing.Point(0, 0);
this.la_head.Margin = new System.Windows.Forms.Padding(0);
this.la_head.Name = "la_head";
this.la_head.Size = new System.Drawing.Size(238, 20);
this.la_head.TabIndex = 0;
this.la_head.Text = "The creature is changed ...";
this.la_head.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
//
// bu_cancel
//
this.bu_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.bu_cancel.Location = new System.Drawing.Point(4, 25);
this.bu_cancel.Margin = new System.Windows.Forms.Padding(0);
this.bu_cancel.Name = "bu_cancel";
this.bu_cancel.Size = new System.Drawing.Size(230, 25);
this.bu_cancel.TabIndex = 1;
this.bu_cancel.Text = "Stop the presses";
this.bu_cancel.UseVisualStyleBackColor = true;
//
// bu_ignore
//
this.bu_ignore.DialogResult = System.Windows.Forms.DialogResult.Ignore;
this.bu_ignore.Location = new System.Drawing.Point(4, 50);
this.bu_ignore.Margin = new System.Windows.Forms.Padding(0);
this.bu_ignore.Name = "bu_ignore";
this.bu_ignore.Size = new System.Drawing.Size(230, 25);
this.bu_ignore.TabIndex = 2;
this.bu_ignore.Text = "Lose changes";
this.bu_ignore.UseVisualStyleBackColor = true;
//
// bu_save
//
this.bu_save.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.bu_save.Location = new System.Drawing.Point(4, 100);
this.bu_save.Margin = new System.Windows.Forms.Padding(0);
this.bu_save.Name = "bu_save";
this.bu_save.Size = new System.Drawing.Size(230, 25);
this.bu_save.TabIndex = 4;
this.bu_save.Text = "save Creature to file ...";
this.bu_save.UseVisualStyleBackColor = true;
//
// bu_apply
//
this.bu_apply.DialogResult = System.Windows.Forms.DialogResult.OK;
this.bu_apply.Location = new System.Drawing.Point(4, 75);
this.bu_apply.Margin = new System.Windows.Forms.Padding(0);
this.bu_apply.Name = "bu_apply";
this.bu_apply.Size = new System.Drawing.Size(230, 25);
this.bu_apply.TabIndex = 3;
this.bu_apply.Text = "Apply to selected ";
this.bu_apply.UseVisualStyleBackColor = true;
//
// CloseF
//
this.AcceptButton = this.bu_cancel;
this.CancelButton = this.bu_cancel;
this.ClientSize = new System.Drawing.Size(238, 129);
this.Controls.Add(this.bu_apply);
this.Controls.Add(this.bu_save);
this.Controls.Add(this.bu_ignore);
this.Controls.Add(this.bu_cancel);
this.Controls.Add(this.la_head);
this.Font = new System.Drawing.Font("Consolas", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "CloseF";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Changed";
this.ResumeLayout(false);
}
#endregion Designer
}
}
*/