-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.cs
209 lines (173 loc) · 6.2 KB
/
Form1.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
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 AudioRecognition.DAL;
using AudioRecognition.Model;
using AudioRecognition.UI;
namespace AudioRecognition
{
public partial class Form1 : Form
{
public static Form1 f = null;
public static User user;
public Form1()
{
InitializeComponent();
f = this;
user = new User("2", "2");
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click_2(object sender, EventArgs e)
{
CreateDB createDB = new CreateDB();
}
private void 退出登录ToolStripMenuItem_Click(object sender, EventArgs e)
{
Register register = new Register();
register.Show();
}
private void button2_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbSRR dbSRR = new DbSRR();
ShortRecognitionResult shortRecognition =
new ShortRecognitionResult("aaaa","a","a", DateTime.Now);
shortRecognition.UserName = user.Username;
//dbSRR.AddSRR(shortRecognition, user);
//dbSRR.GetSRRByUser(user);
Console.WriteLine(dbSRR.DeleteSRR("aaa"));
}
private void 登录ToolStripMenuItem_Click(object sender, EventArgs e)
{
Login login = new Login();
login.Show();
}
private void button3_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbSRR dbSRR = new DbSRR();
ShortRecognitionResult shortRecognition =
new ShortRecognitionResult("aaaaaaaa", "a", "a", DateTime.Now, user.Username);
dbSRR.AddSRR(shortRecognition);
}
private void button4_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbLRR dbLRR = new DbLRR();
LiveRecognitionResult lrr = new LiveRecognitionResult("32d","fi","fdsa","fid",DateTime.Now,user.Username);
Console.WriteLine(dbLRR.AddLRR(lrr));
}
private void button5_Click(object sender, EventArgs e)
{
DbLRR dbLRR = new DbLRR();
User user = new User("2", "2");
dbLRR.GetLRRByUser(user);
//Console.WriteLine(dbLRR.AddLRR(lrr));
}
private void button6_Click(object sender, EventArgs e)
{
DbLRR dbLRR = new DbLRR();
dbLRR.DeleteLRR("32d");
}
private void button7_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbFRR dbFRR = new DbFRR();
FlashRecognitionResult frr = new FlashRecognitionResult("adsf","dsf","dfs","dsfa",DateTime.Now,user.Username);
dbFRR.AddFRR(frr);
}
private void button8_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbFRR dbFRR = new DbFRR();
//dbFRR.GetFRRByUser(user);
}
private void button9_Click(object sender, EventArgs e)
{
DbFRR dbFRR = new DbFRR();
dbFRR.DeleteFRR("adsf");
}
private void button10_Click(object sender, EventArgs e)
{
User user = new User("2", "2");
DbSecret dbSecret = new DbSecret();
dbSecret.GetSecByUser(user);
}
private void button11_Click(object sender, EventArgs e)
{
DbSecret dbSecret = new DbSecret();
Secret secret = new Secret("fds","fdsg","fid","2");
dbSecret.AddSec(secret);
}
private void button12_Click(object sender, EventArgs e)
{
DbSecret dbSecret = new DbSecret();
Secret secret = new Secret("fds", "fdsgsd", "fid", "2");
dbSecret.UpdateSec(secret);
}
private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void flowLayoutPanel1_MouseHover(object sender, EventArgs e)
{
//Image image = Image.FromFile(@".\Resource\d.png");
//flowLayoutPanel1.BackgroundImage = image;
label_live.ForeColor = Color.FromArgb(39, 208, 216);
}
private void flowLayoutPanel1_MouseLeave(object sender, EventArgs e)
{
//Image image = Image.FromFile(@".\Resource\c.png");
//flowLayoutPanel1.BackgroundImage = image;
label_live.ForeColor = Color.Black;
}
private void label_live_Click(object sender, EventArgs e)
{
LiveForm liveForm = new LiveForm(user);
liveForm.ShowDialog();
//this.Hide();
}
private void flowLayoutPanel2_Click(object sender, EventArgs e)
{
FlashForm flashForm = new FlashForm(user.Username);
flashForm.ShowDialog();
}
private void flowLayoutPanel3_Paint(object sender, PaintEventArgs e)
{
}
private void flowLayoutPanel3_Click(object sender, EventArgs e)
{
VideoForm videoForm = new VideoForm(user.Username);
videoForm.ShowDialog();
}
private void label4_Click(object sender, EventArgs e)
{
RecodeForm recodeForm = new RecodeForm();
recodeForm.ShowDialog();
}
private void 退出登录ToolStripMenuItem1_Click(object sender, EventArgs e)
{
//Form1 mainform = new Form1();
Login login = new Login();
this.Hide();
login.ShowDialog();
Application.ExitThread();
}
private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show(@"本程序基于C#编写,
采用腾讯云ASR语音识别技术
实现实时语音识别、录音文件
识别、视频加字幕、即时录音
等功能。如有问题,请联系作
者: admin@billyme.top", "关于");
}
}
}