-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.cs
109 lines (86 loc) · 2.99 KB
/
Form1.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
103
104
105
106
107
108
109
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinFormAdv32
{
public partial class Form1 : Form
{
public static int PROGRESS_BAR_STEP = 10;
public Form1()
{
InitializeComponent();
}
private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
private void 새창ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 다음찾ㄱ기ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 글꼬ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void toolStripStatusLabel1_Click(object sender, EventArgs e)
{
}
private void 끝내기ToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void 새로만들기ToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox1.Text = "새로 만들기 메뉴를 선택하였습니다.";
}
private void 도움말보기ToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://support.microsoft.com/ko-kr/windows/%EB%A9%94%EB%AA%A8%EC%9E%A5%EC%9D%98-%EB%8F%84%EC%9B%80%EB%A7%90-4d68c388-2ff2-0e7f-b706-35fb2ab88a8c");
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void 열기ToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "텍스트 파일(*.txt)|*.txt|모든 파일(*.*)|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
textBox1.Text = System.IO.File.ReadAllText(ofd.FileName);
}
}
private void 확대하기축소하기기본값복원ToolStripMenuItem_Click(object sender, EventArgs e)
{
toolStripProgressBar1.Value = 50;
}
private void 확대ToolStripMenuItem_Click(object sender, EventArgs e)
{
// 진행바의 max가 100이라서
if (toolStripProgressBar1.Value + PROGRESS_BAR_STEP >= 100)
{
toolStripProgressBar1.Value = 100;
} else
{
toolStripProgressBar1.Value += PROGRESS_BAR_STEP;
}
}
private void 축소ToolStripMenuItem_Click(object sender, EventArgs e)
{
// 진행바의 min이 100이라서
if (toolStripProgressBar1.Value < PROGRESS_BAR_STEP)
{
toolStripProgressBar1.Value = 0;
} else
{
toolStripProgressBar1.Value -= PROGRESS_BAR_STEP;
}
}
}
}