-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmExportPictureOptions.cs
76 lines (70 loc) · 2.19 KB
/
frmExportPictureOptions.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinAGI.Engine;
using static WinAGI.Engine.Base;
namespace WinAGI.Editor {
public partial class frmExportPictureOptions : Form {
public int FormMode;
public frmExportPictureOptions(int mode) {
// mode = 0: allow choice of export
// mode = 1: force image export only
InitializeComponent();
// default is bitmap
cmbFormat.SelectedIndex = 0;
FormMode = mode;
switch (FormMode) {
case 0:
// allow choice
fraChoice.Visible = true;
optResource.Checked = true;
Height = 115;
break;
case 1:
// image only
fraChoice.Visible = false;
fraImage.Top -= 58;
lblFormat.Top -= 58;
cmbFormat.Top -= 58;
lblScale.Top -= 58;
udZoom.Top -= 58;
lblBoth.Top -= 58;
optImage.Checked = true;
Height = 196;
break;
}
}
#region Event Handlers
private void OKButton_Click(object sender, EventArgs e) {
//ok!
DialogResult = DialogResult.OK;
this.Visible = false;
}
private void CancelButton_Click(object sender, EventArgs e) {
// canceled..
DialogResult = DialogResult.Cancel;
this.Visible = false;
}
private void optImageFormat(object sender, EventArgs e) {
// shrink/expand form as needed
if (optResource.Checked) {
this.Height = 115;
}
else {
this.Height = 254;
}
}
private void optImageType_CheckedChanged(object sender, EventArgs e) {
//show priority image tip label if both is selected
lblBoth.Visible = optBoth.Checked;
}
#endregion
}
}