-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaster.cs
174 lines (143 loc) · 5.39 KB
/
Master.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
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
166
167
168
169
170
171
172
173
174
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;
using System.Diagnostics;
namespace FileSplitter
{
public partial class Master : Form
{
private int childFormNumber = 0;
public Master(string name)
{
InitializeComponent();
label1.Text = name;
}
private void ShowNewForm(object sender, EventArgs e)
{
Form childForm = new Form();
childForm.MdiParent = this;
childForm.Text = "Window " + childFormNumber++;
childForm.Show();
}
private void OpenFile(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
string FileName = openFileDialog.FileName;
}
}
private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
{
string FileName = saveFileDialog.FileName;
}
}
private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void CutToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void ToolBarToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.Cascade);
}
private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.TileVertical);
}
private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.TileHorizontal);
}
private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
{
LayoutMdi(MdiLayout.ArrangeIcons);
}
private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (Form childForm in MdiChildren)
{
childForm.Close();
}
}
private void splitMultimediaToolStripMenuItem_Click(object sender, EventArgs e)
{
splitnjoin join = new splitnjoin(label1.Text);
join.Show();
}
private void folderLockToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void compressToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void encryptToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void shareToolStripMenuItem_Click(object sender, EventArgs e)
{
share f = new share(label1.Text);
f.Show();
}
private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Download d = new Download(label1.Text);
d.Show();
}
private void signoutToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
static DirectoryInfo exeFolder, projectFolder, sampleImagesFolder;
private void zipToolStripMenuItem_Click(object sender, EventArgs e)
{
string codebase = Assembly.GetExecutingAssembly().Location;
exeFolder = new DirectoryInfo(Path.GetDirectoryName(codebase));
projectFolder = exeFolder.Parent.Parent;
sampleImagesFolder = new DirectoryInfo(Path.Combine(projectFolder.FullName, "ZipUnzip.exe"));
Process.Start("ZipUnzip.exe");
}
private void sharetootherToolStripMenuItem_Click(object sender, EventArgs e)
{
shareOld old = new shareOld();
old.Show();
}
private void downloadReceivedFilesToolStripMenuItem_Click(object sender, EventArgs e)
{
Downloadold old = new Downloadold(label1.Text);
old.Show();
}
private void encryptToolStripMenuItem_Click_1(object sender, EventArgs e)
{
howto_crypt_file.Form2 f = new howto_crypt_file.Form2(label1.Text);
f.Show();
}
}
}