code_window.cs
来自「C++编写的模拟银行家算法的实现,内容详细具体,代码清楚易懂,很适合初学者学习」· CS 代码 · 共 108 行
CS
108 行
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace test1
{
public partial class code_window : Form
{
private delegate void dd(string temp);
private delegate void ff();
private delegate void cc();
int[] position;
bool window;
public code_window()
{
InitializeComponent();
position=new int[2];
window = true;
}
public void refr(string temp)
{
try
{
if (this.InvokeRequired)
{
this.Invoke(new dd(refr), new object[] { temp });
}
else
{
string temp_str;
temp_str = temp + "\n";
rtb1.Text += temp_str;
}
}
catch (Exception) { };
}
public void cls()
{
try
{
if (this.InvokeRequired)
{
this.Invoke(new cc(cls));
}
else
{
this.Close();
}
}
catch (Exception) { };
}
public void clear()
{
try
{
if (this.InvokeRequired)
{
this.Invoke(new cc(clear));
}
else
{
rtb1.Text = "";
}
}
catch (Exception) { };
}
public void cw_sh()
{
if (this.InvokeRequired)
{
this.Invoke(new ff(cw_sh));
}
else
{
if (window) { window = false; Hide(); }
else { window = true; Show(); }
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?