#pragma once
#include "Functions.h"

#include "time.h"
#using <mscorlib.dll>
;
using namespace System::Threading;
;
using namespace System::Runtime::InteropServices;


namespace Pokus_meranie {
	char * name;
	char * TCPIP;
	double temp=25.0;
	bool en= false;
	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>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{

		private:
				  Object^ g_Form2;
	public:
		Form1(void)
		{
			
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}

	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::Label^  label13;
	private: System::Windows::Forms::Label^  label14;
	private: System::Windows::Forms::Label^  label15;
	private: System::Windows::Forms::Label^  label16;
	private: System::Windows::Forms::Label^  label17;
	private: System::Windows::Forms::Label^  label18;
	private: System::Windows::Forms::Label^  label19;
	private: System::Windows::Forms::Label^  R_1;
	private: System::Windows::Forms::Label^  R_2;
	private: System::Windows::Forms::Label^  R_9;
	private: System::Windows::Forms::Label^  R_8;
	private: System::Windows::Forms::Label^  R_7;
	private: System::Windows::Forms::Label^  R_6;
	private: System::Windows::Forms::Label^  R_5;
	private: System::Windows::Forms::Label^  R_4;
	private: System::Windows::Forms::Label^  R_3;
	private: System::Windows::Forms::Label^  R_11;
	private: System::Windows::Forms::Label^  R_10;
	private: System::Windows::Forms::Label^  Y_os;
	private: System::Windows::Forms::Label^  label22;


	private: System::Windows::Forms::Panel^  panel2;
	private: System::Windows::Forms::PictureBox^  pictureBox1;

	private: System::Windows::Forms::RadioButton^  in_2;
	private: System::Windows::Forms::RadioButton^  in_3;
	private: System::Windows::Forms::RadioButton^  in_4;
	private: System::Windows::Forms::RadioButton^  in_5;
	private: System::Windows::Forms::RadioButton^  in_6;




	private: System::Windows::Forms::Panel^  panel1;

	private: System::Windows::Forms::CheckBox^  checkBox2;
	private: System::Windows::Forms::CheckBox^  checkBox3;
	private: System::Windows::Forms::CheckBox^  checkBox4;
	private: System::Windows::Forms::CheckBox^  checkBox5;
	private: System::Windows::Forms::CheckBox^  checkBox6;




	private: System::Windows::Forms::Label^  Vzorec;

	private: System::Windows::Forms::RadioButton^  Con_2;
	private: System::Windows::Forms::RadioButton^  con_3;
	private: System::Windows::Forms::RadioButton^  con_4;
	private: System::Windows::Forms::RadioButton^  con_5;
	private: System::Windows::Forms::Panel^  panel3;




private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::Label^  R0;
	private: System::Windows::Forms::Label^  label20;
	private: System::Windows::Forms::Timer^  timer1;
	private: System::Windows::Forms::Button^  button2;
	private: System::Windows::Forms::RadioButton^  meranie;
	private: System::Windows::Forms::RadioButton^  odchylka;
	private: System::Windows::Forms::Panel^  panel4;
private: System::Windows::Forms::RadioButton^  OpenIP;
private: System::Windows::Forms::RadioButton^  OpenF;
private: System::Windows::Forms::Label^  Stastu;

private: System::Windows::Forms::Button^  open;
private: System::Windows::Forms::TextBox^  textBox1;
private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
private: System::Windows::Forms::Label^  label21;
private: System::Windows::Forms::Label^  label23;
private: System::Windows::Forms::RadioButton^  radioButton2;
private: System::Windows::Forms::RadioButton^  radioButton1;
private: System::Windows::Forms::Label^  C1;
private: System::Windows::Forms::Label^  C0;

private: System::Windows::Forms::RadioButton^  radioButton5;
private: System::Windows::Forms::RadioButton^  radioButton4;
private: System::Windows::Forms::RadioButton^  radioButton3;
private: System::Windows::Forms::Label^  label24;
private: System::Windows::Forms::Label^  label25;
private: System::Windows::Forms::TextBox^  textBox2;
private: System::Windows::Forms::Label^  label26;
private: System::Windows::Forms::Label^  label27;



	private: System::ComponentModel::IContainer^  components;


















	private:
		/// <summary>
		/// Required designer variable.

		/// </summary>


#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = (gcnew System::ComponentModel::Container());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label13 = (gcnew System::Windows::Forms::Label());
			this->label14 = (gcnew System::Windows::Forms::Label());
			this->label15 = (gcnew System::Windows::Forms::Label());
			this->label16 = (gcnew System::Windows::Forms::Label());
			this->label17 = (gcnew System::Windows::Forms::Label());
			this->label18 = (gcnew System::Windows::Forms::Label());
			this->label19 = (gcnew System::Windows::Forms::Label());
			this->R_1 = (gcnew System::Windows::Forms::Label());
			this->R_2 = (gcnew System::Windows::Forms::Label());
			this->R_9 = (gcnew System::Windows::Forms::Label());
			this->R_8 = (gcnew System::Windows::Forms::Label());
			this->R_7 = (gcnew System::Windows::Forms::Label());
			this->R_6 = (gcnew System::Windows::Forms::Label());
			this->R_5 = (gcnew System::Windows::Forms::Label());
			this->R_4 = (gcnew System::Windows::Forms::Label());
			this->R_3 = (gcnew System::Windows::Forms::Label());
			this->R_11 = (gcnew System::Windows::Forms::Label());
			this->R_10 = (gcnew System::Windows::Forms::Label());
			this->Y_os = (gcnew System::Windows::Forms::Label());
			this->label22 = (gcnew System::Windows::Forms::Label());
			this->panel2 = (gcnew System::Windows::Forms::Panel());
			this->OpenIP = (gcnew System::Windows::Forms::RadioButton());
			this->OpenF = (gcnew System::Windows::Forms::RadioButton());
			this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
			this->in_2 = (gcnew System::Windows::Forms::RadioButton());
			this->in_3 = (gcnew System::Windows::Forms::RadioButton());
			this->in_4 = (gcnew System::Windows::Forms::RadioButton());
			this->in_5 = (gcnew System::Windows::Forms::RadioButton());
			this->in_6 = (gcnew System::Windows::Forms::RadioButton());
			this->panel1 = (gcnew System::Windows::Forms::Panel());
			this->checkBox2 = (gcnew System::Windows::Forms::CheckBox());
			this->checkBox3 = (gcnew System::Windows::Forms::CheckBox());
			this->checkBox4 = (gcnew System::Windows::Forms::CheckBox());
			this->checkBox5 = (gcnew System::Windows::Forms::CheckBox());
			this->checkBox6 = (gcnew System::Windows::Forms::CheckBox());
			this->Vzorec = (gcnew System::Windows::Forms::Label());
			this->Con_2 = (gcnew System::Windows::Forms::RadioButton());
			this->con_3 = (gcnew System::Windows::Forms::RadioButton());
			this->con_4 = (gcnew System::Windows::Forms::RadioButton());
			this->con_5 = (gcnew System::Windows::Forms::RadioButton());
			this->panel3 = (gcnew System::Windows::Forms::Panel());
			this->C1 = (gcnew System::Windows::Forms::Label());
			this->C0 = (gcnew System::Windows::Forms::Label());
			this->radioButton5 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton4 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
			this->R0 = (gcnew System::Windows::Forms::Label());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->label20 = (gcnew System::Windows::Forms::Label());
			this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->meranie = (gcnew System::Windows::Forms::RadioButton());
			this->odchylka = (gcnew System::Windows::Forms::RadioButton());
			this->panel4 = (gcnew System::Windows::Forms::Panel());
			this->Stastu = (gcnew System::Windows::Forms::Label());
			this->open = (gcnew System::Windows::Forms::Button());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->label21 = (gcnew System::Windows::Forms::Label());
			this->label23 = (gcnew System::Windows::Forms::Label());
			this->label24 = (gcnew System::Windows::Forms::Label());
			this->label25 = (gcnew System::Windows::Forms::Label());
			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
			this->label26 = (gcnew System::Windows::Forms::Label());
			this->label27 = (gcnew System::Windows::Forms::Label());
			this->panel2->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
			this->panel1->SuspendLayout();
			this->panel3->SuspendLayout();
			this->panel4->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
			this->SuspendLayout();
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(288, 650);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(22, 13);
			this->label1->TabIndex = 1;
			this->label1->Text = L"-30";
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(353, 650);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(22, 13);
			this->label2->TabIndex = 2;
			this->label2->Text = L"-20";
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Location = System::Drawing::Point(398, 650);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(22, 13);
			this->label3->TabIndex = 3;
			this->label3->Text = L"-10";
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Location = System::Drawing::Point(449, 650);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(13, 13);
			this->label4->TabIndex = 4;
			this->label4->Text = L"0";
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Location = System::Drawing::Point(499, 650);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(19, 13);
			this->label5->TabIndex = 5;
			this->label5->Text = L"10";
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(551, 650);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(19, 13);
			this->label6->TabIndex = 6;
			this->label6->Text = L"20";
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(601, 650);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(19, 13);
			this->label7->TabIndex = 7;
			this->label7->Text = L"30";
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(651, 650);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(19, 13);
			this->label8->TabIndex = 8;
			this->label8->Text = L"40";
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(702, 650);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(19, 13);
			this->label9->TabIndex = 9;
			this->label9->Text = L"50";
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Location = System::Drawing::Point(752, 650);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(19, 13);
			this->label10->TabIndex = 10;
			this->label10->Text = L"60";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Location = System::Drawing::Point(802, 650);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(19, 13);
			this->label11->TabIndex = 11;
			this->label11->Text = L"70";
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Location = System::Drawing::Point(852, 650);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(19, 13);
			this->label12->TabIndex = 12;
			this->label12->Text = L"80";
			// 
			// label13
			// 
			this->label13->AutoSize = true;
			this->label13->Location = System::Drawing::Point(904, 650);
			this->label13->Name = L"label13";
			this->label13->Size = System::Drawing::Size(19, 13);
			this->label13->TabIndex = 13;
			this->label13->Text = L"90";
			// 
			// label14
			// 
			this->label14->AutoSize = true;
			this->label14->Location = System::Drawing::Point(956, 650);
			this->label14->Name = L"label14";
			this->label14->Size = System::Drawing::Size(25, 13);
			this->label14->TabIndex = 14;
			this->label14->Text = L"100";
			// 
			// label15
			// 
			this->label15->AutoSize = true;
			this->label15->Location = System::Drawing::Point(1004, 650);
			this->label15->Name = L"label15";
			this->label15->Size = System::Drawing::Size(25, 13);
			this->label15->TabIndex = 15;
			this->label15->Text = L"110";
			// 
			// label16
			// 
			this->label16->AutoSize = true;
			this->label16->Location = System::Drawing::Point(1054, 650);
			this->label16->Name = L"label16";
			this->label16->Size = System::Drawing::Size(25, 13);
			this->label16->TabIndex = 16;
			this->label16->Text = L"120";
			// 
			// label17
			// 
			this->label17->AutoSize = true;
			this->label17->Location = System::Drawing::Point(1102, 650);
			this->label17->Name = L"label17";
			this->label17->Size = System::Drawing::Size(25, 13);
			this->label17->TabIndex = 17;
			this->label17->Text = L"130";
			// 
			// label18
			// 
			this->label18->AutoSize = true;
			this->label18->Location = System::Drawing::Point(1154, 650);
			this->label18->Name = L"label18";
			this->label18->Size = System::Drawing::Size(25, 13);
			this->label18->TabIndex = 18;
			this->label18->Text = L"140";
			// 
			// label19
			// 
			this->label19->AutoSize = true;
			this->label19->Location = System::Drawing::Point(1198, 650);
			this->label19->Name = L"label19";
			this->label19->Size = System::Drawing::Size(25, 13);
			this->label19->TabIndex = 19;
			this->label19->Text = L"150";
			// 
			// R_1
			// 
			this->R_1->AutoSize = true;
			this->R_1->Location = System::Drawing::Point(269, 624);
			this->R_1->Name = L"R_1";
			this->R_1->Size = System::Drawing::Size(13, 13);
			this->R_1->TabIndex = 20;
			this->R_1->Text = L"0";
			// 
			// R_2
			// 
			this->R_2->AutoSize = true;
			this->R_2->Location = System::Drawing::Point(269, 575);
			this->R_2->Name = L"R_2";
			this->R_2->Size = System::Drawing::Size(22, 13);
			this->R_2->TabIndex = 21;
			this->R_2->Text = L"0,5";
			// 
			// R_9
			// 
			this->R_9->AutoSize = true;
			this->R_9->Location = System::Drawing::Point(269, 221);
			this->R_9->Name = L"R_9";
			this->R_9->Size = System::Drawing::Size(13, 13);
			this->R_9->TabIndex = 22;
			this->R_9->Text = L"4";
			// 
			// R_8
			// 
			this->R_8->AutoSize = true;
			this->R_8->Location = System::Drawing::Point(269, 263);
			this->R_8->Name = L"R_8";
			this->R_8->Size = System::Drawing::Size(22, 13);
			this->R_8->TabIndex = 23;
			this->R_8->Text = L"3,5";
			// 
			// R_7
			// 
			this->R_7->AutoSize = true;
			this->R_7->Location = System::Drawing::Point(269, 322);
			this->R_7->Name = L"R_7";
			this->R_7->Size = System::Drawing::Size(13, 13);
			this->R_7->TabIndex = 24;
			this->R_7->Text = L"3";
			// 
			// R_6
			// 
			this->R_6->AutoSize = true;
			this->R_6->Location = System::Drawing::Point(269, 364);
			this->R_6->Name = L"R_6";
			this->R_6->Size = System::Drawing::Size(22, 13);
			this->R_6->TabIndex = 25;
			this->R_6->Text = L"2,5";
			// 
			// R_5
			// 
			this->R_5->AutoSize = true;
			this->R_5->Location = System::Drawing::Point(269, 418);
			this->R_5->Name = L"R_5";
			this->R_5->Size = System::Drawing::Size(13, 13);
			this->R_5->TabIndex = 26;
			this->R_5->Text = L"2";
			// 
			// R_4
			// 
			this->R_4->AutoSize = true;
			this->R_4->Location = System::Drawing::Point(269, 471);
			this->R_4->Name = L"R_4";
			this->R_4->Size = System::Drawing::Size(22, 13);
			this->R_4->TabIndex = 27;
			this->R_4->Text = L"1,5";
			// 
			// R_3
			// 
			this->R_3->AutoSize = true;
			this->R_3->Location = System::Drawing::Point(269, 517);
			this->R_3->Name = L"R_3";
			this->R_3->Size = System::Drawing::Size(13, 13);
			this->R_3->TabIndex = 28;
			this->R_3->Text = L"1";
			// 
			// R_11
			// 
			this->R_11->AutoSize = true;
			this->R_11->Location = System::Drawing::Point(269, 127);
			this->R_11->Name = L"R_11";
			this->R_11->Size = System::Drawing::Size(13, 13);
			this->R_11->TabIndex = 29;
			this->R_11->Text = L"5";
			// 
			// R_10
			// 
			this->R_10->AutoSize = true;
			this->R_10->Location = System::Drawing::Point(269, 165);
			this->R_10->Name = L"R_10";
			this->R_10->Size = System::Drawing::Size(22, 13);
			this->R_10->TabIndex = 30;
			this->R_10->Text = L"4,5";
			// 
			// Y_os
			// 
			this->Y_os->AutoSize = true;
			this->Y_os->Location = System::Drawing::Point(255, 108);
			this->Y_os->Name = L"Y_os";
			this->Y_os->Size = System::Drawing::Size(0, 13);
			this->Y_os->TabIndex = 31;
			// 
			// label22
			// 
			this->label22->AutoSize = true;
			this->label22->Location = System::Drawing::Point(1184, 676);
			this->label22->Name = L"label22";
			this->label22->Size = System::Drawing::Size(30, 13);
			this->label22->TabIndex = 32;
			this->label22->Text = L"t [°C]";
			// 
			// panel2
			// 
			this->panel2->Controls->Add(this->OpenIP);
			this->panel2->Controls->Add(this->OpenF);
			this->panel2->Location = System::Drawing::Point(9, 12);
			this->panel2->Name = L"panel2";
			this->panel2->Size = System::Drawing::Size(105, 74);
			this->panel2->TabIndex = 48;
			// 
			// OpenIP
			// 
			this->OpenIP->AutoSize = true;
			this->OpenIP->Location = System::Drawing::Point(3, 40);
			this->OpenIP->Name = L"OpenIP";
			this->OpenIP->Size = System::Drawing::Size(79, 17);
			this->OpenIP->TabIndex = 1;
			this->OpenIP->Text = L"Pripojiť k IP";
			this->OpenIP->UseVisualStyleBackColor = true;
			// 
			// OpenF
			// 
			this->OpenF->AutoSize = true;
			this->OpenF->Checked = true;
			this->OpenF->Location = System::Drawing::Point(3, 17);
			this->OpenF->Name = L"OpenF";
			this->OpenF->Size = System::Drawing::Size(87, 17);
			this->OpenF->TabIndex = 0;
			this->OpenF->TabStop = true;
			this->OpenF->Text = L"Otvorit Subor";
			this->OpenF->UseVisualStyleBackColor = true;
			// 
			// pictureBox1
			// 
			this->pictureBox1->Location = System::Drawing::Point(297, 128);
			this->pictureBox1->Name = L"pictureBox1";
			this->pictureBox1->Size = System::Drawing::Size(910, 510);
			this->pictureBox1->TabIndex = 47;
			this->pictureBox1->TabStop = false;
			this->pictureBox1->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::pictureBox1_Paint);
			// 
			// in_2
			// 
			this->in_2->AutoSize = true;
			this->in_2->Checked = true;
			this->in_2->Location = System::Drawing::Point(0, 13);
			this->in_2->Name = L"in_2";
			this->in_2->Size = System::Drawing::Size(100, 17);
			this->in_2->TabIndex = 50;
			this->in_2->TabStop = true;
			this->in_2->Text = L"PT100 Trieda B";
			this->in_2->UseVisualStyleBackColor = true;
			this->in_2->CheckedChanged += gcnew System::EventHandler(this, &Form1::in_2_CheckedChanged);
			// 
			// in_3
			// 
			this->in_3->AutoSize = true;
			this->in_3->Location = System::Drawing::Point(0, 36);
			this->in_3->Name = L"in_3";
			this->in_3->Size = System::Drawing::Size(105, 17);
			this->in_3->TabIndex = 51;
			this->in_3->Text = L"Ni 1000 Trieda A";
			this->in_3->UseVisualStyleBackColor = true;
			this->in_3->CheckedChanged += gcnew System::EventHandler(this, &Form1::in_3_CheckedChanged);
			// 
			// in_4
			// 
			this->in_4->AutoSize = true;
			this->in_4->Location = System::Drawing::Point(0, 59);
			this->in_4->Name = L"in_4";
			this->in_4->Size = System::Drawing::Size(105, 17);
			this->in_4->TabIndex = 52;
			this->in_4->Text = L"Ni 1000 Trieda B";
			this->in_4->UseVisualStyleBackColor = true;
			this->in_4->CheckedChanged += gcnew System::EventHandler(this, &Form1::in_4_CheckedChanged);
			// 
			// in_5
			// 
			this->in_5->AutoSize = true;
			this->in_5->Location = System::Drawing::Point(0, 82);
			this->in_5->Name = L"in_5";
			this->in_5->Size = System::Drawing::Size(69, 17);
			this->in_5->TabIndex = 53;
			this->in_5->Text = L"NTC 20K";
			this->in_5->UseVisualStyleBackColor = true;
			this->in_5->CheckedChanged += gcnew System::EventHandler(this, &Form1::in_5_CheckedChanged);
			// 
			// in_6
			// 
			this->in_6->AutoSize = true;
			this->in_6->Location = System::Drawing::Point(0, 105);
			this->in_6->Name = L"in_6";
			this->in_6->Size = System::Drawing::Size(120, 17);
			this->in_6->TabIndex = 54;
			this->in_6->Text = L"Termočlánok typu K";
			this->in_6->UseVisualStyleBackColor = true;
			this->in_6->CheckedChanged += gcnew System::EventHandler(this, &Form1::in_6_CheckedChanged);
			// 
			// panel1
			// 
			this->panel1->Controls->Add(this->in_6);
			this->panel1->Controls->Add(this->in_5);
			this->panel1->Controls->Add(this->in_4);
			this->panel1->Controls->Add(this->in_3);
			this->panel1->Controls->Add(this->in_2);
			this->panel1->Location = System::Drawing::Point(9, 92);
			this->panel1->Name = L"panel1";
			this->panel1->Size = System::Drawing::Size(127, 157);
			this->panel1->TabIndex = 59;
			// 
			// checkBox2
			// 
			this->checkBox2->AutoSize = true;
			this->checkBox2->Checked = true;
			this->checkBox2->CheckState = System::Windows::Forms::CheckState::Checked;
			this->checkBox2->Location = System::Drawing::Point(140, 105);
			this->checkBox2->Name = L"checkBox2";
			this->checkBox2->Size = System::Drawing::Size(115, 17);
			this->checkBox2->TabIndex = 61;
			this->checkBox2->Text = L"teoreticka hodnota";
			this->checkBox2->UseVisualStyleBackColor = true;
			this->checkBox2->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox2_CheckedChanged);
			// 
			// checkBox3
			// 
			this->checkBox3->AutoSize = true;
			this->checkBox3->Checked = true;
			this->checkBox3->CheckState = System::Windows::Forms::CheckState::Checked;
			this->checkBox3->Location = System::Drawing::Point(140, 128);
			this->checkBox3->Name = L"checkBox3";
			this->checkBox3->Size = System::Drawing::Size(115, 17);
			this->checkBox3->TabIndex = 62;
			this->checkBox3->Text = L"teoreticka hodnota";
			this->checkBox3->UseVisualStyleBackColor = true;
			this->checkBox3->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox3_CheckedChanged);
			// 
			// checkBox4
			// 
			this->checkBox4->AutoSize = true;
			this->checkBox4->Checked = true;
			this->checkBox4->CheckState = System::Windows::Forms::CheckState::Checked;
			this->checkBox4->Location = System::Drawing::Point(140, 151);
			this->checkBox4->Name = L"checkBox4";
			this->checkBox4->Size = System::Drawing::Size(115, 17);
			this->checkBox4->TabIndex = 63;
			this->checkBox4->Text = L"teoreticka hodnota";
			this->checkBox4->UseVisualStyleBackColor = true;
			this->checkBox4->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox4_CheckedChanged);
			// 
			// checkBox5
			// 
			this->checkBox5->AutoSize = true;
			this->checkBox5->Checked = true;
			this->checkBox5->CheckState = System::Windows::Forms::CheckState::Checked;
			this->checkBox5->Location = System::Drawing::Point(140, 174);
			this->checkBox5->Name = L"checkBox5";
			this->checkBox5->Size = System::Drawing::Size(115, 17);
			this->checkBox5->TabIndex = 64;
			this->checkBox5->Text = L"teoreticka hodnota";
			this->checkBox5->UseVisualStyleBackColor = true;
			this->checkBox5->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox5_CheckedChanged);
			// 
			// checkBox6
			// 
			this->checkBox6->AutoSize = true;
			this->checkBox6->Checked = true;
			this->checkBox6->CheckState = System::Windows::Forms::CheckState::Checked;
			this->checkBox6->Location = System::Drawing::Point(140, 197);
			this->checkBox6->Name = L"checkBox6";
			this->checkBox6->Size = System::Drawing::Size(115, 17);
			this->checkBox6->TabIndex = 65;
			this->checkBox6->Text = L"teoreticka hodnota";
			this->checkBox6->UseVisualStyleBackColor = true;
			this->checkBox6->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox6_CheckedChanged);
			// 
			// Vzorec
			// 
			this->Vzorec->AutoSize = true;
			this->Vzorec->Location = System::Drawing::Point(12, 286);
			this->Vzorec->Name = L"Vzorec";
			this->Vzorec->Size = System::Drawing::Size(156, 13);
			this->Vzorec->TabIndex = 70;
			this->Vzorec->Text = L"Rt=R0*[1+At+Bt^2+Ct^3(t-100)]";
			// 
			// Con_2
			// 
			this->Con_2->AutoSize = true;
			this->Con_2->Location = System::Drawing::Point(19, 26);
			this->Con_2->Name = L"Con_2";
			this->Con_2->Size = System::Drawing::Size(92, 17);
			this->Con_2->TabIndex = 72;
			this->Con_2->Text = L"A=3,90802e-3";
			this->Con_2->UseVisualStyleBackColor = true;
			this->Con_2->CheckedChanged += gcnew System::EventHandler(this, &Form1::Con_2_CheckedChanged);
			// 
			// con_3
			// 
			this->con_3->AutoSize = true;
			this->con_3->Location = System::Drawing::Point(19, 49);
			this->con_3->Name = L"con_3";
			this->con_3->Size = System::Drawing::Size(95, 17);
			this->con_3->TabIndex = 73;
			this->con_3->Text = L"B=-5,80195e-7";
			this->con_3->UseVisualStyleBackColor = true;
			this->con_3->CheckedChanged += gcnew System::EventHandler(this, &Form1::con_3_CheckedChanged);
			// 
			// con_4
			// 
			this->con_4->AutoSize = true;
			this->con_4->Checked = true;
			this->con_4->Location = System::Drawing::Point(19, 72);
			this->con_4->Name = L"con_4";
			this->con_4->Size = System::Drawing::Size(101, 17);
			this->con_4->TabIndex = 74;
			this->con_4->TabStop = true;
			this->con_4->Text = L"C=-4,27350e-12";
			this->con_4->UseVisualStyleBackColor = true;
			this->con_4->CheckedChanged += gcnew System::EventHandler(this, &Form1::con_4_CheckedChanged);
			// 
			// con_5
			// 
			this->con_5->AutoSize = true;
			this->con_5->Location = System::Drawing::Point(19, 95);
			this->con_5->Name = L"con_5";
			this->con_5->Size = System::Drawing::Size(57, 17);
			this->con_5->TabIndex = 75;
			this->con_5->Text = L"konst5";
			this->con_5->UseVisualStyleBackColor = true;
			this->con_5->Visible = false;
			this->con_5->CheckedChanged += gcnew System::EventHandler(this, &Form1::con_5_CheckedChanged);
			// 
			// panel3
			// 
			this->panel3->Controls->Add(this->C1);
			this->panel3->Controls->Add(this->C0);
			this->panel3->Controls->Add(this->radioButton5);
			this->panel3->Controls->Add(this->radioButton4);
			this->panel3->Controls->Add(this->radioButton3);
			this->panel3->Controls->Add(this->radioButton2);
			this->panel3->Controls->Add(this->radioButton1);
			this->panel3->Controls->Add(this->R0);
			this->panel3->Controls->Add(this->con_5);
			this->panel3->Controls->Add(this->con_4);
			this->panel3->Controls->Add(this->con_3);
			this->panel3->Controls->Add(this->Con_2);
			this->panel3->Location = System::Drawing::Point(29, 314);
			this->panel3->Name = L"panel3";
			this->panel3->Size = System::Drawing::Size(193, 300);
			this->panel3->TabIndex = 76;
			// 
			// C1
			// 
			this->C1->AutoSize = true;
			this->C1->Location = System::Drawing::Point(14, 252);
			this->C1->Name = L"C1";
			this->C1->Size = System::Drawing::Size(83, 13);
			this->C1->TabIndex = 84;
			this->C1->Text = L"C1=-1,18342e-4";
			// 
			// C0
			// 
			this->C0->AutoSize = true;
			this->C0->Location = System::Drawing::Point(14, 230);
			this->C0->Name = L"C0";
			this->C0->Size = System::Drawing::Size(83, 13);
			this->C0->TabIndex = 83;
			this->C0->Text = L"C0=1,185976e2";
			// 
			// radioButton5
			// 
			this->radioButton5->AutoSize = true;
			this->radioButton5->Location = System::Drawing::Point(19, 210);
			this->radioButton5->Name = L"radioButton5";
			this->radioButton5->Size = System::Drawing::Size(85, 17);
			this->radioButton5->TabIndex = 81;
			this->radioButton5->TabStop = true;
			this->radioButton5->Text = L"radioButton5";
			this->radioButton5->UseVisualStyleBackColor = true;
			this->radioButton5->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton5_CheckedChanged);
			// 
			// radioButton4
			// 
			this->radioButton4->AutoSize = true;
			this->radioButton4->Location = System::Drawing::Point(19, 187);
			this->radioButton4->Name = L"radioButton4";
			this->radioButton4->Size = System::Drawing::Size(85, 17);
			this->radioButton4->TabIndex = 80;
			this->radioButton4->TabStop = true;
			this->radioButton4->Text = L"radioButton4";
			this->radioButton4->UseVisualStyleBackColor = true;
			this->radioButton4->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton4_CheckedChanged);
			// 
			// radioButton3
			// 
			this->radioButton3->AutoSize = true;
			this->radioButton3->Location = System::Drawing::Point(19, 164);
			this->radioButton3->Name = L"radioButton3";
			this->radioButton3->Size = System::Drawing::Size(85, 17);
			this->radioButton3->TabIndex = 79;
			this->radioButton3->TabStop = true;
			this->radioButton3->Text = L"radioButton3";
			this->radioButton3->UseVisualStyleBackColor = true;
			this->radioButton3->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton3_CheckedChanged);
			// 
			// radioButton2
			// 
			this->radioButton2->AutoSize = true;
			this->radioButton2->Location = System::Drawing::Point(19, 141);
			this->radioButton2->Name = L"radioButton2";
			this->radioButton2->Size = System::Drawing::Size(85, 17);
			this->radioButton2->TabIndex = 78;
			this->radioButton2->TabStop = true;
			this->radioButton2->Text = L"radioButton2";
			this->radioButton2->UseVisualStyleBackColor = true;
			this->radioButton2->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton2_CheckedChanged);
			// 
			// radioButton1
			// 
			this->radioButton1->AutoSize = true;
			this->radioButton1->Location = System::Drawing::Point(19, 118);
			this->radioButton1->Name = L"radioButton1";
			this->radioButton1->Size = System::Drawing::Size(85, 17);
			this->radioButton1->TabIndex = 77;
			this->radioButton1->TabStop = true;
			this->radioButton1->Text = L"radioButton1";
			this->radioButton1->UseVisualStyleBackColor = true;
			this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);
			// 
			// R0
			// 
			this->R0->AutoSize = true;
			this->R0->Location = System::Drawing::Point(16, 10);
			this->R0->Name = L"R0";
			this->R0->Size = System::Drawing::Size(45, 13);
			this->R0->TabIndex = 76;
			this->R0->Text = L"R0=100";
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(573, 63);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 79;
			this->button1->Text = L"Start";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click_1);
			// 
			// label20
			// 
			this->label20->AutoSize = true;
			this->label20->Location = System::Drawing::Point(269, 104);
			this->label20->Name = L"label20";
			this->label20->Size = System::Drawing::Size(41, 13);
			this->label20->TabIndex = 80;
			this->label20->Text = L"R(ohm)";
			// 
			// timer1
			// 
			this->timer1->Enabled = true;
			this->timer1->Interval = 5000;
			this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
			// 
			// button2
			// 
			this->button2->Location = System::Drawing::Point(654, 63);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(75, 23);
			this->button2->TabIndex = 81;
			this->button2->Text = L"Stop";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
			// 
			// meranie
			// 
			this->meranie->AutoSize = true;
			this->meranie->Checked = true;
			this->meranie->Location = System::Drawing::Point(21, 17);
			this->meranie->Name = L"meranie";
			this->meranie->Size = System::Drawing::Size(63, 17);
			this->meranie->TabIndex = 82;
			this->meranie->TabStop = true;
			this->meranie->Text = L"Meranie";
			this->meranie->UseVisualStyleBackColor = true;
			this->meranie->CheckedChanged += gcnew System::EventHandler(this, &Form1::meranie_CheckedChanged);
			// 
			// odchylka
			// 
			this->odchylka->AutoSize = true;
			this->odchylka->Location = System::Drawing::Point(90, 17);
			this->odchylka->Name = L"odchylka";
			this->odchylka->Size = System::Drawing::Size(70, 17);
			this->odchylka->TabIndex = 83;
			this->odchylka->Text = L"Odchylka";
			this->odchylka->UseVisualStyleBackColor = true;
			this->odchylka->CheckedChanged += gcnew System::EventHandler(this, &Form1::odchylka_CheckedChanged);
			// 
			// panel4
			// 
			this->panel4->Controls->Add(this->odchylka);
			this->panel4->Controls->Add(this->meranie);
			this->panel4->Location = System::Drawing::Point(769, 39);
			this->panel4->Name = L"panel4";
			this->panel4->Size = System::Drawing::Size(173, 50);
			this->panel4->TabIndex = 84;
			// 
			// Stastu
			// 
			this->Stastu->AutoSize = true;
			this->Stastu->Location = System::Drawing::Point(155, 26);
			this->Stastu->Name = L"Stastu";
			this->Stastu->Size = System::Drawing::Size(67, 13);
			this->Stastu->TabIndex = 85;
			this->Stastu->Text = L"Status: none";
			// 
			// open
			// 
			this->open->Location = System::Drawing::Point(272, 49);
			this->open->Name = L"open";
			this->open->Size = System::Drawing::Size(75, 23);
			this->open->TabIndex = 86;
			this->open->Text = L"Vykonaj";
			this->open->UseVisualStyleBackColor = true;
			this->open->Click += gcnew System::EventHandler(this, &Form1::open_Click);
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(140, 51);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(126, 20);
			this->textBox1->TabIndex = 87;
			// 
			// numericUpDown1
			// 
			this->numericUpDown1->Location = System::Drawing::Point(494, 66);
			this->numericUpDown1->Name = L"numericUpDown1";
			this->numericUpDown1->Size = System::Drawing::Size(49, 20);
			this->numericUpDown1->TabIndex = 88;
			this->numericUpDown1->ValueChanged += gcnew System::EventHandler(this, &Form1::numericUpDown1_ValueChanged);
			// 
			// label21
			// 
			this->label21->AutoSize = true;
			this->label21->Location = System::Drawing::Point(549, 68);
			this->label21->Name = L"label21";
			this->label21->Size = System::Drawing::Size(18, 13);
			this->label21->TabIndex = 89;
			this->label21->Text = L"(s)";
			// 
			// label23
			// 
			this->label23->AutoSize = true;
			this->label23->Location = System::Drawing::Point(380, 68);
			this->label23->Name = L"label23";
			this->label23->Size = System::Drawing::Size(108, 13);
			this->label23->TabIndex = 90;
			this->label23->Text = L"Čas medzi meraniami:";
			// 
			// label24
			// 
			this->label24->AutoSize = true;
			this->label24->ForeColor = System::Drawing::Color::Red;
			this->label24->Location = System::Drawing::Point(1004, 676);
			this->label24->Name = L"label24";
			this->label24->Size = System::Drawing::Size(150, 13);
			this->label24->TabIndex = 91;
			this->label24->Text = L"červená - simulovaná hodnota";
			// 
			// label25
			// 
			this->label25->AutoSize = true;
			this->label25->ForeColor = System::Drawing::Color::Green;
			this->label25->Location = System::Drawing::Point(1004, 690);
			this->label25->Name = L"label25";
			this->label25->Size = System::Drawing::Size(121, 13);
			this->label25->TabIndex = 92;
			this->label25->Text = L"zelena- meraná hodnota";
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(452, 23);
			this->textBox2->Name = L"textBox2";
			this->textBox2->Size = System::Drawing::Size(37, 20);
			this->textBox2->TabIndex = 93;
			this->textBox2->Text = L"25,0";
			this->textBox2->TextChanged += gcnew System::EventHandler(this, &Form1::textBox2_TextChanged);
			// 
			// label26
			// 
			this->label26->AutoSize = true;
			this->label26->Location = System::Drawing::Point(366, 26);
			this->label26->Name = L"label26";
			this->label26->Size = System::Drawing::Size(74, 13);
			this->label26->TabIndex = 94;
			this->label26->Text = L"Teplota okolia";
			// 
			// label27
			// 
			this->label27->AutoSize = true;
			this->label27->Location = System::Drawing::Point(499, 26);
			this->label27->Name = L"label27";
			this->label27->Size = System::Drawing::Size(24, 13);
			this->label27->TabIndex = 95;
			this->label27->Text = L"(°C)";
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(1226, 712);
			this->Controls->Add(this->label27);
			this->Controls->Add(this->label26);
			this->Controls->Add(this->textBox2);
			this->Controls->Add(this->label25);
			this->Controls->Add(this->label24);
			this->Controls->Add(this->label23);
			this->Controls->Add(this->label21);
			this->Controls->Add(this->numericUpDown1);
			this->Controls->Add(this->textBox1);
			this->Controls->Add(this->open);
			this->Controls->Add(this->Stastu);
			this->Controls->Add(this->panel4);
			this->Controls->Add(this->button2);
			this->Controls->Add(this->label20);
			this->Controls->Add(this->button1);
			this->Controls->Add(this->panel3);
			this->Controls->Add(this->Vzorec);
			this->Controls->Add(this->checkBox6);
			this->Controls->Add(this->checkBox5);
			this->Controls->Add(this->checkBox4);
			this->Controls->Add(this->checkBox3);
			this->Controls->Add(this->checkBox2);
			this->Controls->Add(this->panel1);
			this->Controls->Add(this->pictureBox1);
			this->Controls->Add(this->panel2);
			this->Controls->Add(this->label22);
			this->Controls->Add(this->Y_os);
			this->Controls->Add(this->R_10);
			this->Controls->Add(this->R_11);
			this->Controls->Add(this->R_3);
			this->Controls->Add(this->R_4);
			this->Controls->Add(this->R_5);
			this->Controls->Add(this->R_6);
			this->Controls->Add(this->R_7);
			this->Controls->Add(this->R_8);
			this->Controls->Add(this->R_9);
			this->Controls->Add(this->R_2);
			this->Controls->Add(this->R_1);
			this->Controls->Add(this->label19);
			this->Controls->Add(this->label18);
			this->Controls->Add(this->label17);
			this->Controls->Add(this->label16);
			this->Controls->Add(this->label15);
			this->Controls->Add(this->label14);
			this->Controls->Add(this->label13);
			this->Controls->Add(this->label12);
			this->Controls->Add(this->label11);
			this->Controls->Add(this->label10);
			this->Controls->Add(this->label9);
			this->Controls->Add(this->label8);
			this->Controls->Add(this->label7);
			this->Controls->Add(this->label6);
			this->Controls->Add(this->label5);
			this->Controls->Add(this->label4);
			this->Controls->Add(this->label3);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->label1);
			this->MaximumSize = System::Drawing::Size(1242, 750);
			this->MinimumSize = System::Drawing::Size(1242, 750);
			this->Name = L"Form1";
			this->Text = L"Agilent 34972A comunicator";
			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
			this->panel2->ResumeLayout(false);
			this->panel2->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
			this->panel1->ResumeLayout(false);
			this->panel1->PerformLayout();
			this->panel3->ResumeLayout(false);
			this->panel3->PerformLayout();
			this->panel4->ResumeLayout(false);
			this->panel4->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}




			


		double NastavOs(double cislo){

			double nas;


			// nastavenioe osy Y na urcene hodnoty od 1-1000 prepisuje lable R1-R10
			if (cislo > 0.001) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,1");
			 this->R_3->Text=("0,1");
			 this->R_4->Text=("0,3");
			 this->R_5->Text=("0,4");
			 this->R_6->Text=("0,5");
			 this->R_7->Text=("0,6");
			 this->R_8->Text=("0,7");
			 this->R_9->Text=("0,8");
			 this->R_10->Text=("0,9");
			 this->R_11->Text=("1,0");

			 // jeda

			 nas= 500;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}

		if (cislo > 1 ) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // jeda

			 nas= 100;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}
		if (cislo > 6) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 // jeda

			 nas= 50;
			 this->label20->Text="R(Ohm)";
			}

		if (cislo > 10) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // jeda

			 nas= 10;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}
		if (cislo > 50) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // jeda

			 nas= 5;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}
		
		if (cislo > 100) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // jeda

			 nas= 1;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}
		if (cislo > 500) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("100");
			 this->R_3->Text=("200");
			 this->R_4->Text=("300");
			 this->R_5->Text=("400");
			 this->R_6->Text=("500");
			 this->R_7->Text=("600");
			 this->R_8->Text=("700");
			 this->R_9->Text=("800");
			 this->R_10->Text=("900");
			 this->R_11->Text=("1000");
			 // jeda

			 nas= 0.5;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			}
		if (cislo > 1000) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // kilo

			 nas= 0.1;
			 this->label20->Text="R(KOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(KV)";
			}
		if (cislo > 5000) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // kilo

			 nas= 0.05;
			 this->label20->Text="R(KOhm)";
			}
		if (cislo > 10000) 
			{
			  this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // kilo

			 nas= 0.01;
			 this->label20->Text="R(KOhm)";
			}

				if (cislo > 50000) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // kilo

			 nas= 0.005;
			 this->label20->Text="R(KOhm)";
			}
				if (cislo > 100000) 
			{
			  this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // kilo

			 nas= 0.001;
			 this->label20->Text="R(KOhm)";
			}

					if (cislo > 500000) 
			{
			 this->R_1->Text=("0");
			 this->R_2->Text=("0.1");
			 this->R_3->Text=("0.2");
			 this->R_4->Text=("0.3");
			 this->R_5->Text=("0.4");
			 this->R_6->Text=("0.5");
			 this->R_7->Text=("0.6");
			 this->R_8->Text=("0.7");
			 this->R_9->Text=("0.8");
			 this->R_10->Text=("0.9");
			 this->R_11->Text=("1");
			 // Mega

			 nas= 0.0005;
			 this->label20->Text="R(MOhm)";
			}
		

					//prepocer radu hodnoty od jednotiek po PIKO

			if (cislo < 1) {   // MILI
					if (cislo< 0.5) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 
			 // mili

			 nas= 1e3;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			}

				
				if (cislo< 0.1) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // mili

			 nas= 5e3;
			 this->label20->Text="R(mOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(mV)";
			}

				if (cislo< 0.05) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // mili

			 nas= 1e4;
			 this->label20->Text="R(mOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(mV)";

			 }
				if (cislo< 0.01) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // mili

			 nas= 5e4;
			 this->label20->Text="R(mOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(mV)";
			}

				
				if (cislo< 0.005) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // mili

			 nas= 1e5;
			 this->label20->Text="R(mOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(mV)";

			}

				
				if (cislo < 0.001) { // MIKRO

					cislo *=1000;

if (cislo< 0.5) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // mikro

			  nas= 1e6;
			  this->label20->Text="R(uOhm)";
			   if (this->in_6->Checked) this->label20->Text="U(uV)";
			}

				
				if (cislo< 0.1) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // mikro

			 nas= 5e6;
			 this->label20->Text="R(uOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(uV)";
			}

				if (cislo< 0.05) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // mikro

			  nas= 1e7;
			  this->label20->Text="R(uOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(uV)";
			 }
				if (cislo< 0.01) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // mikro

			  nas= 5e7;
			  this->label20->Text="R(uOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(uV)";
			}

				
				if (cislo< 0.005) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // mikro

			  nas= 1e8;
			  this->label20->Text="R(uOhm)";
			  if (this->in_6->Checked) this->label20->Text="U(uV)";

			}

				

			
				// prerobyt podla RB odporove termoclanyk a ... 





					if( cislo < 0.001) { // NANO

						

					cislo *=1000;  // sko o rad

				if (cislo< 0.5) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // nano 
	
			 nas= 1e9;
			 this->label20->Text="R(nOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(nV)";
			}

				
				if (cislo< 0.1) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // nano 

			 nas= 5e9;
			 this->label20->Text="R(nanoOhm)";
			}

				if (cislo< 0.05) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // nano 

			 nas= 1e9;
			 this->label20->Text="R(nanoOhm)";

			 }
				if (cislo< 0.01) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // nano 

			 nas= 5e10;
			 this->label20->Text="R(nanoOhm)";
			}

				
				if (cislo< 0.005) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // nano 

			nas= 1e11;
			this->label20->Text="R(nanoOhm)";
			}

				// prerobyt podla RB odporove termoclanyk a ... 






						if (cislo < 0.001) { // PIKO

							

					cislo *= 1000;  // sko o rad

				if (cislo< 0.5) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // piko 

			 nas= 1e12;
			 this->label20->Text="R(pikoOhm)";
			}

				
				if (cislo< 0.1) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // piko

			 nas= 5e12;
			 this->label20->Text="R(pikoOhm)";
			}

				if (cislo< 0.05) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // piko

			 nas= 1e13;
			 this->label20->Text="R(pikoOhm)";
			 }
				if (cislo< 0.01) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // piko


			 nas= 5e13;
			 this->label20->Text="R(pikoOhm)";
			}

				
				if (cislo< 0.005) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // piko

			 nas= 1e14;
			 this->label20->Text="R(pikoOhm)";
			}

				// prerobyt podla RB odporove termoclanyk a ... 
			
			
				
			if (cislo < 0.001) { // fento

				cislo *= 1000;  // sko o rad

				if (cislo< 0.5) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("50");
			 this->R_3->Text=("100");
			 this->R_4->Text=("150");
			 this->R_5->Text=("200");
			 this->R_6->Text=("250");
			 this->R_7->Text=("300");
			 this->R_8->Text=("350");
			 this->R_9->Text=("400");
			 this->R_10->Text=("450");
			 this->R_11->Text=("500");
			 // fento

			 nas= 1e15;
			 this->label20->Text="R(fentoOhm)";
			}

				
				if (cislo< 0.1) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("10");
			 this->R_3->Text=("20");
			 this->R_4->Text=("30");
			 this->R_5->Text=("40");
			 this->R_6->Text=("50");
			 this->R_7->Text=("60");
			 this->R_8->Text=("70");
			 this->R_9->Text=("80");
			 this->R_10->Text=("90");
			 this->R_11->Text=("100");
			 // fento

			 nas= 5e15;
			 this->label20->Text="R(fentoOhm)";
			}

				if (cislo< 0.05) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("5");
			 this->R_3->Text=("10");
			 this->R_4->Text=("15");
			 this->R_5->Text=("20");
			 this->R_6->Text=("25");
			 this->R_7->Text=("30");
			 this->R_8->Text=("35");
			 this->R_9->Text=("40");
			 this->R_10->Text=("45");
			 this->R_11->Text=("50");
			 // fento


			 nas= 1e16;
			 this->label20->Text="R(fentoOhm)";

			 }
				if (cislo< 0.01) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("1");
			 this->R_3->Text=("2");
			 this->R_4->Text=("3");
			 this->R_5->Text=("4");
			 this->R_6->Text=("5");
			 this->R_7->Text=("6");
			 this->R_8->Text=("7");
			 this->R_9->Text=("8");
			 this->R_10->Text=("9");
			 this->R_11->Text=("10");
			 // fento


			 nas= 5e16;
			 this->label20->Text="R(fentoOhm)";
			}

				
				if (cislo< 0.005) {
			 this->R_1->Text=("0");
			 this->R_2->Text=("0,5");
			 this->R_3->Text=("1");
			 this->R_4->Text=("1,5");
			 this->R_5->Text=("2");
			 this->R_6->Text=("2,5");
			 this->R_7->Text=("3");
			 this->R_8->Text=("3,5");
			 this->R_9->Text=("4");
			 this->R_10->Text=("4,5");
			 this->R_11->Text=("5");
			 // fento
			 nas= 1e17;
			 this->label20->Text="R(fentoOhm)";
			}
			}
						}
					}
				}
			}
 
			
		
		return nas;
		}

///////////////////////////////////////////////////////////////////////////////////////////////////////////ú
		//////////////////////////////////////////////////////////////////////////////////////////////


		double NastavOdch (double cislo){

			double nas;


			 this->R_1->Text=("-500");
			 this->R_2->Text=("-400");
			 this->R_3->Text=("-300");
			 this->R_4->Text=("-200");
			 this->R_5->Text=("-100");
			 this->R_6->Text=("0");
			 this->R_7->Text=("100");
			 this->R_8->Text=("200");
			 this->R_9->Text=("300");
			 this->R_10->Text=("400");
			 this->R_11->Text=("500");

			 // +-5k

			 nas= 0.0005;
			 this->label20->Text="R(kOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(kV)";

			 if (cislo < 100000){
			this->R_1->Text=("-100");
			 this->R_2->Text=("-80");
			 this->R_3->Text=("-60");
			 this->R_4->Text=("-40");
			 this->R_5->Text=("-20");
			 this->R_6->Text=("0");
			 this->R_7->Text=("20");
			 this->R_8->Text=("40");
			 this->R_9->Text=("60");
			 this->R_10->Text=("80");
			 this->R_11->Text=("100");

			 // +-10k

			 nas= 0.0025;
			 this->label20->Text="R(kOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(kV)";
			 }
			if (cislo < 50000)
			 {
			 this->R_1->Text=("-50");
			 this->R_2->Text=("-40");
			 this->R_3->Text=("-30");
			 this->R_4->Text=("-20");
			 this->R_5->Text=("-10");
			 this->R_6->Text=("0");
			 this->R_7->Text=("10");
			 this->R_8->Text=("20");
			 this->R_9->Text=("30");
			 this->R_10->Text=("40");
			 this->R_11->Text=("50");

			 // +-5k

			 nas= 0.005;
			 this->label20->Text="R(kOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(kV)";
			 }


			if (cislo < 10000) {
			 this->R_1->Text=("-10");
			 this->R_2->Text=("-8");
			 this->R_3->Text=("-6");
			 this->R_4->Text=("-4");
			 this->R_5->Text=("-2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("2");
			 this->R_8->Text=("4");
			 this->R_9->Text=("6");
			 this->R_10->Text=("8");
			 this->R_11->Text=("10");

			 // +-10k

			 nas= 0.025;
			 this->label20->Text="R(kOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(kV)";
			}

			 if (cislo < 5000)
			 {
			 this->R_1->Text=("-5");
			 this->R_2->Text=("-4");
			 this->R_3->Text=("-3");
			 this->R_4->Text=("-2");
			 this->R_5->Text=("-1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("1");
			 this->R_8->Text=("2");
			 this->R_9->Text=("3");
			 this->R_10->Text=("4");
			 this->R_11->Text=("5");

			 // +-5k

			 nas= 0.05;
			 this->label20->Text="R(kOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(kV)";
			 }

	 if (cislo < 1000)
			 {
			  this->R_1->Text=("-1000");
			 this->R_2->Text=("-800");
			 this->R_3->Text=("-600");
			 this->R_4->Text=("-400");
			 this->R_5->Text=("-200");
			 this->R_6->Text=("0");
			 this->R_7->Text=("200");
			 this->R_8->Text=("400");
			 this->R_9->Text=("600");
			 this->R_10->Text=("800");
			 this->R_11->Text=("1000");

			 // +-10k

			 nas= 0.25;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }


			 if (cislo < 500)
			 {
			 this->R_1->Text=("-500");
			 this->R_2->Text=("-400");
			 this->R_3->Text=("-300");
			 this->R_4->Text=("-200");
			 this->R_5->Text=("-100");
			 this->R_6->Text=("0");
			 this->R_7->Text=("100");
			 this->R_8->Text=("200");
			 this->R_9->Text=("300");
			 this->R_10->Text=("400");
			 this->R_11->Text=("500");

			 // +-5k

			 nas= 0.5;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }

			  if (cislo < 100)
			 {
			  this->R_1->Text=("-100");
			 this->R_2->Text=("-80");
			 this->R_3->Text=("-60");
			 this->R_4->Text=("-40");
			 this->R_5->Text=("-20");
			 this->R_6->Text=("0");
			 this->R_7->Text=("20");
			 this->R_8->Text=("40");
			 this->R_9->Text=("60");
			 this->R_10->Text=("80");
			 this->R_11->Text=("100");

			 // +-10k

			 nas= 2.5;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }


			 if (cislo < 50)
			 {
			 this->R_1->Text=("-50");
			 this->R_2->Text=("-40");
			 this->R_3->Text=("-30");
			 this->R_4->Text=("-20");
			 this->R_5->Text=("-10");
			 this->R_6->Text=("0");
			 this->R_7->Text=("10");
			 this->R_8->Text=("20");
			 this->R_9->Text=("30");
			 this->R_10->Text=("40");
			 this->R_11->Text=("50");

			 // +-5k

			 nas= 5;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }

			  if (cislo < 10)
			 {
			  this->R_1->Text=("-10");
			 this->R_2->Text=("-8");
			 this->R_3->Text=("-6");
			 this->R_4->Text=("-4");
			 this->R_5->Text=("-2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("2");
			 this->R_8->Text=("4");
			 this->R_9->Text=("6");
			 this->R_10->Text=("8");
			 this->R_11->Text=("10");

			 // +-10k

			 nas= 25;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }


			 if (cislo < 5)
			 {
			 this->R_1->Text=("-5");
			 this->R_2->Text=("-4");
			 this->R_3->Text=("-3");
			 this->R_4->Text=("-2");
			 this->R_5->Text=("-1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("1");
			 this->R_8->Text=("2");
			 this->R_9->Text=("3");
			 this->R_10->Text=("4");
			 this->R_11->Text=("5");

			 // +-5k

			 nas= 50;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }

			  if (cislo < 1)
			 {
			  this->R_1->Text=("-1");
			 this->R_2->Text=("-0,8");
			 this->R_3->Text=("-0,6");
			 this->R_4->Text=("-0,4");
			 this->R_5->Text=("-0,2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,2");
			 this->R_8->Text=("0,4");
			 this->R_9->Text=("0,6");
			 this->R_10->Text=("0,8");
			 this->R_11->Text=("1");

			 // +-10k

			 nas= 250;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }


			 if (cislo < 0.5)
			 {
			 this->R_1->Text=("-0,5");
			 this->R_2->Text=("-0,4");
			 this->R_3->Text=("-0,3");
			 this->R_4->Text=("-0,2");
			 this->R_5->Text=("-0,1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,1");
			 this->R_8->Text=("0,2");
			 this->R_9->Text=("0,3");
			 this->R_10->Text=("0,4");
			 this->R_11->Text=("0,5");

			 // +-5k

			 nas= 500;
			 this->label20->Text="R(Ohm)";
			 if (this->in_6->Checked) this->label20->Text="U(V)";
			 }

			 if (cislo < 0.1)
			 {
			  this->R_1->Text=("-100");
			 this->R_2->Text=("-80");
			 this->R_3->Text=("-60");
			 this->R_4->Text=("-40");
			 this->R_5->Text=("-20");
			 this->R_6->Text=("0");
			 this->R_7->Text=("20");
			 this->R_8->Text=("40");
			 this->R_9->Text=("60");
			 this->R_10->Text=("80");
			 this->R_11->Text=("100");

			 // +-10k

			 nas= 2500;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.05)
			 {
			 this->R_1->Text=("-50");
			 this->R_2->Text=("-40");
			 this->R_3->Text=("-30");
			 this->R_4->Text=("-20");
			 this->R_5->Text=("-10");
			 this->R_6->Text=("0");
			 this->R_7->Text=("10");
			 this->R_8->Text=("20");
			 this->R_9->Text=("30");
			 this->R_10->Text=("40");
			 this->R_11->Text=("50");

			 // +-5k

			 nas= 5000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }

			  if (cislo < 0.01)
			 {
			  this->R_1->Text=("-10");
			 this->R_2->Text=("-8");
			 this->R_3->Text=("-6");
			 this->R_4->Text=("-4");
			 this->R_5->Text=("-2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("2");
			 this->R_8->Text=("4");
			 this->R_9->Text=("6");
			 this->R_10->Text=("8");
			 this->R_11->Text=("10");

			 // +-10k

			 nas= 25000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.005)
			 {
			 this->R_1->Text=("-5");
			 this->R_2->Text=("-4");
			 this->R_3->Text=("-3");
			 this->R_4->Text=("-2");
			 this->R_5->Text=("-1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("1");
			 this->R_8->Text=("2");
			 this->R_9->Text=("3");
			 this->R_10->Text=("4");
			 this->R_11->Text=("5");

			 // +-5k

			 nas= 50000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }

			  if (cislo < 0.001)
			 {
			  this->R_1->Text=("-1");
			 this->R_2->Text=("-0,8");
			 this->R_3->Text=("-0,6");
			 this->R_4->Text=("-0,4");
			 this->R_5->Text=("-0,2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,2");
			 this->R_8->Text=("0,4");
			 this->R_9->Text=("0,6");
			 this->R_10->Text=("0,8");
			 this->R_11->Text=("1");

			 // +-10k

			 nas= 250000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.0005)
			 {
			 this->R_1->Text=("-0,5");
			 this->R_2->Text=("-0,4");
			 this->R_3->Text=("-0,3");
			 this->R_4->Text=("-0,2");
			 this->R_5->Text=("-0,1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,1");
			 this->R_8->Text=("0,2");
			 this->R_9->Text=("0,3");
			 this->R_10->Text=("0,4");
			 this->R_11->Text=("0,5");

			 // +-5k

			 nas= 500000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }

			 if (cislo < 0.0001)
			 {
			  this->R_1->Text=("-100");
			 this->R_2->Text=("-80");
			 this->R_3->Text=("-60");
			 this->R_4->Text=("-40");
			 this->R_5->Text=("-20");
			 this->R_6->Text=("0");
			 this->R_7->Text=("20");
			 this->R_8->Text=("40");
			 this->R_9->Text=("60");
			 this->R_10->Text=("80");
			 this->R_11->Text=("100");

			 // +-10k

			 nas= 2500000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.00005)
			 {
			 this->R_1->Text=("-50");
			 this->R_2->Text=("-40");
			 this->R_3->Text=("-30");
			 this->R_4->Text=("-20");
			 this->R_5->Text=("-10");
			 this->R_6->Text=("0");
			 this->R_7->Text=("10");
			 this->R_8->Text=("20");
			 this->R_9->Text=("30");
			 this->R_10->Text=("40");
			 this->R_11->Text=("50");

			 // +-5k

			 nas= 5000000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }

			  if (cislo < 0.00001)
			 {
			  this->R_1->Text=("-10");
			 this->R_2->Text=("-8");
			 this->R_3->Text=("-6");
			 this->R_4->Text=("-4");
			 this->R_5->Text=("-2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("2");
			 this->R_8->Text=("4");
			 this->R_9->Text=("6");
			 this->R_10->Text=("8");
			 this->R_11->Text=("10");

			 // +-10k

			 nas= 25000000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.000005)
			 {
			 this->R_1->Text=("-5");
			 this->R_2->Text=("-4");
			 this->R_3->Text=("-3");
			 this->R_4->Text=("-2");
			 this->R_5->Text=("-1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("1");
			 this->R_8->Text=("2");
			 this->R_9->Text=("3");
			 this->R_10->Text=("4");
			 this->R_11->Text=("5");

			 // +-5k

			 nas= 50000000;
			 this->label20->Text="R(mOhm)";
			 }

			  if (cislo < 0.000001)
			 {
			  this->R_1->Text=("-1");
			 this->R_2->Text=("-4,8");
			 this->R_3->Text=("-0,6");
			 this->R_4->Text=("-0,4");
			 this->R_5->Text=("-0,2");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,2");
			 this->R_8->Text=("0,4");
			 this->R_9->Text=("0,6");
			 this->R_10->Text=("0,8");
			 this->R_11->Text=("1");

			 // +-10k

			 nas= 25000000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }


			 if (cislo < 0.0000005)
			 {
			 this->R_1->Text=("-0,5");
			 this->R_2->Text=("-0,4");
			 this->R_3->Text=("-0,3");
			 this->R_4->Text=("-0,2");
			 this->R_5->Text=("-0,1");
			 this->R_6->Text=("0");
			 this->R_7->Text=("0,1");
			 this->R_8->Text=("0,2");
			 this->R_9->Text=("0,3");
			 this->R_10->Text=("0,4");
			 this->R_11->Text=("0,5");

			 // +-5k

			 nas= 500000000;
			 this->label20->Text="R(mOhm)";
			 if (this->in_6->Checked) this->label20->Text="U(mV)";
			 }

			return nas;
			}

		

#pragma endregion



		// main 
		//
private: System::Void pictureBox1_Paint(System::Object^  sender, System::Windows::Forms::PaintEventArgs^  e) {
				Graphics^ g = e->Graphics;
			

				int C;
				 if(this->Con_2->Checked) C=2;
				 if(this->con_3->Checked) C=3;
				 if(this->con_4->Checked) C=4;
				 if(this->con_5->Checked) C=5;

				//if(this->meranie->Checked){


				 double odpor0,odpor1,nasob;
				 int n=0;
				 int a,teplota;

				// if(this->Con_1->Checked) C=1;		// pre vypočet uvažovanie  ¨s konštantou

				 
///////////////////////////////////////////////////////////////////////////////////////

				 //-----====Teoreticke hodnoty ======----//

		///////////////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////////////


				  if(this->in_2->Checked) {									//nastavenie osi
							odpor0=platina (243,C);
							nasob = NastavOs(platina(430,4));
						}
				  if(this->in_3->Checked) {									//nastavenie osi
							odpor0=nikel (243,C);
							nasob = NastavOs(nikel(430,5));
						}

				  if(this->in_4->Checked) {									//nastavenie osi
							odpor0=nikel (243,C);
							nasob = NastavOs(nikel(430,5));
						}
				   if(this->in_5->Checked) {									//nastavenie osi
							odpor0=NTC (243,C);
							nasob = NastavOs(NTC(243,C));
							}
					if(this->in_6->Checked) {									//nastavenie osi
							odpor0=termpoclanok(243,C,temp);
							nasob = NastavOdch(termpoclanok(430,C,temp));
						}
// v pripade teoretickej hodnoty
				   //-------------------------------------------------------------
				   if ((((this->in_2->Checked)&&(this->checkBox2->Checked)) || ((this->in_3->Checked)&&(this->checkBox3->Checked)) || ((this->in_4->Checked)&&(this->checkBox4->Checked))||(this->in_5->Checked)&&(this->checkBox5->Checked)||(this->in_6->Checked)&&(this->checkBox6->Checked))&&this->meranie->Checked)
{
				
				teplota=243;			
		for(n=243;n<423;n++)
		{
							
							if(((this->in_2->Checked)&&(this->checkBox2->Checked))) {	
								odpor1= platina (n,C);
							}

							if(((this->in_3->Checked)&&(this->checkBox3->Checked)) || ((this->in_4->Checked)&&(this->checkBox4->Checked))) {
								odpor1= nikel (n,C);
							}
							
							if(((this->in_5->Checked)&&(this->checkBox5->Checked))){
								odpor1= NTC (n,C);	
							}
							if(((this->in_6->Checked)&&(this->checkBox6->Checked))){
								odpor1= termpoclanok (n,C,temp);	
							}

								
								// origo : X=10 , Y=10
	
							if ((this->in_6->Checked)&&(this->checkBox6->Checked)) g->DrawLine( System::Drawing::Pens::Red,((5*(teplota-244.15))+10),int(500-(250+(odpor0*nasob))),((5*(teplota-243.15))+10), int(500-(250+(odpor1*nasob))));   // ^ =alt+94
							else g->DrawLine( System::Drawing::Pens::Red,((5*(teplota-244.15))+10),int(500-(odpor0*nasob)),((5*(teplota-243.15))+10), int(500-(odpor1*nasob)));   // ^ =alt+94


							  odpor0=odpor1;
							  teplota++;
	
						}
}
				 //-------------------------------------------------------------------------
			
		 //read from file

if (en== true && this->meranie->Checked)
{
			int num= lineFile(name)-1;
			int stlpec;
			double temp0,temp1,val0,val1;
			int stppec;

			if(this->in_2->Checked) stlpec=5;
			if(this->in_3->Checked) stlpec=1;
			if(this->in_4->Checked) stlpec=3;
			if(this->in_5->Checked) stlpec=7;
			if(this->in_6->Checked) stlpec=9;



			int i=0;

			for (int i=0;i<num;i++)
			{
				
			temp0= readFile(i,stlpec-1,name);
			val0= readFile(i,stlpec,name);

			temp1= readFile(i+1,stlpec-1,name);
			val1= readFile(i+1,stlpec,name);

			
				
			
				if (this->in_6->Checked) g->DrawLine( System::Drawing::Pens::Green,int((5*(temp0+30))+10),int(500-(250+(val0*nasob))),int((5*(temp1+30))+10), int(500-(250+(val1*nasob))));   // ^ =alt+94
				else g->DrawLine( System::Drawing::Pens::Green,int((5*(temp0+30))+10),int(500-(val0*nasob)),int((5*(temp1+30))+10), int(500-(val1*nasob)));   // ^ =alt+94

			}
}


if (en == true && this->odchylka->Checked)
{
				int num= lineFile(name)-1;
				int stlpec;
				double temp0,temp1,val0,val1;
				int stppec;

				if(this->in_2->Checked) stlpec=5;
				if(this->in_3->Checked) stlpec=1;
				if(this->in_4->Checked) stlpec=3;
				if(this->in_5->Checked) stlpec=7;
				if(this->in_6->Checked)	stlpec=9;

					double maxVal=0;
					double odchylka, odchylka1;

							for (int i=0;i<num;i++)
					{
				
					temp0= readFile(i,stlpec-1,name);
					val0= readFile(i,stlpec,name);
				if(this->in_2->Checked) odchylka = val0 - (platina((temp0+ 273.15),C)) ;
				if(this->in_3->Checked) odchylka = val0 - nikel((temp0+ 273.15),C);
				if(this->in_4->Checked) odchylka = val0 - nikel((temp0+ 273.15),C);
				if(this->in_5->Checked) odchylka = val0 - NTC((temp0+ 273.15),C);
				if(this->in_6->Checked)	odchylka = val0 - termpoclanok(temp0+273.15,C,temp);

					if (odchylka<0) odchylka= odchylka*(-1.0);
					if (maxVal<odchylka) maxVal=odchylka;
					}

							double nas = NastavOdch (maxVal);


				for (int i=0;i<num;i++)
					{
				
					temp0= readFile(i,stlpec-1,name);
					val0= readFile(i,stlpec,name);

					temp1= readFile(i+1,stlpec-1,name);
					val1= readFile(i+1,stlpec,name);
				
				if(this->in_2->Checked) odchylka = val0 - (platina((temp0+ 273.15),C)) ;
				if(this->in_3->Checked) odchylka = val0 - nikel((temp0+ 273.15),C);
				if(this->in_4->Checked) odchylka = val0 - nikel((temp0+ 273.15),C);
				if(this->in_5->Checked) odchylka = val0 - NTC((temp0+ 273.15),C);
				if(this->in_6->Checked)	odchylka = val0 - termpoclanok(temp0+273.15,C,temp);

				if(this->in_2->Checked) odchylka1 = val1 - (platina((temp1+ 273.15),C)) ;
				if(this->in_3->Checked) odchylka1 = val1 - nikel((temp1+ 273.15),C);
				if(this->in_4->Checked) odchylka1 = val1 - nikel((temp1+ 273.15),C);
				if(this->in_5->Checked) odchylka1 = val1 - NTC((temp1+ 273.15),C);
				if(this->in_6->Checked)	odchylka1 = val1 - termpoclanok(temp1+273.15,C,temp);


				g->DrawLine( System::Drawing::Pens::Red,int((5*(temp0+30))+10),int(500-(250-(odchylka*nas))),int((5*(temp1+30))+10), int(500-(250-(odchylka1*nas))));   // ^ =alt+94

					}
}		
		}
		
////////////////////////////////////////////////////////////////////////////////////////////
						////////////////////////////////////////////////////////////////
						/////////////////////////////////////////////////////////////////
						////////////////////////////////////////////////////////////////
						//////////////////////////////////////////////////////////////////
						///////////////////////////////////////////////////////////////////
						//////////////////////////////////////////////////////////////////
private: System::Void connectToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {

		 }
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
			 
			 //char *vstup = (char*)Marshal::StringToHGlobalAnsi(this->textBox1->Text).ToPointer();
			
			// this->Vzorec->Text = gcnew System::String(vstup);
		 }
private: System::Void listView1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void listView1_SelectedIndexChanged_1(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void toolStripContainer1_ContentPanel_Load(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void in_1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");
			 this->pictureBox1->Invalidate();

			 this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^3(t-100)]";

			 this->R0->Text="R0=100";
			 this->Con_2->Text="A=3,90802e-3";
			 this->con_3->Visible=true;
			 this->con_3->Text="B=-5,80195e-7";
			 this->con_4->Visible=true;
			 this->con_4->Text="C=-4,27350e-12";
			 
			 this->con_4->Checked=true;
			 
			 this->con_5->Visible=false;
			 			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;
		 }
private: System::Void in_2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");

			 this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^3(t-100)]";

			 this->R0->Text="R0=100";
			 this->Con_2->Text="A=3,90802e-3";
			 this->con_3->Visible=true;
			 this->con_3->Text="B=-5,80195e-7";
			 this->con_4->Visible=true;
			 this->con_4->Text="C=-4,27350e-12";
			 
			 this->con_4->Checked=true;
			 
			 this->con_5->Visible=false;
			 			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->radioButton5->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;
		 }

private: System::Void con_5_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void con_4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void con_3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void Con_2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void checkBox1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void checkBox2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void in_3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");
			 this->pictureBox1->Invalidate();
			  this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^3(t-100)]";

			 this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^4+Dt^6]";

			 this->R0->Text="R0=1000";
			 this->Con_2->Text="A=5,485e-3";
			 this->con_3->Visible=true;
			 this->con_3->Text="B=6,650e-6";
			 this->con_4->Visible=true;
			 this->con_4->Text="C=2,805e-11";
			 this->con_5->Visible=true;
			 this->con_5->Text="D=-2,000e-17";

			 this->con_5->Checked=true;

			 			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->radioButton5->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;
			 
			 
		 }
private: System::Void in_4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {			 
			 this->pictureBox1->Invalidate();
				if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");
			  this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^3(t-100)]";

			 this->Vzorec->Text="Rt=R0*[1+At+Bt^2+Ct^4+Dt^6]";

			 this->R0->Text="R0=1000";
			 this->Con_2->Text="A=5,485e-3";
			 this->con_3->Visible=true;
			 this->con_3->Text="B=6,650e-6";
			 this->con_4->Visible=true;
			 this->con_4->Text="C=2,805e-11";
			 this->con_5->Visible=true;
			 this->con_5->Text="D=-2,000e-17";

			 this->con_5->Checked=true;

			 			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->radioButton5->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;
		 }
private: System::Void checkBox3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			this->pictureBox1->Invalidate();
		 }
private: System::Void checkBox4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void in_5_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");
			 this->pictureBox1->Invalidate();

			 this->Vzorec->Text="T=[A+B*(lnR)+C*(lnR)^3]^-1";

			 this->R0->Text="A = 1,152085338392319e-3";
			 this->Con_2->Text="B = 2.13146276927388e-4";
			 this->con_3->Visible=true;
			 this->con_3->Text="C = 9.372336566006315e-8";
			 this->con_4->Visible=false;

			 this->con_3->Checked=true;
			 this->con_5->Visible=false;

			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->radioButton5->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;


		 }
private: System::Void checkBox5_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
			 String ^ file=System::Convert::ToString(DateTime::Now);
			 String ^ fil2;
			 int length= file->Length;	
			 for (int i=0;i<length;i++)
				 {
					 if (file[i]=='.' || file[i]==':') fil2+="_";
					else fil2+=file[i];
				}

			fil2+= ".txt";
			name=  (char*)(void*)Marshal::StringToHGlobalAnsi(fil2);

			createF(name);

			
			this->pictureBox1->Invalidate();
			bool c = Meranie(name,TCPIP);

			en=true;
			 int a= System::Convert::ToInt16(this->numericUpDown1->Text);

			this->timer1->Interval=a*1000;
			this->timer1->Start();
		 }


private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->timer1->Stop();

		 }
private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {
			bool a=Meranie(name,TCPIP);
			if (a)	this->pictureBox1->Invalidate();
		 }
private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			if (this->meranie->Checked)  this->pictureBox1->Image= Image::FromFile("podklad.png");
			 this->pictureBox1->Invalidate();
			 this->timer1->Stop();
			 this->radioButton1->Visible=false;
			 this->radioButton2->Visible=false;
			 this->radioButton3->Visible=false;
			 this->radioButton4->Visible=false;
			 this->radioButton5->Visible=false;
			 this->C0->Visible=false;
			 this->C1->Visible=false;

			 this->button1->Visible=false;
			 this->button2->Visible=false;
			 this->odchylka->Visible=false;
			 this->numericUpDown1->Visible=false;
			 this->label21->Visible=false;
			 this->label23->Visible=false;

		 }
private: System::Void meranie_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			
			 this->pictureBox1->Invalidate();
			 this->pictureBox1->Image= Image::FromFile("podklad.png");
			 if (this->in_6->Checked) this->pictureBox1->Image= Image::FromFile("podklad_odchylka.png");
			 this->label24->Text="červená - simulovaná hodnota";
			 this->label25->Visible=true;
		 }
private: System::Void odchylka_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {			
			 this->pictureBox1->Invalidate();
			 this->pictureBox1->Image= Image::FromFile("podklad_odchylka.png");
			 this->label24->Text="červená - odchylka";
			 this->label25->Visible=false;
		 }
private: System::Void in_6_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {

			 this->pictureBox1->Image= Image::FromFile("podklad_odchylka.png");
			 this->pictureBox1->Invalidate();

			 this->radioButton1->Visible=true;
			 this->radioButton2->Visible=true;
			 this->radioButton3->Visible=true;
			 this->radioButton4->Visible=true;
			 this->radioButton5->Visible=true;
			 this->C0->Visible=true;
			 this->C1->Visible=true;
			 this->con_3->Visible=true;
			 this->con_4->Visible=true;
			 this->con_5->Visible=true;

			 this->Vzorec->Text="U=b0+SUM[bi(t90)^i]+C0exp[C1(t90–126,9686)^2] (uV)";


			 this->R0->Text="b0= -1,7600413686e1;";
			 this->Con_2->Text="b1= 3.8921204975e1";
			 this->con_3->Text="b2= 1.8558770032e-2";
			 this->con_4->Text="b3= -9.9457592874e-5";
			 this->con_5->Text="b4= 3.1840945719e-7";
			 this->radioButton1->Text="b5= -5.6072844889e-10";
			 this->radioButton2->Text="b6= 5.6075059059e-13";
			 this->radioButton3->Text="b7= -3.2020720003e-16";
			 this->radioButton4->Text="b8= 9.7151147152e-20";
			 this->radioButton5->Text="b9= -1.2104721275e-23";
			 this->radioButton5->Checked=true;

			 // double i= termpoclanok(150,5);
		 }

private: System::Void open_Click(System::Object^  sender, System::EventArgs^  e) {
			 char *vstup = (char*)Marshal::StringToHGlobalAnsi(this->textBox1->Text).ToPointer();
			 if (this->OpenF->Checked)
	{
			 if (openFile (vstup))
			 {
				 name= vstup;
				 en = true;
				 this->Stastu->Text= "Status: otvorený subor ";
				 this->Stastu->ForeColor::set(System::Drawing::Color::Green);
				 this->Stastu->Text += gcnew System::String(vstup);
				 this->odchylka->Visible= true;
				 				this->numericUpDown1->Visible=false;
				 					this->button1->Visible=false;
									this->button2->Visible=false;
									this->label21->Visible=false;
									this->label23->Visible=false;
				 this->pictureBox1->Invalidate();
			 }
			 else {
				 this->Stastu->Text="Status: nespravny subor";
				 this->Stastu->ForeColor::set(System::Drawing::Color::Red);
				 this->meranie->Checked=true;
				 this->odchylka->Visible=false;
				 this->button1->Visible=false;
				this->button2->Visible=false;
				this->numericUpDown1->Visible=false;
				this->label21->Visible=false;
				this->label23->Visible=false;
				 en=false;
				 this->pictureBox1->Invalidate();
				 
				}
	}
			 if (this->OpenIP->Checked) {
				String ^ idn="TCPIP0::";
					idn+= (this->textBox1->Text);
					idn+="::inst0::INSTR";

					char* id= (char*)Marshal::StringToHGlobalAnsi(idn).ToPointer();

					
	
				 if (ident(id))// dopln retazec
				 {
									TCPIP=id;
									this->Stastu->Text= "Status: pripojený k zariadeniu";
									this->Stastu->ForeColor::set(System::Drawing::Color::Green);
									this->odchylka->Visible= true;
									this->numericUpDown1->Visible=true;
									this->button1->Visible=true;
									this->button2->Visible=true;
									this->label21->Visible=true;
									this->label23->Visible=true;
									this->pictureBox1->Invalidate();
				 }
				 else {
									this->Stastu->Text= "Status: nenajdene zadiadenie";
									this->Stastu->ForeColor::set(System::Drawing::Color::Red);
									this->odchylka->Visible= false;
									this->numericUpDown1->Visible=false;
									this->button1->Visible=false;
									this->button2->Visible=false;
									this->label21->Visible=false;
									this->label23->Visible=false;
									en=false;
				 }

			 }

		 }

private: System::Void radioButton1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void radioButton2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void radioButton3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void radioButton4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void radioButton5_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
private: System::Void numericUpDown1_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
			 if(this->numericUpDown1->Text=="0") this->numericUpDown1->Text="1" ;
		 }
private: System::Void textBox2_TextChanged(System::Object^  sender, System::EventArgs^  e) {
			 char *cislo = (char*)Marshal::StringToHGlobalAnsi(this->textBox2->Text).ToPointer();
			 
			 if ( isNum(cislo))
			 {
				 temp=System::Convert::ToDouble(this->textBox2->Text);
				this->textBox2->ForeColor::set(System::Drawing::Color::Black);
				this->pictureBox1->Invalidate();

			 }
			 else this->textBox2->ForeColor::set(System::Drawing::Color::Red);
		 }
private: System::Void checkBox6_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Invalidate();
		 }
};
}

