169 lines
5.3 KiB
C#
169 lines
5.3 KiB
C#
|
|
using dccdc.Selfhelp.Models;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.IO;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Reflection;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
|
|||
|
|
namespace dccdc.Selfhelp
|
|||
|
|
{
|
|||
|
|
public partial class frm_ymVideo : Form
|
|||
|
|
{
|
|||
|
|
public frm_ymVideo()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
//this.TopMost = true;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
bool _playing = false;
|
|||
|
|
|
|||
|
|
int t = 0;
|
|||
|
|
int i = 0;
|
|||
|
|
string[] vfiles = Directory.GetFiles("d:\\shipin");
|
|||
|
|
VlcPlayer vlcp = new VlcPlayer(Application.StartupPath + "\\plugins");
|
|||
|
|
int alltime = 0;
|
|||
|
|
private void frm_ymVideo_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
lbl_sj.ForeColor = Color.FromArgb(29, 32, 135);
|
|||
|
|
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
|
|||
|
|
this.DoubleBuffered = true;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
List<Label> lbs = new List<Label>();
|
|||
|
|
public void gxpd(List<PD_XX> dds)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
public void gxdq(string text)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void setVolue(int v)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
lbl_sj.Text = DateTime.Now.ToString("yyyy年MM月dd日 ") + getxq(DateTime.Now.DayOfWeek) + " " + DateTime.Now.ToString("HH:mm");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private string getxq(DayOfWeek dayOfWeek)
|
|||
|
|
{
|
|||
|
|
//throw new NotImplementedException();
|
|||
|
|
switch (dayOfWeek)
|
|||
|
|
{
|
|||
|
|
case DayOfWeek.Monday:
|
|||
|
|
return "星期一";
|
|||
|
|
case DayOfWeek.Tuesday:
|
|||
|
|
return "星期二";
|
|||
|
|
case DayOfWeek.Wednesday:
|
|||
|
|
return "星期三";
|
|||
|
|
case DayOfWeek.Thursday:
|
|||
|
|
return "星期四";
|
|||
|
|
case DayOfWeek.Friday:
|
|||
|
|
return "星期五";
|
|||
|
|
case DayOfWeek.Saturday:
|
|||
|
|
return "星期六";
|
|||
|
|
case DayOfWeek.Sunday:
|
|||
|
|
return "星期日";
|
|||
|
|
default:
|
|||
|
|
return "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
List<PD_XX> pdlist = new List<PD_XX>();
|
|||
|
|
bool showbig = false;
|
|||
|
|
internal void txpd(PD_XX pdxx)
|
|||
|
|
{
|
|||
|
|
if (pdlist.Where(t => t.id == pdxx.id).Any())
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
//throw new NotImplementedException();
|
|||
|
|
pdlist.Add(pdxx);
|
|||
|
|
showbig = true;
|
|||
|
|
//timer2.Enabled = true;
|
|||
|
|
this.Invalidate();
|
|||
|
|
Thread t1 = new Thread(()=> {
|
|||
|
|
Thread.Sleep(2000);
|
|||
|
|
showbig = false;
|
|||
|
|
this.Invalidate();
|
|||
|
|
});
|
|||
|
|
t1.Start();
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void timer2_Tick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
timer2.Enabled = false;
|
|||
|
|
showbig = false;
|
|||
|
|
this.Invalidate();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override void OnPaint(PaintEventArgs e)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
base.OnPaint(e);
|
|||
|
|
int c = pdlist.Count();
|
|||
|
|
int i = 0;
|
|||
|
|
int u = 0;
|
|||
|
|
|
|||
|
|
for (;c>0&&i<7;c--)
|
|||
|
|
{
|
|||
|
|
u = c;
|
|||
|
|
e.Graphics.DrawImage(Image.FromFile(Application.StartupPath + "\\y.png"), new PointF(53, 228 + i * 77));
|
|||
|
|
e.Graphics.DrawString("请" + pdlist[c - 1].hm.ToString("D4") + "号小朋友的家长到" + pdlist[c - 1].jhckmc + "登记",
|
|||
|
|
new Font("微软雅黑",22 ), new SolidBrush(Color.FromArgb(0,140,204)),
|
|||
|
|
new PointF(83, 216 + i * 77));
|
|||
|
|
i++;
|
|||
|
|
}
|
|||
|
|
c = pdlist.Count();
|
|||
|
|
if (showbig)
|
|||
|
|
{
|
|||
|
|
e.Graphics.DrawImage(Image.FromFile(Application.StartupPath + "\\tcbj.png"), new PointF(161, 206));
|
|||
|
|
SizeF s1= e.Graphics.MeasureString("请" + pdlist[c - 1].hm.ToString("D4") + "号小朋友的家长", new Font("微软雅黑", 30));
|
|||
|
|
SizeF s2 = e.Graphics.MeasureString("到" + pdlist[c - 1].jhckmc + "登记", new Font("微软雅黑", 30));
|
|||
|
|
|
|||
|
|
float y = (356 - s1.Height - s2.Height) / 2;
|
|||
|
|
float x1 = (702 - s1.Width ) / 2;
|
|||
|
|
float x2 = (702 - s2.Width ) / 2;
|
|||
|
|
|
|||
|
|
e.Graphics.DrawString("请" + pdlist[c - 1].hm.ToString("D4") + "号小朋友的家长",
|
|||
|
|
new Font("微软雅黑", 30), new SolidBrush(Color.FromArgb(255, 99, 40)),
|
|||
|
|
new PointF(161+x1, 206 + y));
|
|||
|
|
|
|||
|
|
e.Graphics.DrawString("到" + pdlist[c - 1].jhckmc + "登记",
|
|||
|
|
new Font("微软雅黑", 30), new SolidBrush(Color.FromArgb(255, 99, 40)),
|
|||
|
|
new PointF(161 + x2, 206 + y+10+s2.Height));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void timer3_Tick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
Random rd = new Random();
|
|||
|
|
PD_XX pdxx = new PD_XX();
|
|||
|
|
pdxx.id = rd.Next(100);
|
|||
|
|
pdxx.rq = DateTime.Now;
|
|||
|
|
pdxx.hm = pdxx.id;
|
|||
|
|
pdxx.jhbz = 0;
|
|||
|
|
pdxx.jhck = 1;
|
|||
|
|
pdxx.jhckmc = "1号窗口";
|
|||
|
|
pdxx.etid = 0;
|
|||
|
|
txpd(pdxx);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|