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
| namespace LasteraClient
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class FormAutorization : Form
{
private int i = 5;
private string userlogin;
private string userpass;
private IContainer components = null;
private Button cmdEnter;
private Button cmdCalcel;
private Label lblNickName;
private Label label2;
private Timer timer;
private LinkLabel linkLabel1;
public FormAutorization()
{
try
{
this.InitializeComponent();
this.timer.Enabled = !string.IsNullOrEmpty(Settings.Default.Login);
this.lblNickName.Text = Settings.Default.Login;
this.userlogin = Settings.Default.Login;
this.userpass = Settings.Default.Password;
}
catch
{
Application.Exit();
}
}
private void cmdCalcel_Click(object sender, EventArgs e)
{
if (this.cmdCalcel.Text == "Отмена")
{
this.timer.Enabled = false;
this.cmdCalcel.Text = "Выход";
}
else
{
Application.Exit();
}
}
private void cmdEnter_Click(object sender, EventArgs e)
{
this.NextShow();
}
protected override void Dispose(bool disposing)
{
#pragma warning disable CS0019 // Оператор ">" невозможно применить к операнду типа "IContainer" и "<NULL>".
#pragma warning disable CS0019 // Оператор ">" невозможно применить к операнду типа "IContainer" и "<NULL>".
if (disposing && (this.components > null))
#pragma warning restore CS0019 // Оператор ">" невозможно применить к операнду типа "IContainer" и "<NULL>".
#pragma warning restore CS0019 // Оператор ">" невозможно применить к операнду типа "IContainer" и "<NULL>".
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new Container();
ComponentResourceManager manager = new ComponentResourceManager(typeof(FormAutorization));
this.cmdEnter = new Button();
this.cmdCalcel = new Button();
this.lblNickName = new Label();
this.label2 = new Label();
this.timer = new Timer(this.components);
this.linkLabel1 = new LinkLabel();
base.SuspendLayout();
this.cmdEnter.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xcc);
this.cmdEnter.Location = new Point(9, 0x4e);
this.cmdEnter.Name = "cmdEnter";
this.cmdEnter.Size = new Size(0xc4, 0x18);
this.cmdEnter.TabIndex = 0;
this.cmdEnter.Text = "Автовход через 5 сек";
this.cmdEnter.UseVisualStyleBackColor = true;
this.cmdEnter.Click += new EventHandler(this.cmdEnter_Click);
this.cmdCalcel.Location = new Point(0xd5, 0x4e);
this.cmdCalcel.Name = "cmdCalcel";
this.cmdCalcel.Size = new Size(0x55, 0x18);
this.cmdCalcel.TabIndex = 1;
this.cmdCalcel.Text = "Отмена";
this.cmdCalcel.UseVisualStyleBackColor = true;
this.cmdCalcel.Click += new EventHandler(this.cmdCalcel_Click);
this.lblNickName.AutoSize = true;
this.lblNickName.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Bold, GraphicsUnit.Point, 0xcc);
this.lblNickName.Location = new Point(0x72, 13);
this.lblNickName.Name = "lblNickName";
this.lblNickName.Size = new Size(0, 15);
this.lblNickName.TabIndex = 2;
this.label2.AutoSize = true;
this.label2.Location = new Point(0x71, 0x2c);
this.label2.Name = "label2";
this.label2.Size = new Size(0x4c, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Входит в игру";
this.timer.Interval = 0x3e8;
this.timer.Tick += new EventHandler(this.timer_Tick);
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new Point(0xe3, 15);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new Size(50, 13);
this.linkLabel1.TabIndex = 4;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Удалить";
this.linkLabel1.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(0x133, 0x6d);
base.Controls.Add(this.linkLabel1);
base.Controls.Add(this.label2);
base.Controls.Add(this.lblNickName);
base.Controls.Add(this.cmdCalcel);
base.Controls.Add(this.cmdEnter);
base.Icon = (Icon)manager.GetObject("$this.Icon");
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "FormAutorization";
base.ShowInTaskbar = false;
base.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Автовход в игру";
base.TopMost = true;
base.ResumeLayout(false);
base.PerformLayout();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
base.Hide();
this.timer.Enabled = false;
Settings.Default.Reset();
MessageBox.Show("Персонаж удален", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
Application.Exit();
}
private void NextShow()
{
try
{
this.timer.Enabled = false;
Client client = new Client();
base.Hide();
client.Show();
}
catch
{
Application.Exit();
}
}
private void timer_Tick(object sender, EventArgs e)
{
if (this.i <= 0)
{
this.timer.Enabled = false;
this.NextShow();
}
else
{
this.i--;
this.cmdEnter.Text = string.Format("Автовход через {0} сек", this.i);
}
}
}
} |