#pragma once

using namespace System;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Drawing::Drawing2D;

namespace Sianaso{

ref class Chart
{
private:
	array<Label^>^ xs;
	array<Label^>^ ys;
	PictureBox^  graf;
	bool scale_changed;
	//array<double,2>^ chart_array;
	array<float,2>^ chart_array2;
	array<float,2>^ chart_array3;
	int array_index2;
	int array_index3;
	//int array_index;
	void Draw(float t, float y, array<float,2>^ chart_array, int %array_index, int numOfChart);
	void Chart_Refresh(System::Windows::Forms::PaintEventArgs^  e, array<float,2>^ chart_array, int %array_index, int numOfChart);
public:
	float xmin, xmax, ymin, ymax;
	property int array_index
	{
		int get();
	}

	Chart(array<Label^>^ _xs, array<Label^>^ ys, PictureBox^  _graf1);
	bool Chart_change_grid(System::Windows::Forms::PaintEventArgs^  e, float x_min, float y_min, float x_max, float y_max, bool labes_ref);
	bool Chart_change_grid(float x_min, float y_min, float x_max, float y_max);
	void Chart_Refresh(System::Windows::Forms::PaintEventArgs^  e);
	void Chart_Refresh(void);
	void Chart_Refresh_grid(System::Windows::Forms::PaintEventArgs^  e);
	void Chart_Refresh_grid(void);
	bool Chart_Change_Scale(Rectangle Rec);
	void Chart_Draw(float t, float y, int numOfChart);
	void Chart_Clear(void);
	void Chart_AutoScale(void);
};
}
