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

📄 form1.h

📁 采用拉格朗日和泰勒展开的方法对SinX进行数值的函数拟合。本代码用VC++ .net进行显示
💻 H
📖 第 1 页 / 共 2 页
字号:
#pragma once

namespace WdFm {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace ApproachFunc;
	using namespace GP;
	//using namespace GP;

	/// <summary>
	/// Form1 摘要
	///
	/// 警告: 如果更改此类的名称,则需要更改
	///          与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
	///          “资源文件名”属性。否则,
	///          设计器将不能与此窗体的关联
	///          本地化资源正确交互。
	/// </summary>

	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: 在此处添加构造函数代码
			//
		}

	protected:
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  btn_Start;
	protected: 

	protected: 



	protected: 

	protected: 


	private: System::Windows::Forms::GroupBox^  groupBox1;
	private: System::Windows::Forms::RadioButton^  radioByError;
	private: System::Windows::Forms::Label^  label2;

	private: System::Windows::Forms::RadioButton^  radioByOrder;



	private: System::Windows::Forms::PictureBox^  pictureBox1;
	private: System::Windows::Forms::TabControl^  tabControl1;
	private: System::Windows::Forms::TabPage^  tabPage_FunctionShow;
	private: System::Windows::Forms::TabPage^  tabPage_ErrorShow;








	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		Canvus^ cvsFun;
		Canvus^ cvsErr;
	private: System::Windows::Forms::GroupBox^  groupBox2;


	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::TextBox^  txtCTY;

	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::TextBox^  txtCTX;

	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::HScrollBar^  hScrollBar_xscale;

	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::HScrollBar^  hScrollBar_yscale;
	private: System::Windows::Forms::PictureBox^  pictureBox2;
	private: System::Windows::Forms::Label^  lblInput;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown_Input;
	private: System::Windows::Forms::ListBox^  listBox_Method;
	private: System::Windows::Forms::ListBox^  listBox_nGrid;
	private: System::Windows::Forms::Label^  lblDisp2;
	private: System::Windows::Forms::Label^  lblDisp1;
	private: System::Windows::Forms::Label^  lblOrder;






			 System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
			 /// <summary>
			 /// 设计器支持所需的方法 - 不要
			 /// 使用代码编辑器修改此方法的内容。
			 /// </summary>
			 void InitializeComponent(void)
			 {
				 this->btn_Start = (gcnew System::Windows::Forms::Button());
				 this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
				 this->lblOrder = (gcnew System::Windows::Forms::Label());
				 this->lblDisp2 = (gcnew System::Windows::Forms::Label());
				 this->lblDisp1 = (gcnew System::Windows::Forms::Label());
				 this->listBox_Method = (gcnew System::Windows::Forms::ListBox());
				 this->numericUpDown_Input = (gcnew System::Windows::Forms::NumericUpDown());
				 this->lblInput = (gcnew System::Windows::Forms::Label());
				 this->label2 = (gcnew System::Windows::Forms::Label());
				 this->radioByOrder = (gcnew System::Windows::Forms::RadioButton());
				 this->radioByError = (gcnew System::Windows::Forms::RadioButton());
				 this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
				 this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
				 this->tabPage_FunctionShow = (gcnew System::Windows::Forms::TabPage());
				 this->tabPage_ErrorShow = (gcnew System::Windows::Forms::TabPage());
				 this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
				 this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
				 this->listBox_nGrid = (gcnew System::Windows::Forms::ListBox());
				 this->label8 = (gcnew System::Windows::Forms::Label());
				 this->hScrollBar_yscale = (gcnew System::Windows::Forms::HScrollBar());
				 this->label7 = (gcnew System::Windows::Forms::Label());
				 this->hScrollBar_xscale = (gcnew System::Windows::Forms::HScrollBar());
				 this->label6 = (gcnew System::Windows::Forms::Label());
				 this->label5 = (gcnew System::Windows::Forms::Label());
				 this->txtCTY = (gcnew System::Windows::Forms::TextBox());
				 this->label4 = (gcnew System::Windows::Forms::Label());
				 this->label3 = (gcnew System::Windows::Forms::Label());
				 this->txtCTX = (gcnew System::Windows::Forms::TextBox());
				 this->groupBox1->SuspendLayout();
				 (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown_Input))->BeginInit();
				 (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
				 this->tabControl1->SuspendLayout();
				 this->tabPage_FunctionShow->SuspendLayout();
				 this->tabPage_ErrorShow->SuspendLayout();
				 (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->BeginInit();
				 this->groupBox2->SuspendLayout();
				 this->SuspendLayout();
				 // 
				 // btn_Start
				 // 
				 this->btn_Start->Location = System::Drawing::Point(18, 20);
				 this->btn_Start->Name = L"btn_Start";
				 this->btn_Start->Size = System::Drawing::Size(108, 45);
				 this->btn_Start->TabIndex = 0;
				 this->btn_Start->Text = L"START!";
				 this->btn_Start->UseVisualStyleBackColor = true;
				 this->btn_Start->Click += gcnew System::EventHandler(this, &Form1::btnStart_Click);
				 // 
				 // groupBox1
				 // 
				 this->groupBox1->Controls->Add(this->lblOrder);
				 this->groupBox1->Controls->Add(this->lblDisp2);
				 this->groupBox1->Controls->Add(this->lblDisp1);
				 this->groupBox1->Controls->Add(this->listBox_Method);
				 this->groupBox1->Controls->Add(this->numericUpDown_Input);
				 this->groupBox1->Controls->Add(this->lblInput);
				 this->groupBox1->Controls->Add(this->label2);
				 this->groupBox1->Controls->Add(this->btn_Start);
				 this->groupBox1->Controls->Add(this->radioByOrder);
				 this->groupBox1->Controls->Add(this->radioByError);
				 this->groupBox1->Location = System::Drawing::Point(784, 20);
				 this->groupBox1->Name = L"groupBox1";
				 this->groupBox1->Size = System::Drawing::Size(140, 266);
				 this->groupBox1->TabIndex = 5;
				 this->groupBox1->TabStop = false;
				 this->groupBox1->Text = L"逼近方式";
				 // 
				 // lblOrder
				 // 
				 this->lblOrder->AutoSize = true;
				 this->lblOrder->Location = System::Drawing::Point(15, 236);
				 this->lblOrder->Name = L"lblOrder";
				 this->lblOrder->Size = System::Drawing::Size(41, 12);
				 this->lblOrder->TabIndex = 11;
				 this->lblOrder->Text = L"label1";
				 // 
				 // lblDisp2
				 // 
				 this->lblDisp2->AutoSize = true;
				 this->lblDisp2->Location = System::Drawing::Point(16, 214);
				 this->lblDisp2->Name = L"lblDisp2";
				 this->lblDisp2->Size = System::Drawing::Size(11, 12);
				 this->lblDisp2->TabIndex = 10;
				 this->lblDisp2->Text = L"0";
				 // 
				 // lblDisp1
				 // 
				 this->lblDisp1->AutoSize = true;
				 this->lblDisp1->Location = System::Drawing::Point(16, 191);
				 this->lblDisp1->Name = L"lblDisp1";
				 this->lblDisp1->Size = System::Drawing::Size(53, 12);
				 this->lblDisp1->TabIndex = 9;
				 this->lblDisp1->Text = L"显示结果";
				 // 
				 // listBox_Method
				 // 
				 this->listBox_Method->FormattingEnabled = true;
				 this->listBox_Method->ItemHeight = 12;
				 this->listBox_Method->Items->AddRange(gcnew cli::array< System::Object^  >(2) {L"Taylor", L"Lagrange"});
				 this->listBox_Method->Location = System::Drawing::Point(16, 163);
				 this->listBox_Method->Name = L"listBox_Method";
				 this->listBox_Method->Size = System::Drawing::Size(109, 16);
				 this->listBox_Method->TabIndex = 8;
				 // 
				 // numericUpDown_Input
				 // 
				 this->numericUpDown_Input->Location = System::Drawing::Point(17, 124);
				 this->numericUpDown_Input->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, 0});
				 this->numericUpDown_Input->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
				 this->numericUpDown_Input->Name = L"numericUpDown_Input";
				 this->numericUpDown_Input->Size = System::Drawing::Size(107, 21);
				 this->numericUpDown_Input->TabIndex = 7;
				 this->numericUpDown_Input->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
				 // 
				 // lblInput
				 // 
				 this->lblInput->AutoSize = true;
				 this->lblInput->Location = System::Drawing::Point(15, 109);
				 this->lblInput->Name = L"lblInput";
				 this->lblInput->Size = System::Drawing::Size(29, 12);
				 this->lblInput->TabIndex = 6;
				 this->lblInput->Text = L"阶数";
				 // 
				 // label2
				 // 
				 this->label2->AutoSize = true;
				 this->label2->Location = System::Drawing::Point(16, 148);
				 this->label2->Name = L"label2";
				 this->label2->Size = System::Drawing::Size(53, 12);
				 this->label2->TabIndex = 5;
				 this->label2->Text = L"逼近方法";
				 // 
				 // radioByOrder
				 // 
				 this->radioByOrder->AutoSize = true;
				 this->radioByOrder->Location = System::Drawing::Point(16, 90);
				 this->radioByOrder->Name = L"radioByOrder";
				 this->radioByOrder->Size = System::Drawing::Size(83, 16);
				 this->radioByOrder->TabIndex = 3;
				 this->radioByOrder->TabStop = true;
				 this->radioByOrder->Text = L"以阶次计算";
				 this->radioByOrder->UseVisualStyleBackColor = true;
				 this->radioByOrder->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioByOrder_CheckedChanged);
				 // 
				 // radioByError
				 // 
				 this->radioByError->AutoSize = true;
				 this->radioByError->Location = System::Drawing::Point(16, 71);
				 this->radioByError->Name = L"radioByError";
				 this->radioByError->Size = System::Drawing::Size(95, 16);
				 this->radioByError->TabIndex = 2;
				 this->radioByError->TabStop = true;
				 this->radioByError->Text = L"以误差限计算";
				 this->radioByError->UseVisualStyleBackColor = true;
				 this->radioByError->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioByError_CheckedChanged);
				 // 
				 // pictureBox1
				 // 
				 this->pictureBox1->Dock = System::Windows::Forms::DockStyle::Fill;
				 this->pictureBox1->Location = System::Drawing::Point(3, 3);
				 this->pictureBox1->Name = L"pictureBox1";
				 this->pictureBox1->Size = System::Drawing::Size(752, 530);
				 this->pictureBox1->TabIndex = 0;
				 this->pictureBox1->TabStop = false;
				 // 
				 // tabControl1
				 // 
				 this->tabControl1->Controls->Add(this->tabPage_FunctionShow);
				 this->tabControl1->Controls->Add(this->tabPage_ErrorShow);
				 this->tabControl1->Location = System::Drawing::Point(12, 12);
				 this->tabControl1->Name = L"tabControl1";
				 this->tabControl1->SelectedIndex = 0;
				 this->tabControl1->Size = System::Drawing::Size(766, 562);
				 this->tabControl1->TabIndex = 8;
				 // 
				 // tabPage_FunctionShow
				 // 
				 this->tabPage_FunctionShow->Controls->Add(this->pictureBox1);
				 this->tabPage_FunctionShow->Location = System::Drawing::Point(4, 22);
				 this->tabPage_FunctionShow->Name = L"tabPage_FunctionShow";
				 this->tabPage_FunctionShow->Padding = System::Windows::Forms::Padding(3);
				 this->tabPage_FunctionShow->Size = System::Drawing::Size(758, 536);
				 this->tabPage_FunctionShow->TabIndex = 0;
				 this->tabPage_FunctionShow->Text = L"函数显示";
				 this->tabPage_FunctionShow->UseVisualStyleBackColor = true;
				 // 
				 // tabPage_ErrorShow
				 // 
				 this->tabPage_ErrorShow->Controls->Add(this->pictureBox2);
				 this->tabPage_ErrorShow->Location = System::Drawing::Point(4, 22);
				 this->tabPage_ErrorShow->Name = L"tabPage_ErrorShow";
				 this->tabPage_ErrorShow->Padding = System::Windows::Forms::Padding(3);
				 this->tabPage_ErrorShow->Size = System::Drawing::Size(758, 536);
				 this->tabPage_ErrorShow->TabIndex = 1;
				 this->tabPage_ErrorShow->Text = L"误差显示";
				 this->tabPage_ErrorShow->UseVisualStyleBackColor = true;
				 // 
				 // pictureBox2
				 // 
				 this->pictureBox2->Dock = System::Windows::Forms::DockStyle::Fill;
				 this->pictureBox2->Location = System::Drawing::Point(3, 3);
				 this->pictureBox2->Name = L"pictureBox2";
				 this->pictureBox2->Size = System::Drawing::Size(752, 530);
				 this->pictureBox2->TabIndex = 0;
				 this->pictureBox2->TabStop = false;
				 // 
				 // groupBox2
				 // 
				 this->groupBox2->Controls->Add(this->listBox_nGrid);

⌨️ 快捷键说明

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