-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinitForm.cs
More file actions
81 lines (71 loc) · 2.36 KB
/
initForm.cs
File metadata and controls
81 lines (71 loc) · 2.36 KB
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
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;
using MundoMusical.DB;
using System.Threading;
using MundoMusical.EFFECTS;
namespace MundoMusical.ATOM
{
public partial class initForm : BaseForm
{
private dbop DB;
public initForm()
{
InitializeComponent();
this.DB = new dbop();
this.Shown += (a, b) => { this.effectOpen(); };
}
private void effectOpen()
{
xfe.blendOpen(this,1000);
}
private void effectClose()
{
xfe.blend(this,1000);
}
private void initForm_Load(object sender, EventArgs e)
{
this.timer.Enabled = true;
}
private void timer_Tick(object sender, EventArgs e)
{
if(this.progressBar1.Value == 7)
{
if (!this.DB.checkDB())
{
this.timer.Enabled = false;
genericDefinitions.error("Error con conexión a la base de datos del sistema.\n >Nota:'Contacte al desarrollador'", "Interops Service");
this.Close();
}
if(Screen.PrimaryScreen.WorkingArea.Height < 1040)
{
this.timer.Enabled = false;
genericDefinitions.dangerInfo("-La resolución de pantalla recomendada es 1920 x 1080 Pixeles.\n-Nota:El sistema puede presentar inconvenientes en resoluciones bajas.");
this.timer.Enabled = true;
}
}
if(this.progressBar1.Value == 15)
{
this.effectClose();
this.Close();
Thread nov = new Thread(this.new_PROCESSWNDPROC);
nov.SetApartmentState(ApartmentState.STA);
nov.Start();
}
else
{
this.progressBar1.Value += 1;
}
}
private void new_PROCESSWNDPROC()
{
Application.Run(new Login1());
}
}
}