📄 form1.cs
字号:
this.pictureBox3.Size = new System.Drawing.Size(176, 144);
this.pictureBox3.TabIndex = 41;
this.pictureBox3.TabStop = false;
//
// label9
//
this.label9.Location = new System.Drawing.Point(210, 42);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(124, 110);
this.label9.TabIndex = 43;
this.label9.Text = "如果此处图像异常,请确保摄像头处于 RGB24 176x144 捕获模式";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(199, 20);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(96, 12);
this.label8.TabIndex = 42;
this.label8.Text = "对方看到的图像";
//
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Location = new System.Drawing.Point(12, 87);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(352, 173);
this.groupBox1.TabIndex = 42;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "本地视频";
//
// label7
//
this.label7.Location = new System.Drawing.Point(211, 104);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(124, 53);
this.label7.TabIndex = 34;
this.label7.Text = "为了能够正确地显示视频,摄像头至少要支持 176x144 的图像大小";
//
// label6
//
this.label6.Location = new System.Drawing.Point(211, 48);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(124, 109);
this.label6.TabIndex = 33;
this.label6.Text = "如果右边的图像无法正常显示,很可能是摄像头没有正确安装或设置";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(200, 22);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(109, 12);
this.label3.TabIndex = 32;
this.label3.Text = "摄像头捕获的图象";
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(15, 20);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(176, 144);
this.pictureBox1.TabIndex = 31;
this.pictureBox1.TabStop = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(12, 458);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(377, 12);
this.label2.TabIndex = 40;
this.label2.Text = "请正确选择并设置语音、视频通讯所需的设备和参数,然后点击\"确定\"";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.SystemColors.Control;
this.label1.Location = new System.Drawing.Point(308, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 39;
this.label1.Text = "信号波形";
//
// pictureBox2
//
this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox2.BackColor = System.Drawing.SystemColors.Control;
this.pictureBox2.Location = new System.Drawing.Point(12, 11);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(352, 61);
this.pictureBox2.TabIndex = 38;
this.pictureBox2.TabStop = false;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.button7);
this.panel1.Controls.Add(this.button6);
this.panel1.Controls.Add(this.button3);
this.panel1.Location = new System.Drawing.Point(378, 91);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(147, 350);
this.panel1.TabIndex = 32;
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button1.Location = new System.Drawing.Point(29, 288);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(93, 24);
this.button1.TabIndex = 30;
this.button1.Text = "确定";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button7
//
this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.button7.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button7.Location = new System.Drawing.Point(29, 318);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(95, 23);
this.button7.TabIndex = 29;
this.button7.Text = "退出";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripLabel3,
this.cbwaveIn,
this.toolStripSeparator1,
this.toolStripLabel1,
this.cbwaveOut});
this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(537, 25);
this.toolStrip1.Stretch = true;
this.toolStrip1.TabIndex = 32;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripLabel3
//
this.toolStripLabel3.Name = "toolStripLabel3";
this.toolStripLabel3.Size = new System.Drawing.Size(55, 22);
this.toolStripLabel3.Text = "录音设备";
//
// cbwaveIn
//
this.cbwaveIn.Name = "cbwaveIn";
this.cbwaveIn.Size = new System.Drawing.Size(121, 25);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// toolStripLabel1
//
this.toolStripLabel1.Name = "toolStripLabel1";
this.toolStripLabel1.Size = new System.Drawing.Size(55, 22);
this.toolStripLabel1.Text = "播音设备";
//
// cbwaveOut
//
this.cbwaveOut.Name = "cbwaveOut";
this.cbwaveOut.Size = new System.Drawing.Size(121, 25);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(537, 504);
this.Controls.Add(this.toolStripContainer1);
this.MinimumSize = new System.Drawing.Size(520, 531);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ZX Messenger AVPhone 语音/视频设置";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.toolStripContainer1.ContentPanel.ResumeLayout(false);
this.toolStripContainer1.ContentPanel.PerformLayout();
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
this.toolStripContainer1.ResumeLayout(false);
this.toolStripContainer1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.panel1.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
#region 用户定义函数事件
/*
private void button1_Click(object sender, System.EventArgs e)
{
if(av!=null)av.Start(this.textBox1.Text,int.Parse(this.textBox2.Text));
}
private void button2_Click(object sender, System.EventArgs e)
{
if(av==null)
{
av = new gowk.multimedia.AV(this.pictureBox1, this.pictureBox1, this.pictureBox1.Width , this.pictureBox1.Height );
av.IniChanel();
av.IniVideo();
this.av.IniAudio();
}
else
{
av.Dispose();
av=null;
}
}
*/
private void Form1_Load(object sender, System.EventArgs e)
{
try
{
canExit = true;
//se = new pre_thr_set(this.pictureBox1);
//av = new AV(pictureBox1, pictureBox3);
this.Icon = avt.Properties.Resources.AVPhone;
//av.Dispose();
av = new AV(pictureBox1, pictureBox3);
av.RemotePreView = true;
av.Initial();
av.Start("127.0.0.1", 4567); //这个端口必须有效
AudioDevice.AudioDeviceCollection ads = AudioDevice.InputDevices();
foreach (AudioDevice ad in ads)
{
this.cbwaveIn.Items.Add(/*new ToolStripComboBox*/(ad.Name));
this.cbwaveOut.Items.Add(/*new ToolStripComboBox*/(ad.Name));
Debug.Print(ad.Name);
}
if (ads.Count > 0)
{
this.cbwaveIn.SelectedIndex = 0;
this.cbwaveOut.SelectedIndex = 0;
}
else
{
this.cbwaveIn.Items.Add(("找不到音频输入设备"));
this.cbwaveOut.Items.Add(("找不到音频输出设备"));
}
mixer = new Mixer(this);
mixer.MixerControlChange += new EventHandler(mixer_MixerControlChange);
this.outdtl = new gowk.multimedia.Mixer.MixerControlDetail(mixer, gowk.multimedia.Mixer.MIXERLINE_COMPONENTTYPE_DST_SPEAKERS);
this.outvolume.Minimum = this.outdtl.Min;
this.outvolume.Maximum = this.outdtl.Max;
this.outvolume.Value = this.outdtl.Volume;
this.indtl = new gowk.multimedia.Mixer.MixerControlDetail(mixer, gowk.multimedia.Mixer.MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -