资源简介
常用的视频监控分屏效果,可分四路,九路,十六路等常用效果
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace SplitPanel
{
public partial class frmMain : Form
{
private ArrayList alPanelView = new ArrayList();
private int[][] AllViewDefine = new int[7][];
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender EventArgs e)
{
AllViewDefine[0] = new int[2] { 8 8 };
AllViewDefine[1] = new int[8] { 4 4 4 4 4 4 4 4 };
AllViewDefine[2] = new int[12] { 6 6 2 3 2 3 3 2 3 2 2 2 };
AllViewDefine[3] = new int[16] { 6 6 2 2 2 2 2 2 2 2 2 2 2 2 2 2 };
AllViewDefine[4] = new int[26] { 2 2 2 2 2 2 2 2 2 2 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 };
AllViewDefine[5] = new int[20] { 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 };
AllViewDefine[6] = new int[32] { 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 };
}
private void toolStripButton1_Click(object sender EventArgs e)
{
tableLayoutPanel.Controls.Clear();
alPanelView.Clear();
int[] ChooseViewDefine = AllViewDefine[Convert.ToInt16(((ToolStripButton)(sender)).Tag)];
int iViewCount = ChooseViewDefine.Length / 2;
for (int i = 0; i < iViewCount; i++)
{
Panel p = new Panel();
p.BackColor = Color.FromArgb(125 141 144);
p.Dock = Dockstyle.Fill;
p.Padding = new Padding(2);
tableLayoutPanel.Controls.Add(p);
tableLayoutPanel.SetColumnSpan(p ChooseViewDefine[i * 2]);
tableLayoutPanel.SetRowSpan(p ChooseViewDefine[i * 2 + 1]);
Panel pnlView = new Panel();
pnlView.BackColor = Color.FromArgb(125 141 144);
pnlView.Dock = Dockstyle.Fill;
p.Controls.Add(pnlView);
alPanelView.Add(pnlView);
pnlView.Click += new System.EventHandler(this.pnlView_Click);
pnlView.DoubleClick += new System.EventHandler(this.pnlView_DoubleClick);
}
if (tableLayoutPanel.Controls.Count > 0)
{
pnlView_Click(tableLayoutPanel.Controls[0].Controls[0] null);
}
}
private void pnlView_Click(object sender EventArgs e)
{
Panel parent_panel = ((Control)(sender)).Parent as Panel;
foreach (Control c in tableLayoutPanel.Controls)
{
((Panel)(c)).BackColor = Color.FromArgb(125 141 144);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-04-11 10:34 SplitPanel\
目录 0 2011-05-11 14:29 SplitPanel\bin\
目录 0 2011-05-19 11:10 SplitPanel\bin\Debug\
文件 454144 2011-05-19 11:46 SplitPanel\bin\Debug\SplitPanel.exe
文件 44544 2011-05-19 11:46 SplitPanel\bin\Debug\SplitPanel.pdb
文件 22712 2014-04-11 10:34 SplitPanel\bin\Debug\SplitPanel.vshost.exe
文件 490 2012-06-06 02:06 SplitPanel\bin\Debug\SplitPanel.vshost.exe.manifest
目录 0 2011-05-11 14:29 SplitPanel\bin\Release\
文件 3217 2011-05-19 12:12 SplitPanel\frmMain.cs
文件 49067 2011-05-16 01:30 SplitPanel\frmMain.Designer.cs
文件 24541 2011-05-16 01:30 SplitPanel\frmMain.resx
目录 0 2011-05-11 13:11 SplitPanel\obj\
目录 0 2011-05-11 13:11 SplitPanel\obj\x86\
目录 0 2014-04-11 10:34 SplitPanel\obj\x86\Debug\
文件 791 2014-04-11 10:34 SplitPanel\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7643 2014-04-11 10:34 SplitPanel\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 6760 2011-05-16 01:30 SplitPanel\obj\x86\Debug\GenerateResource-ResGen.read.1.tlog
文件 2 2011-05-16 01:30 SplitPanel\obj\x86\Debug\GenerateResource-ResGen.read.4.tlog
文件 2 2011-05-16 01:30 SplitPanel\obj\x86\Debug\GenerateResource-ResGen.read.5.tlog
文件 2066 2011-05-16 01:30 SplitPanel\obj\x86\Debug\GenerateResource-ResGen.write.1.tlog
文件 2934 2014-04-11 10:34 SplitPanel\obj\x86\Debug\SplitPanel.csproj.FileListAbsolute.txt
文件 454144 2011-05-19 11:46 SplitPanel\obj\x86\Debug\SplitPanel.exe
文件 13734 2011-05-16 01:30 SplitPanel\obj\x86\Debug\SplitPanel.frmMain.resources
文件 44544 2011-05-19 11:46 SplitPanel\obj\x86\Debug\SplitPanel.pdb
文件 412677 2011-05-16 01:30 SplitPanel\obj\x86\Debug\SplitPanel.Properties.Resources.resources
目录 0 2011-05-16 01:30 SplitPanel\obj\x86\Debug\TempPE\
文件 7168 2011-05-16 01:30 SplitPanel\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 493 2011-05-11 13:12 SplitPanel\Program.cs
目录 0 2011-05-11 13:11 SplitPanel\Properties\
文件 1360 2011-05-11 13:11 SplitPanel\Properties\AssemblyInfo.cs
文件 9029 2011-05-16 01:30 SplitPanel\Properties\Resources.Designer.cs
............此处省略33个文件信息
评论
共有 条评论