-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbaseformextends.cs
75 lines (68 loc) · 2.39 KB
/
baseformextends.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
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 MundoMusical.XBASE
{
public partial class baseformextends : BaseForm
{
protected Central2 central;
protected bool listenerSIZE = true;
protected Point onInit;
protected int width, height;
public baseformextends()
{
this.exitFlag = exitState.highest;
InitializeComponent();
if (!DesignMode)
{
if (genericDefinitions.WND_BOTTOM != 0)
{
this.stopBounds();
}
}
}
private void blapse_Click(object sender, EventArgs e)
{
if (this.listenerSIZE)
{
this.maximiza();
}
else
{
this.minimiza();
}
}
protected void maximiza()
{
this.listenerSIZE = false;
this.Height = (this.central.Height - this.central.menuStrip1.Height - this.central.panel1.Height) - 20;
this.Width = this.central.Width - 40;
this.Location = new Point((this.central.Width - this.Width) / 2, this.central.Location.Y);
this.blapse.BackgroundImage = global::MundoMusical.Properties.Resources.minimize;
this.toolTipBASE.SetToolTip(this.blapse, "Minimizar");
this.pb.Location = new Point(this.Width / 2, this.pb.Location.Y);
}
protected void minimiza()
{
this.blapse.BackgroundImage = global::MundoMusical.Properties.Resources.maximize;
this.toolTipBASE.SetToolTip(this.blapse, "Maximizar");
this.listenerSIZE = true;
this.Width = this.width;
this.Height = this.height;
this.Location = this.onInit;
this.pb.Location = new Point(this.Width / 2 - (this.blapse.Width * 2), this.pb.Location.Y);
}
private void baseformextends_Load(object sender, EventArgs e)
{
this.onInit = new Point(this.Location.X, this.Location.Y);
this.width = this.Width;
this.height = this.Height;
}
}
}