-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDecompress.cs
104 lines (88 loc) · 2.73 KB
/
Decompress.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
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 File_Compression
{
public partial class Decompress : Form
{
private bool mouseDown;
private Point lastLocation;
OpenFileDialog open = new OpenFileDialog();
public Decompress()
{
InitializeComponent();
}
private void Decompress_MouseMove(object sender, MouseEventArgs e)
{
if (mouseDown)
{
this.Location = new Point(
(this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
this.Update();
}
}
private void Decompress_MouseDown(object sender, MouseEventArgs e)
{
mouseDown = true;
lastLocation = e.Location;
}
private void Decompress_MouseUp(object sender, MouseEventArgs e)
{
mouseDown = false;
}
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
if (mouseDown)
{
this.Location = new Point(
(this.Location.X - lastLocation.X) + e.X, (this.Location.Y - lastLocation.Y) + e.Y);
this.Update();
}
}
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
mouseDown = true;
lastLocation = e.Location;
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
mouseDown = false;
}
private void buttonclose_Click(object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
private void buttonmin_Click(object sender, EventArgs e)
{
if (this.WindowState != FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Minimized;
}
}
private void back2_Click(object sender, EventArgs e)
{
Form1 form = new Form1();
form.Show();
this.Hide();
}
private void Decompress_Load(object sender, EventArgs e)
{
}
private void dupload_Click(object sender, EventArgs e)
{
open.Filter = "Rar File|*.rar|Zip File|*.zip";
open.Multiselect = true;
if(open.ShowDialog()==DialogResult.OK)
{
txtdeupload.Text = open.FileName;
}
}
}
}