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

📄 form1.h

📁 用链表实现的大数阶乘
💻 H
字号:
#pragma once
#include "stdafx.h"
#include ".\jiechen.h"
public __gc class jiecheng;

namespace My
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary> 
	/// Form1 摘要
	///
	/// 警告: 如果您更改该类的名称,则需要更改 
	///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
	///          “资源文件名”属性。  否则,
	///          设计器将不能与此窗体关联的
	///          本地化资源正确交互。
	/// </summary>
	public __gc class Form1 : public System::Windows::Forms::Form
	{	
	public:
		Form1(void)
		{
			InitializeComponent();
		}
  
	protected:
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::Label *  label1;
	private: System::Windows::Forms::TextBox *  textBox1;
	private: System::Windows::Forms::Label *  label2;
	private: System::Windows::Forms::TextBox *  textBox2;
	private: System::Windows::Forms::Button *  button1;
	private: System::Windows::Forms::Button *  button2;
	private: System::Windows::Forms::Button *  button3;
	private: System::Windows::Forms::Label *  label3;
	private: System::Windows::Forms::Label *  label4;
	private: System::Windows::Forms::Label *  label5;

	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		System::ComponentModel::Container * components;

		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			this->label1 = new System::Windows::Forms::Label();
			this->textBox1 = new System::Windows::Forms::TextBox();
			this->label2 = new System::Windows::Forms::Label();
			this->textBox2 = new System::Windows::Forms::TextBox();
			this->button1 = new System::Windows::Forms::Button();
			this->button2 = new System::Windows::Forms::Button();
			this->button3 = new System::Windows::Forms::Button();
			this->label3 = new System::Windows::Forms::Label();
			this->label4 = new System::Windows::Forms::Label();
			this->label5 = new System::Windows::Forms::Label();
			this->SuspendLayout();
			// 
			// label1
			// 
			this->label1->Location = System::Drawing::Point(24, 32);
			this->label1->Name = S"label1";
			this->label1->Size = System::Drawing::Size(72, 16);
			this->label1->TabIndex = 0;
			this->label1->Text = S"输入阶乘数";
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(112, 24);
			this->textBox1->Name = S"textBox1";
			this->textBox1->Size = System::Drawing::Size(312, 21);
			this->textBox1->TabIndex = 1;
			this->textBox1->Text = S"";
			// 
			// label2
			// 
			this->label2->Location = System::Drawing::Point(24, 72);
			this->label2->Name = S"label2";
			this->label2->Size = System::Drawing::Size(64, 16);
			this->label2->TabIndex = 2;
			this->label2->Text = S"计算结果";
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(112, 64);
			this->textBox2->Name = S"textBox2";
			this->textBox2->Size = System::Drawing::Size(312, 21);
			this->textBox2->TabIndex = 3;
			this->textBox2->Text = S"";
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(56, 160);
			this->button1->Name = S"button1";
			this->button1->Size = System::Drawing::Size(88, 24);
			this->button1->TabIndex = 4;
			this->button1->Text = S"计算";
			this->button1->Click += new System::EventHandler(this, button1_Click);
			// 
			// button2
			// 
			this->button2->Location = System::Drawing::Point(180, 160);
			this->button2->Name = S"button2";
			this->button2->Size = System::Drawing::Size(88, 24);
			this->button2->TabIndex = 5;
			this->button2->Text = S"清除";
			this->button2->Click += new System::EventHandler(this, button2_Click);
			// 
			// button3
			// 
			this->button3->Location = System::Drawing::Point(304, 160);
			this->button3->Name = S"button3";
			this->button3->Size = System::Drawing::Size(88, 24);
			this->button3->TabIndex = 6;
			this->button3->Text = S"退出";
			this->button3->Click += new System::EventHandler(this, button3_Click);
			// 
			// label3
			// 
			this->label3->Location = System::Drawing::Point(24, 112);
			this->label3->Name = S"label3";
			this->label3->Size = System::Drawing::Size(56, 24);
			this->label3->TabIndex = 7;
			this->label3->Text = S"用时";
			// 
			// label4
			// 
			this->label4->Location = System::Drawing::Point(112, 112);
			this->label4->Name = S"label4";
			this->label4->Size = System::Drawing::Size(168, 24);
			this->label4->TabIndex = 8;
			// 
			// label5
			// 
			this->label5->Location = System::Drawing::Point(312, 112);
			this->label5->Name = S"label5";
			this->label5->Size = System::Drawing::Size(56, 24);
			this->label5->TabIndex = 9;
			this->label5->Text = S"秒";
			// 
			// Form1
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
			this->ClientSize = System::Drawing::Size(440, 222);
			this->Controls->Add(this->label5);
			this->Controls->Add(this->label4);
			this->Controls->Add(this->label3);
			this->Controls->Add(this->button3);
			this->Controls->Add(this->button2);
			this->Controls->Add(this->button1);
			this->Controls->Add(this->textBox2);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->textBox1);
			this->Controls->Add(this->label1);
			this->Name = S"Form1";
			this->Text = S"阶乘";
			this->Load += new System::EventHandler(this, Form1_Load);
			this->ResumeLayout(false);

		}	
	private: System::Void button1_Click(System::Object *  sender, System::EventArgs *  e)
			 {
				 jiecheng jc(System::Convert::ToInt32(textBox1->Text,10));
				 jc.start();
				 textBox2->Text= static_cast<System::String __gc *>(jc.tostring());
				 }

private: System::Void button2_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			textBox1->Text="";
			textBox2->Text="";
		 }

private: System::Void button3_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			 this->Close();
		 }

private: System::Void Form1_Load(System::Object *  sender, System::EventArgs *  e)
		 {
		 }

};
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -