September 17, 2020
Shortcut keys :
- Comment: Ctrl + K + C
- Uncomment: Ctrl + K + U
- Organize the code: Ctrl + K + D/F
- Code hint: Ctrl + J
- Method parameter prompt: Ctrl + shift + space
- Insert code block: Tab (press twice) [For example: enter and exit for and press twice Tab for loop code block will be generated]
- Delete the current line: Ctrl + shift + L
- Ctrl + M + M: hide or expand the current nested folding state (M is twice)
- Focus line rectangle: Alt + left mouse button
- Append content to the lines of memoEdit1
private void button1_Click(object sender, EventArgs e)
{
memoEdit1.MaskBox.AppendText("\r\n" + ++i);
memoEdit1.MaskBox.AppendText("、我可以往 memoEdit1 中追加内容" + "\r\n");
memoEdit1.MaskBox.AppendText("我旁边的兄弟就不可以,他每次都是清空里面的内容添加它的");
/**
* \r回车,回到本行的开始位置;
* \n换行,跳转到下一行。
* \r\n连用,表示跳到下一行,并且返回到下一行的起始位置
* \t 一个占位符,表示空格
*/
}
- Overwrite the content in memoEdit
private void button2_Click(object sender, EventArgs e)
{
// memoEdit1.EditValue = "我是覆盖 memoEdit 中的内容";
memoEdit1.Text = "我是覆盖 memoEdit 中的内容";
}
- Form operation
private void button3_Click(object sender, EventArgs e)
{
// 实例化 窗体
Form3 yF3 = new Form3();
//this.Visible = false;
// 显示 窗体
//yF3.Show();
// 显示 模式化窗体
yF3.ShowDialog();
// 激活窗体,获取焦点
//yF3.Activate();
// 关闭窗体
this.Close();
}
C# basic front and back end separation [01]
C# basic front and back end separation [02]
C# .net Framework Windows Forms application [01]
FrmSetUser_xy FrmSetUser01 = new FrmSetUser_xy();
// 模式窗体打开不会往下继续执行,关闭后继续往下执行
FrmSetUser01.ShowDialog();
BindDgv();
C# .net Framework Windows Form Application [02]
Unfinished
Take a few notes so you can read them later.