📄 emotionform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace gowk.forms
{
/// <summary>
/// EmotionForm 的摘要说明。
/// </summary>
public class EmotionForm : gowk.controls.GForm
{
private gowk.controls.GTabControl gTabControl1;
private gowk.controls.GTabPage gTabPage1;
private gowk.forms.GEmotionList gEmotionList1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public EmotionForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.InitializeEmotion();
}
private void InitializeEmotion()
{
this.gTabPage1 = new gowk.controls.GTabPage();
this.gEmotionList1 = new gowk.forms.GEmotionList();
this.gTabPage1.SuspendLayout();
//
// gTabPage1
//
this.gTabPage1.Text="情绪";
this.gTabControl1.GTabPages.Add(this.gTabPage1);
this.gTabControl1.GBorderStyle=gowk.controls.GBorderStyle.Null;
//
// gEmotionList1
//
this.gEmotionList1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gEmotionList1.BackColor=Color.White;
this.gEmotionList1.ItemSelected+=new GEmotionListItemEventHandler(gEmotionList1_ItemSelected);
this.gTabPage1.Controls.Add(this.gEmotionList1);
this.gTabPage1.ResumeLayout();
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.gTabControl1 = new gowk.controls.GTabControl();
this.SuspendLayout();
//
// gTabControl1
//
this.gTabControl1.Alignment = gowk.controls.GAlignment.Top;
this.gTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gTabControl1.GBorderStyle = gowk.controls.GBorderStyle.Solid;
this.gTabControl1.IsRound = true;
this.gTabControl1.ItemSize = new System.Drawing.Size(60, 20);
this.gTabControl1.Location = new System.Drawing.Point(0, 0);
this.gTabControl1.Name = "gTabControl1";
this.gTabControl1.SelectedIndex = 0;
this.gTabControl1.Size = new System.Drawing.Size(368, 213);
this.gTabControl1.TabIndex = 0;
//
// EmotionForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(368, 213);
this.Controls.Add(this.gTabControl1);
this.Name = "EmotionForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "EmotionForm";
this.ResumeLayout(false);
}
#endregion
private Emotion emotion;
public Emotion Emotion
{
get{return this.emotion;}
}
private void gEmotionList1_ItemSelected(object sender, GEmotionListItemEventArgs e)
{
this.emotion=e.Emotion;
if(this.emotion!=null)
this.DialogResult=DialogResult.Cancel;
else
this.DialogResult=DialogResult.OK;
}
protected override void OnDeactivate(EventArgs e)
{
// this.SuspendLayout();
this.DialogResult=this.emotion==null?DialogResult.Cancel:DialogResult.OK;
base.OnDeactivate (e);
// if(this.DialogResult!=DialogResult.OK)
// this.Close();
// this.emotion=null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -