⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 code_window.cs

📁 C++编写的模拟银行家算法的实现,内容详细具体,代码清楚易懂,很适合初学者学习
💻 CS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -