Меню

Ошибка lnk2001 неразрешенный внешний символ static

error LNK2001: unresolved external symbol «private: static class irrklang::ISoundEngine * GameEngine::Sound::_soundDevice» (?_soundDevice@Sound@GameEngine@@0PAVISoundEngine@irrklang@@A)

I cannot figure out why i am receiving this error. I believe i am initializing correctly. Can anyone lend a hand?

sound.h

class Sound
{
private:
    static irrklang::ISoundEngine* _soundDevice;
public:
    Sound();
    ~Sound();

    //getter and setter for _soundDevice
    irrklang::ISoundEngine* getSoundDevice() { return _soundDevice; }
//  void setSoundDevice(irrklang::ISoundEngine* value) { _soundDevice = value; }
    static bool initialise();
    static void shutdown();

sound.cpp

namespace GameEngine
{
Sound::Sound() { }
Sound::~Sound() { }

bool Sound::initialise()
{
    //initialise the sound engine
    _soundDevice = irrklang::createIrrKlangDevice();

    if (!_soundDevice)
    {
        std::cerr << "Error creating sound device" << std::endl;
        return false;
    }

}

void Sound::shutdown()
{
    _soundDevice->drop();
}

and where i use the sound device

GameEngine::Sound* sound = new GameEngine::Sound();

namespace GameEngine
{
bool Game::initialise()
{
    ///
    /// non-related code removed
    ///

    //initialise the sound engine
    if (!Sound::initialise())
        return false;

Any help would be greatly appreciated

Very simply put:

I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.

Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class’ constructor, I am getting an «unresolved external symbol» error at compilation.

class test 
{
public:
    static unsigned char X;
    static unsigned char Y;

    ...

    test();
};

test::test() 
{
    X = 1;
    Y = 2;
}

I’m new to C++ so go easy on me. Why can’t I do this?

AustinWBryan's user avatar

AustinWBryan

3,1983 gold badges21 silver badges42 bronze badges

asked Oct 12, 2008 at 7:45

If you are using C++ 17 you can just use the inline specifier (see https://stackoverflow.com/a/11711082/55721)


If using older versions of the C++ standard, you must add the definitions to match your declarations of X and Y

unsigned char test::X;
unsigned char test::Y;

somewhere. You might want to also initialize a static member

unsigned char test::X = 4;

and again, you do that in the definition (usually in a CXX file) not in the declaration (which is often in a .H file)

dss539's user avatar

dss539

6,7462 gold badges36 silver badges63 bronze badges

answered Oct 12, 2008 at 7:49

Colin Jensen's user avatar

Colin JensenColin Jensen

3,6411 gold badge20 silver badges17 bronze badges

1

Static data members declarations in the class declaration are not definition of them.
To define them you should do this in the .CPP file to avoid duplicated symbols.

The only data you can declare and define is integral static constants.
(Values of enums can be used as constant values as well)

You might want to rewrite your code as:

class test {
public:
  const static unsigned char X = 1;
  const static unsigned char Y = 2;
  ...
  test();
};

test::test() {
}

If you want to have ability to modify you static variables (in other words when it is inappropriate to declare them as const), you can separate you code between .H and .CPP in the following way:

.H :

class test {
public:

  static unsigned char X;
  static unsigned char Y;

  ...

  test();
};

.CPP :

unsigned char test::X = 1;
unsigned char test::Y = 2;

test::test()
{
  // constructor is empty.
  // We don't initialize static data member here, 
  // because static data initialization will happen on every constructor call.
}

2

in my case, I declared one static variable in .h file, like

//myClass.h
class myClass
{
static int m_nMyVar;
static void myFunc();
}

and in myClass.cpp, I tried to use this m_nMyVar. It got LINK error like:

error LNK2001: unresolved external symbol «public: static class…
The link error related cpp file looks like:

//myClass.cpp
void myClass::myFunc()
{
myClass::m_nMyVar = 123; //I tried to use this m_nMyVar here and got link error
}

So I add below code on the top of myClass.cpp

//myClass.cpp
int myClass::m_nMyVar; //it seems redefine m_nMyVar, but it works well
void myClass::myFunc()
{
myClass::m_nMyVar = 123; //I tried to use this m_nMyVar here and got link error
}

then LNK2001 is gone.

answered Sep 18, 2018 at 23:35

Penny's user avatar

PennyPenny

5861 gold badge6 silver badges15 bronze badges

Since this is the first SO thread that seemed to come up for me when searching for «unresolved externals with static const members» in general, I’ll leave another hint to solve one problem with unresolved externals here:

For me, the thing that I forgot was to mark my class definition __declspec(dllexport), and when called from another class (outside that class’s dll’s boundaries), I of course got the my unresolved external error.
Still, easy to forget when you’re changing an internal helper class to a one accessible from elsewhere, so if you’re working in a dynamically linked project, you might as well check that, too.

answered May 4, 2018 at 7:37

Johann Studanski's user avatar

1

When we declare a static variable in a class, it is shared by all the objects of that class. As static variables are initialized only once they are never initialized by a constructor. Instead, the static variable should be explicitly initialized outside the class only once using the scope resolution operator (::).

In the below example, static variable counter is a member of the class Demo. Note how it is initialized explicitly outside the class with the initial value = 0.

#include <iostream>
#include <string>
using namespace std;
class Demo{
   int var;
   static int counter;

   public:
   Demo(int var):var(var){
      cout<<"Counter = "<<counter<<endl;
      counter++;
   }
};
int Demo::counter = 0;                 //static variable initialisation
int main()
{
   Demo d(2), d1(10),d3(1);
}

Output:
Count = 0
Count = 1
Count = 2

answered Apr 17, 2021 at 12:59

Sanya Tayal's user avatar

In my case, I was using wrong linking.
It was managed c++ (cli) but with native exporting. I have added to linker -> input -> assembly link resource the dll of the library from which the function is exported. But native c++ linking requires .lib file to «see» implementations in cpp correctly, so for me helped to add the .lib file to linker -> input -> additional dependencies.
[Usually managed code does not use dll export and import, it uses references, but that was unique situation.]

answered Feb 10, 2020 at 13:23

whats_wrong_here's user avatar

Very simply put:

I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.

Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class’ constructor, I am getting an «unresolved external symbol» error at compilation.

class test 
{
public:
    static unsigned char X;
    static unsigned char Y;

    ...

    test();
};

test::test() 
{
    X = 1;
    Y = 2;
}

I’m new to C++ so go easy on me. Why can’t I do this?

AustinWBryan's user avatar

AustinWBryan

3,1983 gold badges21 silver badges42 bronze badges

asked Oct 12, 2008 at 7:45

If you are using C++ 17 you can just use the inline specifier (see https://stackoverflow.com/a/11711082/55721)


If using older versions of the C++ standard, you must add the definitions to match your declarations of X and Y

unsigned char test::X;
unsigned char test::Y;

somewhere. You might want to also initialize a static member

unsigned char test::X = 4;

and again, you do that in the definition (usually in a CXX file) not in the declaration (which is often in a .H file)

dss539's user avatar

dss539

6,7462 gold badges36 silver badges63 bronze badges

answered Oct 12, 2008 at 7:49

Colin Jensen's user avatar

Colin JensenColin Jensen

3,6411 gold badge20 silver badges17 bronze badges

1

Static data members declarations in the class declaration are not definition of them.
To define them you should do this in the .CPP file to avoid duplicated symbols.

The only data you can declare and define is integral static constants.
(Values of enums can be used as constant values as well)

You might want to rewrite your code as:

class test {
public:
  const static unsigned char X = 1;
  const static unsigned char Y = 2;
  ...
  test();
};

test::test() {
}

If you want to have ability to modify you static variables (in other words when it is inappropriate to declare them as const), you can separate you code between .H and .CPP in the following way:

.H :

class test {
public:

  static unsigned char X;
  static unsigned char Y;

  ...

  test();
};

.CPP :

unsigned char test::X = 1;
unsigned char test::Y = 2;

test::test()
{
  // constructor is empty.
  // We don't initialize static data member here, 
  // because static data initialization will happen on every constructor call.
}

2

in my case, I declared one static variable in .h file, like

//myClass.h
class myClass
{
static int m_nMyVar;
static void myFunc();
}

and in myClass.cpp, I tried to use this m_nMyVar. It got LINK error like:

error LNK2001: unresolved external symbol «public: static class…
The link error related cpp file looks like:

//myClass.cpp
void myClass::myFunc()
{
myClass::m_nMyVar = 123; //I tried to use this m_nMyVar here and got link error
}

So I add below code on the top of myClass.cpp

//myClass.cpp
int myClass::m_nMyVar; //it seems redefine m_nMyVar, but it works well
void myClass::myFunc()
{
myClass::m_nMyVar = 123; //I tried to use this m_nMyVar here and got link error
}

then LNK2001 is gone.

answered Sep 18, 2018 at 23:35

Penny's user avatar

PennyPenny

5861 gold badge6 silver badges15 bronze badges

Since this is the first SO thread that seemed to come up for me when searching for «unresolved externals with static const members» in general, I’ll leave another hint to solve one problem with unresolved externals here:

For me, the thing that I forgot was to mark my class definition __declspec(dllexport), and when called from another class (outside that class’s dll’s boundaries), I of course got the my unresolved external error.
Still, easy to forget when you’re changing an internal helper class to a one accessible from elsewhere, so if you’re working in a dynamically linked project, you might as well check that, too.

answered May 4, 2018 at 7:37

Johann Studanski's user avatar

1

When we declare a static variable in a class, it is shared by all the objects of that class. As static variables are initialized only once they are never initialized by a constructor. Instead, the static variable should be explicitly initialized outside the class only once using the scope resolution operator (::).

In the below example, static variable counter is a member of the class Demo. Note how it is initialized explicitly outside the class with the initial value = 0.

#include <iostream>
#include <string>
using namespace std;
class Demo{
   int var;
   static int counter;

   public:
   Demo(int var):var(var){
      cout<<"Counter = "<<counter<<endl;
      counter++;
   }
};
int Demo::counter = 0;                 //static variable initialisation
int main()
{
   Demo d(2), d1(10),d3(1);
}

Output:
Count = 0
Count = 1
Count = 2

answered Apr 17, 2021 at 12:59

Sanya Tayal's user avatar

In my case, I was using wrong linking.
It was managed c++ (cli) but with native exporting. I have added to linker -> input -> assembly link resource the dll of the library from which the function is exported. But native c++ linking requires .lib file to «see» implementations in cpp correctly, so for me helped to add the .lib file to linker -> input -> additional dependencies.
[Usually managed code does not use dll export and import, it uses references, but that was unique situation.]

answered Feb 10, 2020 at 13:23

whats_wrong_here's user avatar

Доброе утро. Объявил в секции private класса статическую переменную wordsInFilesTotally типа unsigned int следующим образом:

class WordCount
	{
	public:
                // Запускает подсчёт количества слов в текстовых файлах в параллельном режиме с использованием пула потоков.
		static VOID CountWordsInTextFiles_with_ThreadPool(struct WordCountContext* p_WordCountContext);                
	private:
		// Подсчитывает количество слов в текстовых файлах в параллельном режиме с использованием пула потоков.
		static VOID CALLBACK CountWordsInFiles(PTP_CALLBACK_INSTANCE p_Instance, PVOID p_WordCountContext, PTP_WORK p_Work);
		// Счётчик для подсчёта всех слов в файлах, применяемый в функции CountWordsInTextFiles_with_ThreadPool.
		static unsigned wordsInFilesTotally;
	};

Присваиваю этой переменной значение ноль в начале выполнения функции CountWordsInTextFiles_with_ThreadPool():

VOID WordCount::CountWordsInTextFiles_with_ThreadPool(struct WordCountContext* p_WordCountContext)
{
	wordsInFilesTotally = 0;

	TP_CALLBACK_ENVIRON CallBackEnviron;
	PTP_POOL pool = NULL;

        . . . . . . .

        pool = CreateThreadpool(NULL);

        . . . . . . .
}

А в функции CountWordsInFiles() выполняю инкремент этой переменной:

VOID CALLBACK WordCount::CountWordsInFiles(PTP_CALLBACK_INSTANCE p_Instance, PVOID p_WordCountContext, PTP_WORK p_Work)
{
	EnterCriticalSection(&CriticalSection);

	UNREFERENCED_PARAMETER(p_Instance);
	UNREFERENCED_PARAMETER(p_Work);

	. . . . . . . . . . . .
	
	// Для каждого файла, имя которого получено из вектора, выполнить следующее:
	for (; fileNames_Iter != textFilesNames.end(); fileNames_Iter++)
	{
		// Создать поток для чтения из файла.
		ifstream fileStream(*fileNames_Iter);
		// Проверить, открылся ли файл.
		if (fileStream.is_open())
		{
			wordsInFile = 0;

			// Выполнять чтение.
			while (fileStream.good())
			{
				. . . . . . . . . .
				// ПОДСЧИТАТЬ ОБЩЕЕ КОЛИЧЕСТВО СЛОВ ВО ВСЕХ ФАЙЛАХ.
				wordsInFilesTotally++;
			}

			. . . . . . . .
		}
	}
	LeaveCriticalSection(&CriticalSection);

	return;
}

При построении проекта выдается следующая ошибка:

error LNK2001: неразрешенный внешний символ ""private: static unsigned int WordCountFunc::WordCount::wordsInFilesTotally" (?wordsInFilesTotally@WordCount@WordCountFunc@@0IA)"

Класс WordCount входит в состав статической библиотеки классов, но по-моему это, в данном случае, не имеет значения. В чём же причина этой ошибки? Скажите, пожалуйста. Ведь wordsInFilesTotally всего лишь статическая беззнаковая
целочисленная переменная, член того же самого класса, что и использующие её функции (которые сами тоже static!). Так из-за чего возникает эта ошибка?

  • Изменено

    17 декабря 2014 г. 7:58

Этот форум содержит много примеров такой ситуации, но в моем случае статические переменные определены правильно, однако я все равно получаю эту ошибку. Таким образом, эта проблема не дублирует предыдущую и выше ссылку не отвечает на вопрос. Предлагаемый 21 ответ на сообщение не имеет решения, которое дал мне Симон, пожалуйста, отметьте это как «дубликат».

Кажется, я все правильно заявил, проверьте это:

.h файл:

class ValueSetsModelsContainer : public QObject
{
  Q_OBJECT

public:
  static void DLLEXPORT loadAllergiesValueSets(MPTDatabase *db);
  static void DLLEXPORT loadProceduresValueSets(MPTDatabase *db);

  // Models access functions
  static QStandardItemModel *drugsModel();
  static QStandardItemModel *substanceModel();
  static QStandardItemModel *reactionsModel();

private:
  static QStandardItemModel *myDrugsModel, *mySubstanceModel, *myReactionsModel;
};

.cpp

QStandardItemModel *ValueSetsModelsContainer::myDrugsModel = 0;
QStandardItemModel *ValueSetsModelsContainer::mySubstanceModel = 0;
QStandardItemModel *ValueSetsModelsContainer::myReactionsModel = 0;

QStandardItemModel *ValueSetsModelsContainer::drugsModel()
{
  return ValueSetsModelsContainer::myDrugsModel;
}

QStandardItemModel *ValueSetsModelsContainer::substanceModel()
{
  return ValueSetsModelsContainer::mySubstanceModel;
}

QStandardItemModel *ValueSetsModelsContainer::reactionsModel()
{
  return ValueSetsModelsContainer::myReactionsModel;
}

Таким образом, статические переменные определены в cpp, однако я все еще получаю ошибку связывания в другом модуле, который вызывает методы ValueSetsModelsContainer:

  • allergiesdialog.obj: -1: ошибка: LNK2001: неразрешенный внешний символ «private: статический класс QStandardItemModel * ValueSetsModelsContainer:: myDrugsModel» (? MyDrugsModel @ValueSetsModelsContainer @@0PAVQStandardItemModel @@A)
  • allergiesdialog.obj: -1: ошибка: LNK2001: неразрешенный внешний символ «private: static class QStandardItemModel *
    ValueSetsModelsContainer:: mySubstanceModel»
    (? MySubstanceModel @ValueSetsModelsContainer @@0PAVQStandardItemModel @@A)
  • allergiesdialog.obj: -1: ошибка: LNK2001: неразрешенный внешний символ «private: static class QStandardItemModel *
    ValueSetsModelsContainer:: myReactionsModel»
    (? MyReactionsModel @ValueSetsModelsContainer @@0PAVQStandardItemModel @@A)

Где проблема может быть?

4b9b3361

Ответ 1

Из ваших команд связывания оказалось, что вы связываете вместе объекты в DLL, а затем на втором шаге связываете DLL с вашим окончательным двоичным файлом. Это может быть вызвано шаблоном subdirs в настройках вашего проекта.

Всякий раз, когда вы хотите, чтобы метод DLL был доступен извне, вам нужно сделать его доступным через __declspec (dllexport). Я предполагаю, что это делается в вашей постоянной константе прекомпилятора DLLEXPORT.

Теперь попробуйте это в вашем .h файле:

static DLLEXPORT QStandardItemModel *drugsModel();
static DLLEXPORT QStandardItemModel *substanceModel();
static DLLEXPORT QStandardItemModel *reactionsModel();

сделать эти методы доступными извне DLL.


Кстати: я не думаю, что здесь имеет смысл иметь промежуточную динамическую библиотеку (DLL), если вы просто связываете материал из своего собственного проекта и не хотите делать его доступным для кого-то другого. Попробуйте вместо этого использовать статическую библиотеку, установив TEMPLATE = lib и CONFIG += staticlib в файле .pro где находится ValueSetsModelsContainer. Но это уже другая тема и другой вопрос.

#pragma once
#include «filt1.h»
//#include «filt_gen.h»

//extern void cf(double *h,int hsize,double fs, double f0, double sf, double ef, double *rcf, double *icf);
//extern int filt_gen(double lf,double hf,double* resp);
//extern int differ_gen(double lf,double* resp);

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace ZedGraph;
//static int click;
//static double coordY[4][64], coordX[4][64];

extern double coordY[4][64], coordX[4][64];
extern bool canalOpen[5];
static double l1,l2[5],l3,t;
static short * pbf;
static int per, Canal;
extern int set_generator(int phase,int amplityde, int canal);
extern int set_amp(int att, int gain, int canal);
extern int set_frequency(double frequency, int freq_unit, int canal);
extern int set_compensator(int phase,int amplityde, int canal);
extern int get_amp1();
extern int balance(int canal);

namespace vihretok {
    /// <summary>
    /// Сводка для Def
    ///
    /// Внимание! При изменении имени этого класса необходимо также изменить
    ///          свойство имени файла ресурсов («Resource File Name») для средства компиляции управляемого ресурса,
    ///          связанного со всеми файлами с расширением .resx, от которых зависит данный класс. В противном случае,
    ///          конструкторы не смогут правильно работать с локализованными
    ///          ресурсами, сопоставленными данной форме.
    /// </summary>
    public ref class Def : public System::Windows::Forms::Form
    {
                public: void Load_Graw (void)
                        {
                                // Получим панель для рисования
                                ZedGraph::GraphPane ^myPane1 = zedGraphControl1>GraphPane;
                                // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
                                //myPane1->CurveList->Clear();
                                //myPane1->GraphObjList->Clear();
                                //Запрет на самосогласования и выход за установленные границы
                                myPane1>XAxis>Scale>MaxGrace=0;
                                myPane1>XAxis>Scale>MinGrace=0;
                                myPane1>YAxis>Scale>MaxGrace=0;
                                myPane1>YAxis>Scale>MinGrace=0;
                                // Подписи к графику и к осям
                                // Установим размеры шрифтов для подписей по осям
                                myPane1>XAxis>Title>FontSpec>Size = 16;
                                myPane1>YAxis>Title>FontSpec>Size = 16;
                                // Установим размеры шрифта для легенды
                                myPane1>Legend>FontSpec>Size = 12;
                                // Установим размеры шрифта для общего заголовка
                                myPane1>Title>FontSpec>Size = 17;
                                myPane1>Title>FontSpec>FontColor=System::Drawing::Color::Brown;
                                myPane1>Title>Text = «Отклонение по X»;
                                myPane1>XAxis>Title>Text = «Измерение»;
                                myPane1>YAxis>Title>Text = «Отклонение»;
                                //Установка фона панели графиков (не рабочая часть)
                                myPane1>Fill>Color=System::Drawing::Color::LightBlue;
                                //Установка фона панели отображения графиков
                                myPane1>Chart>Fill = gcnew Fill( Color::White, Color::Aqua, 90 );
                                //Установка границы вывода графиков
                                myPane1>Chart>Border>Color=System::Drawing::Color::Black;
                                // Устанавливаем интересующий нас интервал по оси X
                                myPane1>XAxis>Scale>Min = l2[Convert::ToInt32(lCanal>Text)]2*t;
                                myPane1>XAxis>Scale>Max = l2[Convert::ToInt32(lCanal>Text)]+2*t;
                                //Ручная установка шага оси Х —  1 В
                                //myPane1->XAxis->Scale->MinorStep = 0.1;
                                myPane1>XAxis>Scale>MajorStep = 25;
                                // Устанавливаем интересующий нас интервал по оси Y — значения в мА от -10 до 100 мА
                                myPane1>YAxis>Scale>Min = t;
                                myPane1>YAxis>Scale>Max = t;
                                //myPane1->YAxis->Scale->MinorStep = 0.1;
                                myPane1>YAxis>Scale>MajorStep = 25;
                                //Установка оси «Y» ровно по оси «Х» 0.0
                                myPane1>XAxis>Cross = 0.0;
                                //Устанавливаем метки только возле осей!
                                myPane1>XAxis>MajorTic>IsOpposite = false;
                                myPane1>XAxis>MinorTic>IsOpposite = false;
                                myPane1>YAxis>MajorTic>IsOpposite = false;
                                myPane1>YAxis>MinorTic>IsOpposite = false;
                                //Рисуем сетку по X
                                myPane1>XAxis>MajorGrid>IsVisible=true;
                                myPane1>XAxis>MajorGrid>DashOn=20;
                                myPane1>XAxis>MajorGrid>DashOff=20;
                                myPane1>XAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane1>XAxis>Color=System::Drawing::Color::Gray;
                                //Рисуем сетку по Y
                                myPane1>YAxis>MajorGrid>IsVisible=true;
                                myPane1>YAxis>MajorGrid>DashOn=20;
                                myPane1>YAxis>MajorGrid>DashOff=20;
                                myPane1>YAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane1>YAxis>Color=System::Drawing::Color::Gray;

                                // Получим панель для рисования
                                ZedGraph::GraphPane ^myPane3 = zedGraphControl3>GraphPane;
                                // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
                                //myPane2->CurveList->Clear();
                                //myPane2->GraphObjList->Clear();
                                //Запрет на самосогласования и выход за установленные границы
                                myPane3>XAxis>Scale>MaxGrace=0;
                                myPane3>XAxis>Scale>MinGrace=0;
                                myPane3>YAxis>Scale>MaxGrace=0;
                                myPane3>YAxis>Scale>MinGrace=0;
                                // Подписи к графику и к осям
                                // Установим размеры шрифтов для подписей по осям
                                myPane3>XAxis>Title>FontSpec>Size = 16;
                                myPane3>YAxis>Title>FontSpec>Size = 16;
                                // Установим размеры шрифта для легенды
                                myPane3>Legend>FontSpec>Size = 12;
                                // Установим размеры шрифта для общего заголовка
                                myPane3>Title>FontSpec>Size = 17;
                                myPane3>Title>FontSpec>FontColor=System::Drawing::Color::Brown;
                                myPane3>Title>Text = «Отклонение по Z»;
                                myPane3>XAxis>Title>Text = «Отклонение по Х»;
                                myPane3>YAxis>Title>Text = «Отклонение по Y»;
                                //Установка фона панели графиков (не рабочая часть)
                                myPane3>Fill>Color=System::Drawing::Color::LightBlue;
                                //Установка фона панели отображения графиков
                                myPane3>Chart>Fill = gcnew Fill( Color::White, Color::Aqua, 90 );
                                //Установка границы вывода графиков
                                myPane3>Chart>Border>Color=System::Drawing::Color::Black;
                                // Устанавливаем интересующий нас интервал по оси X
                                myPane3>XAxis>Scale>Min = t;
                                myPane3>XAxis>Scale>Max = t;
                                //Ручная установка шага оси Х —  1 В
                                //myPane1->XAxis->Scale->MinorStep = 0.1;
                                myPane3>XAxis>Scale>MajorStep = 25;
                                // Устанавливаем интересующий нас интервал по оси Y — значения в мА от -10 до 100 мА
                                myPane3>YAxis>Scale>Min = t;
                                myPane3>YAxis>Scale>Max = t;
                                //myPane1->YAxis->Scale->MinorStep = 0.1;
                                myPane3>YAxis>Scale>MajorStep = 25;
                                //Установка оси «Y» ровно по оси «Х» 0.0
                                myPane3>XAxis>Cross = 0.0;
                                //Устанавливаем метки только возле осей!
                                myPane3>XAxis>MajorTic>IsOpposite = false;
                                myPane3>XAxis>MinorTic>IsOpposite = false;
                                myPane3>YAxis>MajorTic>IsOpposite = false;
                                myPane3>YAxis>MinorTic>IsOpposite = false;
                                //Рисуем сетку по X
                                myPane3>XAxis>MajorGrid>IsVisible=true;
                                myPane3>XAxis>MajorGrid>DashOn=20;
                                myPane3>XAxis>MajorGrid>DashOff=20;
                                myPane3>XAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane3>XAxis>Color=System::Drawing::Color::Gray;
                                //Рисуем сетку по Y
                                myPane3>YAxis>MajorGrid>IsVisible=true;
                                myPane3>YAxis>MajorGrid>DashOn=20;
                                myPane3>YAxis>MajorGrid>DashOff=20;
                                myPane3>YAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane3>YAxis>Color=System::Drawing::Color::Gray;

                                // Получим панель для рисования
                                ZedGraph::GraphPane ^myPane2 = zedGraphControl2>GraphPane;
                                // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
                                //myPane2->CurveList->Clear();
                                //myPane2->GraphObjList->Clear();
                                //Запрет на самосогласования и выход за установленные границы
                                myPane2>XAxis>Scale>MaxGrace=0;
                                myPane2>XAxis>Scale>MinGrace=0;
                                myPane2>YAxis>Scale>MaxGrace=0;
                                myPane2>YAxis>Scale>MinGrace=0;
                                // Подписи к графику и к осям
                                // Установим размеры шрифтов для подписей по осям
                                myPane2>XAxis>Title>FontSpec>Size = 16;
                                myPane2>YAxis>Title>FontSpec>Size = 16;
                                // Установим размеры шрифта для легенды
                                myPane2>Legend>FontSpec>Size = 12;
                                // Установим размеры шрифта для общего заголовка
                                myPane2>Title>FontSpec>Size = 17;
                                myPane2>Title>FontSpec>FontColor=System::Drawing::Color::Brown;
                                myPane2>Title>Text = «Отклонение по Y»;
                                myPane2>XAxis>Title>Text = «Измерение»;
                                myPane2>YAxis>Title>Text = «Отклонение»;
                                //Установка фона панели графиков (не рабочая часть)
                                myPane2>Fill>Color=System::Drawing::Color::LightBlue;
                                //Установка фона панели отображения графиков
                                myPane2>Chart>Fill = gcnew Fill( Color::White, Color::Aqua, 90 );
                                //Установка границы вывода графиков
                                myPane2>Chart>Border>Color=System::Drawing::Color::Black;
                                // Устанавливаем интересующий нас интервал по оси X
                                myPane2>XAxis>Scale>Min = l2[Convert::ToInt32(lCanal>Text)]t*2;
                                myPane2>XAxis>Scale>Max = l2[Convert::ToInt32(lCanal>Text)]+t*2;
                                //Ручная установка шага оси Х —  1 В
                                //myPane1->XAxis->Scale->MinorStep = 0.1;
                                myPane2>XAxis>Scale>MajorStep = 25;
                                // Устанавливаем интересующий нас интервал по оси Y — значения в мА от -10 до 100 мА
                                myPane2>YAxis>Scale>Min = t;
                                myPane2>YAxis>Scale>Max = t;
                                //myPane1->YAxis->Scale->MinorStep = 0.1;
                                myPane2>YAxis>Scale>MajorStep = 25;
                                //Установка оси «Y» ровно по оси «Х» 0.0
                                myPane2>XAxis>Cross = 0.0;
                                //Устанавливаем метки только возле осей!
                                myPane2>XAxis>MajorTic>IsOpposite = false;
                                myPane2>XAxis>MinorTic>IsOpposite = false;
                                myPane2>YAxis>MajorTic>IsOpposite = false;
                                myPane2>YAxis>MinorTic>IsOpposite = false;
                                //Рисуем сетку по X
                                myPane2>XAxis>MajorGrid>IsVisible=true;
                                myPane2>XAxis>MajorGrid>DashOn=20;
                                myPane2>XAxis>MajorGrid>DashOff=20;
                                myPane2>XAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane2>XAxis>Color=System::Drawing::Color::Gray;
                                //Рисуем сетку по Y
                                myPane2>YAxis>MajorGrid>IsVisible=true;
                                myPane2>YAxis>MajorGrid>DashOn=20;
                                myPane2>YAxis>MajorGrid>DashOff=20;
                                myPane2>YAxis>MajorGrid>Color=System::Drawing::Color::Gray;
                                myPane2>YAxis>Color=System::Drawing::Color::Gray;

                                //******************************************************************************
                                // Добавляем информацию по регистрам вывода точек
                                //******************************************************************************
                                RollingPointPairList ^list1 = gcnew RollingPointPairList (64);
                                RollingPointPairList ^list2 = gcnew RollingPointPairList (64);
                                RollingPointPairList ^list3 = gcnew RollingPointPairList (64);
                                // Выводим пустые линии графиков на экран
                                LineItem ^F1Curve = myPane1>AddCurve( «», list1, Color::Indigo, SymbolType::None);
                                LineItem ^F2Curve = myPane2>AddCurve( «», list2, Color::Blue, SymbolType::None);
                                LineItem ^F3Curve = myPane3>AddCurve( «», list3, Color::BlueViolet, SymbolType::None);
                                //Ширина линии в 1/72 дюйма!!!!!!!!!! Хорошо получается при 2!!!!!!!!!
                                F1Curve>Line>Width=2;
                                F2Curve>Line>Width=2;
                                F3Curve>Line>Width=1;
                                //Задаем что линии гладкии!!!!!!!
                                F1Curve>Line>IsSmooth=true;
                                F2Curve>Line>IsSmooth=true;
                                F3Curve>Line>IsSmooth=true;
                                // Вызываем метод AxisChange (), чтобы обновить данные об осях.
                                // В противном случае на рисунке будет показана только часть графика,
                                // которая умещается в интервалы по осям, установленные по умолчанию
                                zedGraphControl1>AxisChange ();
                                zedGraphControl2>AxisChange ();
                                zedGraphControl3>AxisChange ();
                                // Обновляем график
                                zedGraphControl1>Invalidate();
                                zedGraphControl2>Invalidate();
                                zedGraphControl3>Invalidate();

                        }
        //График для функций
        public: void Graw_Draw (void)
                        {
                                //Получаем линии от графиков
                                LineItem ^F1Curve=(LineItem ^)zedGraphControl1>GraphPane>CurveList[0];
                                LineItem ^F2Curve=(LineItem ^)zedGraphControl2>GraphPane>CurveList[0];
                                LineItem ^F3Curve=(LineItem ^)zedGraphControl3>GraphPane>CurveList[0];
                                IPointListEdit ^list1= (IPointListEdit ^) F1Curve>Points;
                                IPointListEdit ^list2= (IPointListEdit ^) F2Curve>Points;
                                IPointListEdit ^list3= (IPointListEdit ^) F3Curve>Points;
                                //for (unsigned int i=0; i<200; i++)
                                //{
                                //  int x;
                                //  x=(i-10)*(i-10);
                                        list1>Add(l2[Convert::ToInt32(lCanal>Text)], l1);
                                        list2>Add(l2[Convert::ToInt32(lCanal>Text)], l3);
                                        list3>Add(l1, l3);
                                //}
                                // Вызываем метод AxisChange (), чтобы обновить данные об осях.
                                // В противном случае на рисунке будет показана только часть графика,
                                // которая умещается в интервалы по осям, установленные по умолчанию
                                zedGraphControl1>AxisChange ();
                                zedGraphControl2>AxisChange ();
                                zedGraphControl3>AxisChange();

                               
                               
                                // Обновляем график
                                zedGraphControl1>Invalidate();
                                zedGraphControl2>Invalidate();
                                //************************
                }
    public:
        Def(void)
        {
                    l1=0;
                    //l2[Canal]=0;
                    l3=0;
                    t=5;

            InitializeComponent();
            //
            //TODO: добавьте код конструктора
            //
        }

    protected:
        /// <summary>
        /// Освободить все используемые ресурсы.
        /// </summary>
        ~Def()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::TextBox^  tObj;
    protected:
    private: int click;
    private: Devart::Data::MySql::MySqlDataReader^  MySqlDataReader1;
    private: System::Windows::Forms::Button^  bSizeMinus;
    private: System::Windows::Forms::Button^  bStart;
    private: System::Windows::Forms::Button^  bSizePlus;
    private: System::Windows::Forms::Label^  lOut;
    private: System::Windows::Forms::Label^  lIn;
    private: System::Windows::Forms::NumericUpDown^  attIn;
    private: System::Windows::Forms::Label^  lPhase;
    private: System::Windows::Forms::Timer^  timer1;
    private: System::Windows::Forms::Label^  lObj;
    private: System::Windows::Forms::NumericUpDown^  attOut;
    private: System::Windows::Forms::Label^  lf;
    private: System::Windows::Forms::Label^  lAmp;
    private: System::Windows::Forms::Button^  bResize;
    private: System::Windows::Forms::Label^  lSettings;
    private: System::Windows::Forms::TextBox^  tf1;
    private: System::Windows::Forms::TextBox^  tPhase1;
    private: System::Windows::Forms::TextBox^  tAmp1;
    private: System::Windows::Forms::TrackBar^  fBar1;
    private: System::Windows::Forms::TrackBar^  phaseBar1;
    private: System::Windows::Forms::SplitContainer^  splitContainer1;
    private: ZedGraph::ZedGraphControl^  zedGraphControl3;
    private: ZedGraph::ZedGraphControl^  zedGraphControl2;
    private: ZedGraph::ZedGraphControl^  zedGraphControl1;
private: System::Windows::Forms::Label^  lCanal;
private: Devart::Data::MySql::MySqlConnection^  mySqlConnection1;
private: Devart::Data::MySql::MySqlCommand^  mySqlCommand1;
private: System::Windows::Forms::Label^  label2;
private: System::Windows::Forms::TrackBar^  trackBar1;
private: System::Windows::Forms::Label^  lObject;
private: System::Windows::Forms::Label^  lBase;
private: System::Windows::Forms::Button^  bStop;
private: System::Windows::Forms::Button^  bBalance;
private: System::Windows::Forms::Button^  bFilt;

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

    private:
        /// <summary>
        /// Требуется переменная конструктора.
        /// </summary>

#pragma region Windows Form Designer generated code
        /// <summary>
        /// Обязательный метод для поддержки конструктора — не изменяйте
        /// содержимое данного метода при помощи редактора кода.
        /// </summary>
        void InitializeComponent(void)
        {
            this>components = (gcnew System::ComponentModel::Container());
            System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Def::typeid));
            this>tObj = (gcnew System::Windows::Forms::TextBox());
            this>bSizeMinus = (gcnew System::Windows::Forms::Button());
            this>bStart = (gcnew System::Windows::Forms::Button());
            this>bSizePlus = (gcnew System::Windows::Forms::Button());
            this>lOut = (gcnew System::Windows::Forms::Label());
            this>lIn = (gcnew System::Windows::Forms::Label());
            this>attIn = (gcnew System::Windows::Forms::NumericUpDown());
            this>lPhase = (gcnew System::Windows::Forms::Label());
            this>timer1 = (gcnew System::Windows::Forms::Timer(this>components));
            this>lObj = (gcnew System::Windows::Forms::Label());
            this>attOut = (gcnew System::Windows::Forms::NumericUpDown());
            this>lf = (gcnew System::Windows::Forms::Label());
            this>lAmp = (gcnew System::Windows::Forms::Label());
            this>bResize = (gcnew System::Windows::Forms::Button());
            this>lSettings = (gcnew System::Windows::Forms::Label());
            this>tf1 = (gcnew System::Windows::Forms::TextBox());
            this>tPhase1 = (gcnew System::Windows::Forms::TextBox());
            this>tAmp1 = (gcnew System::Windows::Forms::TextBox());
            this>fBar1 = (gcnew System::Windows::Forms::TrackBar());
            this>phaseBar1 = (gcnew System::Windows::Forms::TrackBar());
            this>splitContainer1 = (gcnew System::Windows::Forms::SplitContainer());
            this>bFilt = (gcnew System::Windows::Forms::Button());
            this>bBalance = (gcnew System::Windows::Forms::Button());
            this>bStop = (gcnew System::Windows::Forms::Button());
            this>lBase = (gcnew System::Windows::Forms::Label());
            this>trackBar1 = (gcnew System::Windows::Forms::TrackBar());
            this>label2 = (gcnew System::Windows::Forms::Label());
            this>lCanal = (gcnew System::Windows::Forms::Label());
            this>zedGraphControl3 = (gcnew ZedGraph::ZedGraphControl());
            this>zedGraphControl2 = (gcnew ZedGraph::ZedGraphControl());
            this>zedGraphControl1 = (gcnew ZedGraph::ZedGraphControl());
            this>lObject = (gcnew System::Windows::Forms::Label());
            this>mySqlConnection1 = (gcnew Devart::Data::MySql::MySqlConnection());
            this>mySqlCommand1 = (gcnew Devart::Data::MySql::MySqlCommand());
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>attIn))>BeginInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>attOut))>BeginInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>fBar1))>BeginInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>phaseBar1))>BeginInit();
            this>splitContainer1>Panel1>SuspendLayout();
            this>splitContainer1>Panel2>SuspendLayout();
            this>splitContainer1>SuspendLayout();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>trackBar1))>BeginInit();
            this>SuspendLayout();
            //
            // tObj
            //
            this>tObj>Location = System::Drawing::Point(537, 14);
            this>tObj>Name = L«tObj»;
            this>tObj>Size = System::Drawing::Size(201, 20);
            this>tObj>TabIndex = 33;
            //
            // bSizeMinus
            //
            this>bSizeMinus>Font = (gcnew System::Drawing::Font(L«Microsoft Sans Serif», 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(204)));
            this>bSizeMinus>Location = System::Drawing::Point(472, 95);
            this>bSizeMinus>Name = L«bSizeMinus»;
            this>bSizeMinus>Size = System::Drawing::Size(34, 34);
            this>bSizeMinus>TabIndex = 32;
            this>bSizeMinus>Text = L«-«;
            this>bSizeMinus>UseVisualStyleBackColor = true;
            this>bSizeMinus>Click += gcnew System::EventHandler(this, &Def::bSizeMinus_Click);
            //
            // bStart
            //
            this>bStart>BackColor = System::Drawing::SystemColors::ButtonHighlight;
            this>bStart>Location = System::Drawing::Point(432, 33);
            this>bStart>Name = L«bStart»;
            this>bStart>Size = System::Drawing::Size(74, 25);
            this>bStart>TabIndex = 30;
            this>bStart>Text = L«СТАРТ»;
            this>bStart>UseVisualStyleBackColor = true;
            this>bStart>Click += gcnew System::EventHandler(this, &Def::bStart_Click);
            //
            // bSizePlus
            //
            this>bSizePlus>Font = (gcnew System::Drawing::Font(L«Microsoft Sans Serif», 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
                static_cast<System::Byte>(204)));
            this>bSizePlus>Location = System::Drawing::Point(432, 95);
            this>bSizePlus>Name = L«bSizePlus»;
            this>bSizePlus>Size = System::Drawing::Size(34, 34);
            this>bSizePlus>TabIndex = 31;
            this>bSizePlus>Text = L«+»;
            this>bSizePlus>UseVisualStyleBackColor = true;
            this>bSizePlus>Click += gcnew System::EventHandler(this, &Def::bSizePlus_Click);
            //
            // lOut
            //
            this>lOut>AutoSize = true;
            this>lOut>Location = System::Drawing::Point(32, 95);
            this>lOut>Name = L«lOut»;
            this>lOut>Size = System::Drawing::Size(39, 13);
            this>lOut>TabIndex = 33;
            this>lOut>Text = L«Выход»;
            //
            // lIn
            //
            this>lIn>AutoSize = true;
            this>lIn>Location = System::Drawing::Point(32, 56);
            this>lIn>Name = L«lIn»;
            this>lIn>Size = System::Drawing::Size(31, 13);
            this>lIn>TabIndex = 32;
            this>lIn>Text = L«Вход»;
            //
            // attIn
            //
            this>attIn>Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
            this>attIn>Location = System::Drawing::Point(29, 72);
            this>attIn>Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {45, 0, 0, 0});
            this>attIn>Name = L«attIn»;
            this>attIn>Size = System::Drawing::Size(45, 20);
            this>attIn>TabIndex = 30;
            this>attIn>ValueChanged += gcnew System::EventHandler(this, &Def::attIn_ValueChanged);
            //
            // lPhase
            //
            this>lPhase>AutoSize = true;
            this>lPhase>Location = System::Drawing::Point(83, 17);
            this>lPhase>Name = L«lPhase»;
            this>lPhase>Size = System::Drawing::Size(36, 13);
            this>lPhase>TabIndex = 28;
            this>lPhase>Text = L«Фаза»;
            //
            // timer1
            //
            this>timer1>Interval = 1;
            this>timer1>Tick += gcnew System::EventHandler(this, &Def::timer1_Tick);
            //
            // lObj
            //
            this>lObj>AutoSize = true;
            this>lObj>Location = System::Drawing::Point(426, 5);
            this>lObj>Name = L«lObj»;
            this>lObj>Size = System::Drawing::Size(105, 26);
            this>lObj>TabIndex = 34;
            this>lObj>Text = L«Название объекта rnдефектоскопии:»;
            //
            // attOut
            //
            this>attOut>Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
            this>attOut>Location = System::Drawing::Point(29, 109);
            this>attOut>Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {45, 0, 0, 0});
            this>attOut>Name = L«attOut»;
            this>attOut>Size = System::Drawing::Size(45, 20);
            this>attOut>TabIndex = 31;
            this>attOut>ValueChanged += gcnew System::EventHandler(this, &Def::attOut_ValueChanged);
            //
            // lf
            //
            this>lf>AutoSize = true;
            this>lf>Location = System::Drawing::Point(128, 17);
            this>lf>Name = L«lf»;
            this>lf>Size = System::Drawing::Size(49, 13);
            this>lf>TabIndex = 29;
            this>lf>Text = L«Частота»;
            //
            // lAmp
            //
            this>lAmp>AutoSize = true;
            this>lAmp>Location = System::Drawing::Point(26, 17);
            this>lAmp>Name = L«lAmp»;
            this>lAmp>Size = System::Drawing::Size(62, 13);
            this>lAmp>TabIndex = 27;
            this>lAmp>Text = L«Амплитуда»;
            //
            // bResize
            //
            this>bResize>Location = System::Drawing::Point(3, 3);
            this>bResize>Name = L«bResize»;
            this>bResize>Size = System::Drawing::Size(22, 22);
            this>bResize>TabIndex = 26;
            this>bResize>Text = L«>»;
            this>bResize>UseVisualStyleBackColor = true;
            this>bResize>Click += gcnew System::EventHandler(this, &Def::bResize_Click);
            //
            // lSettings
            //
            this>lSettings>AutoSize = true;
            this>lSettings>Location = System::Drawing::Point(3, 25);
            this>lSettings>Name = L«lSettings»;
            this>lSettings>Size = System::Drawing::Size(15, 117);
            this>lSettings>TabIndex = 25;
            this>lSettings>Text = L«НrnАrnСrnТrnРrnОrnЙrnКrnИ»;
            this>lSettings>TextAlign = System::Drawing::ContentAlignment::TopCenter;
            //
            // tf1
            //
            this>tf1>Location = System::Drawing::Point(131, 33);
            this>tf1>Name = L«tf1»;
            this>tf1>Size = System::Drawing::Size(45, 20);
            this>tf1>TabIndex = 24;
            this>tf1>Text = L«500»;
            this>tf1>TextChanged += gcnew System::EventHandler(this, &Def::tf1_TextChanged);
            //
            // tPhase1
            //
            this>tPhase1>Location = System::Drawing::Point(80, 33);
            this>tPhase1>Name = L«tPhase1»;
            this>tPhase1>Size = System::Drawing::Size(45, 20);
            this>tPhase1>TabIndex = 23;
            this>tPhase1>Text = L«0»;
            this>tPhase1>TextChanged += gcnew System::EventHandler(this, &Def::tPhase1_TextChanged);
            //
            // tAmp1
            //
            this>tAmp1>Location = System::Drawing::Point(29, 33);
            this>tAmp1>Name = L«tAmp1»;
            this>tAmp1>Size = System::Drawing::Size(45, 20);
            this>tAmp1>TabIndex = 22;
            this>tAmp1>Text = L«0»;
            this>tAmp1>TextChanged += gcnew System::EventHandler(this, &Def::tAmp1_TextChanged);
            //
            // fBar1
            //
            this>fBar1>Location = System::Drawing::Point(131, 60);
            this>fBar1>Maximum = 1000;
            this>fBar1>Minimum = 10;
            this>fBar1>Name = L«fBar1»;
            this>fBar1>Orientation = System::Windows::Forms::Orientation::Vertical;
            this>fBar1>Size = System::Drawing::Size(45, 260);
            this>fBar1>TabIndex = 21;
            this>fBar1>TickStyle = System::Windows::Forms::TickStyle::Both;
            this>fBar1>Value = 500;
            this>fBar1>Scroll += gcnew System::EventHandler(this, &Def::fBar1_Scroll);
            //
            // phaseBar1
            //
            this>phaseBar1>Location = System::Drawing::Point(80, 60);
            this>phaseBar1>Maximum = 3600;
            this>phaseBar1>Name = L«phaseBar1»;
            this>phaseBar1>Orientation = System::Windows::Forms::Orientation::Vertical;
            this>phaseBar1>Size = System::Drawing::Size(45, 260);
            this>phaseBar1>TabIndex = 20;
            this>phaseBar1>TickStyle = System::Windows::Forms::TickStyle::Both;
            this>phaseBar1>Scroll += gcnew System::EventHandler(this, &Def::phaseBar1_Scroll);
            //
            // splitContainer1
            //
            this>splitContainer1>Dock = System::Windows::Forms::DockStyle::Fill;
            this>splitContainer1>Location = System::Drawing::Point(0, 0);
            this>splitContainer1>Name = L«splitContainer1»;
            //
            // splitContainer1.Panel1
            //
            this>splitContainer1>Panel1>Controls>Add(this>lOut);
            this>splitContainer1>Panel1>Controls>Add(this>lIn);
            this>splitContainer1>Panel1>Controls>Add(this>attOut);
            this>splitContainer1>Panel1>Controls>Add(this>attIn);
            this>splitContainer1>Panel1>Controls>Add(this>lf);
            this>splitContainer1>Panel1>Controls>Add(this>lPhase);
            this>splitContainer1>Panel1>Controls>Add(this>lAmp);
            this>splitContainer1>Panel1>Controls>Add(this>bResize);
            this>splitContainer1>Panel1>Controls>Add(this>lSettings);
            this>splitContainer1>Panel1>Controls>Add(this>tf1);
            this>splitContainer1>Panel1>Controls>Add(this>tPhase1);
            this>splitContainer1>Panel1>Controls>Add(this>tAmp1);
            this>splitContainer1>Panel1>Controls>Add(this>fBar1);
            this>splitContainer1>Panel1>Controls>Add(this>phaseBar1);
            this>splitContainer1>Panel1MinSize = 28;
            //
            // splitContainer1.Panel2
            //
            this>splitContainer1>Panel2>BackColor = System::Drawing::Color::PaleTurquoise;
            this>splitContainer1>Panel2>Controls>Add(this>bFilt);
            this>splitContainer1>Panel2>Controls>Add(this>bBalance);
            this>splitContainer1>Panel2>Controls>Add(this>bStop);
            this>splitContainer1>Panel2>Controls>Add(this>lBase);
            this>splitContainer1>Panel2>Controls>Add(this>trackBar1);
            this>splitContainer1>Panel2>Controls>Add(this>label2);
            this>splitContainer1>Panel2>Controls>Add(this>lCanal);
            this>splitContainer1>Panel2>Controls>Add(this>zedGraphControl3);
            this>splitContainer1>Panel2>Controls>Add(this>zedGraphControl2);
            this>splitContainer1>Panel2>Controls>Add(this>zedGraphControl1);
            this>splitContainer1>Panel2>Controls>Add(this>lObj);
            this>splitContainer1>Panel2>Controls>Add(this>tObj);
            this>splitContainer1>Panel2>Controls>Add(this>bSizeMinus);
            this>splitContainer1>Panel2>Controls>Add(this>bSizePlus);
            this>splitContainer1>Panel2>Controls>Add(this>bStart);
            this>splitContainer1>Panel2>Controls>Add(this>lObject);
            this>splitContainer1>Size = System::Drawing::Size(924, 555);
            this>splitContainer1>SplitterDistance = 28;
            this>splitContainer1>TabIndex = 5;
            //
            // bFilt
            //
            this>bFilt>Location = System::Drawing::Point(432, 135);
            this>bFilt>Name = L«bFilt»;
            this>bFilt>Size = System::Drawing::Size(72, 23);
            this>bFilt>TabIndex = 45;
            this>bFilt>Text = L«Фильтр»;
            this>bFilt>UseVisualStyleBackColor = true;
            this>bFilt>Click += gcnew System::EventHandler(this, &Def::bFilt_Click);
            //
            // bBalance
            //
            this>bBalance>Location = System::Drawing::Point(432, 164);
            this>bBalance>Name = L«bBalance»;
            this>bBalance>Size = System::Drawing::Size(73, 23);
            this>bBalance>TabIndex = 44;
            this>bBalance>Text = L«Баланс»;
            this>bBalance>UseVisualStyleBackColor = true;
            this>bBalance>Click += gcnew System::EventHandler(this, &Def::bBalance_Click);
            //
            // bStop
            //
            this>bStop>BackColor = System::Drawing::SystemColors::ButtonHighlight;
            this>bStop>Location = System::Drawing::Point(432, 64);
            this>bStop>Name = L«bStop»;
            this>bStop>Size = System::Drawing::Size(74, 25);
            this>bStop>TabIndex = 43;
            this>bStop>Text = L«СТОП»;
            this>bStop>UseVisualStyleBackColor = true;
            this>bStop>Click += gcnew System::EventHandler(this, &Def::bStop_Click);
            //
            // lBase
            //
            this>lBase>AutoSize = true;
            this>lBase>Location = System::Drawing::Point(565, 99);
            this>lBase>Name = L«lBase»;
            this>lBase>Size = System::Drawing::Size(33, 13);
            this>lBase>TabIndex = 42;
            this>lBase>Text = L«lBase»;
            this>lBase>Visible = false;
            //
            // trackBar1
            //
            this>trackBar1>BackColor = System::Drawing::Color::PaleTurquoise;
            this>trackBar1>Location = System::Drawing::Point(3, 498);
            this>trackBar1>Name = L«trackBar1»;
            this>trackBar1>Size = System::Drawing::Size(666, 45);
            this>trackBar1>TabIndex = 40;
            this>trackBar1>TickStyle = System::Windows::Forms::TickStyle::None;
            this>trackBar1>Visible = false;
            this>trackBar1>Scroll += gcnew System::EventHandler(this, &Def::trackBar1_Scroll);
            //
            // label2
            //
            this>label2>AutoSize = true;
            this>label2>Location = System::Drawing::Point(564, 81);
            this>label2>Name = L«label2»;
            this>label2>Size = System::Drawing::Size(35, 13);
            this>label2>TabIndex = 39;
            this>label2>Text = L«label1»;
            this>label2>Visible = false;
            //
            // lCanal
            //
            this>lCanal>AutoSize = true;
            this>lCanal>Location = System::Drawing::Point(564, 62);
            this>lCanal>Name = L«lCanal»;
            this>lCanal>Size = System::Drawing::Size(35, 13);
            this>lCanal>TabIndex = 38;
            this>lCanal>Text = L«label1»;
            this>lCanal>Visible = false;
            //
            // zedGraphControl3
            //
            this>zedGraphControl3>Location = System::Drawing::Point(429, 246);
            this>zedGraphControl3>Name = L«zedGraphControl3»;
            this>zedGraphControl3>ScrollGrace = 0;
            this>zedGraphControl3>ScrollMaxX = 0;
            this>zedGraphControl3>ScrollMaxY = 0;
            this>zedGraphControl3>ScrollMaxY2 = 0;
            this>zedGraphControl3>ScrollMinX = 0;
            this>zedGraphControl3>ScrollMinY = 0;
            this>zedGraphControl3>ScrollMinY2 = 0;
            this>zedGraphControl3>Size = System::Drawing::Size(240, 240);
            this>zedGraphControl3>TabIndex = 37;
            //
            // zedGraphControl2
            //
            this>zedGraphControl2>Location = System::Drawing::Point(3, 246);
            this>zedGraphControl2>Name = L«zedGraphControl2»;
            this>zedGraphControl2>ScrollGrace = 0;
            this>zedGraphControl2>ScrollMaxX = 0;
            this>zedGraphControl2>ScrollMaxY = 0;
            this>zedGraphControl2>ScrollMaxY2 = 0;
            this>zedGraphControl2>ScrollMinX = 0;
            this>zedGraphControl2>ScrollMinY = 0;
            this>zedGraphControl2>ScrollMinY2 = 0;
            this>zedGraphControl2>Size = System::Drawing::Size(420, 240);
            this>zedGraphControl2>TabIndex = 36;
            //
            // zedGraphControl1
            //
            this>zedGraphControl1>Location = System::Drawing::Point(3, 5);
            this>zedGraphControl1>Name = L«zedGraphControl1»;
            this>zedGraphControl1>ScrollGrace = 0;
            this>zedGraphControl1>ScrollMaxX = 0;
            this>zedGraphControl1>ScrollMaxY = 0;
            this>zedGraphControl1>ScrollMaxY2 = 0;
            this>zedGraphControl1>ScrollMinX = 0;
            this>zedGraphControl1>ScrollMinY = 0;
            this>zedGraphControl1>ScrollMinY2 = 0;
            this>zedGraphControl1>Size = System::Drawing::Size(420, 240);
            this>zedGraphControl1>TabIndex = 35;
            //
            // lObject
            //
            this>lObject>AutoSize = true;
            this>lObject>Location = System::Drawing::Point(537, 18);
            this>lObject>Name = L«lObject»;
            this>lObject>Size = System::Drawing::Size(0, 13);
            this>lObject>TabIndex = 41;
            //
            // mySqlConnection1
            //
            this>mySqlConnection1>ConnectionString = L«User Id=root;Host=localhost;Database=fazus_db;»;
            this>mySqlConnection1>Name = L«mySqlConnection1»;
            //
            // mySqlCommand1
            //
            this>mySqlCommand1>Connection = this>mySqlConnection1;
            this>mySqlCommand1>Name = L«mySqlCommand1»;
            //
            // Def
            //
            this>AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this>AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this>BackColor = System::Drawing::Color::PaleTurquoise;
            this>ClientSize = System::Drawing::Size(924, 555);
            this>Controls>Add(this>splitContainer1);
            this>Icon = (cli::safe_cast<System::Drawing::Icon^  >(resources>GetObject(L«$this.Icon»)));
            this>Name = L«Def»;
            this>Text = L«Def»;
            this>Load += gcnew System::EventHandler(this, &Def::Def_Load);
            this>VisibleChanged += gcnew System::EventHandler(this, &Def::Def_Load);
            this>FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Def::Def_FormClosing);
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>attIn))>EndInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>attOut))>EndInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>fBar1))>EndInit();
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>phaseBar1))>EndInit();
            this>splitContainer1>Panel1>ResumeLayout(false);
            this>splitContainer1>Panel1>PerformLayout();
            this>splitContainer1>Panel2>ResumeLayout(false);
            this>splitContainer1>Panel2>PerformLayout();
            this>splitContainer1>ResumeLayout(false);
            (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this>trackBar1))>EndInit();
            this>ResumeLayout(false);

        }
#pragma endregion
    private: System::Void Def_Load(System::Object^  sender, System::EventArgs^  e) {
            tPhase1>Text=Convert::ToString((float)phaseBar1>Value/10);
            tf1>Text=Convert::ToString(fBar1>Value);
            click=0;
/*          fd_set soc_insp;
            timeval insp_time;
            soc_insp.fd_count = 1;
            soc_insp.fd_array[0] = m_sock;
            insp_time.tv_sec = 0;
            insp_time.tv_usec = 10000*2;*/

/*          init_program();
            init_instrument();
            select(0, &soc_insp, NULL, NULL, &insp_time);
            this->Name;*/

            if(this>Name==«Can0») {
                Canal=0;
                lCanal>Text=«0»;
                this>Text=«Дефектоскопия, канал 1»;
            }
            if(this>Name==«Can1») {
                Canal=1;
                lCanal>Text=«1»;
                this>Text=«Дефектоскопия, канал 2»;
            }
            if(this>Name==«Can2») {
                Canal=2;
                lCanal>Text=«2»;
                this>Text=«Дефектоскопия, канал 3»;
            }
            if(this>Name==«Can3») {
                Canal=3;
                lCanal>Text=«3»;
                this>Text=«Дефектоскопия, канал 4»;
            }
            if(this>Name!=«Can0»&&this>Name!=«Can1»&&this>Name!=«Can2»&&this>Name!=«Can3») {
                Canal=99;
                l2[4]=0;
                trackBar1>Value=(int)l2[4];
                lCanal>Text=«4»;
                bBalance>Visible=false;
                lBase>Text=this>Name;
                tObj>Visible=false;
                bResize>Visible=false;
                lSettings>Visible=false;
                bFilt>Visible=false;
                this>Text=«Дефектоскопия, архив»;
                trackBar1>Visible=true;

               
                mySqlCommand1>CommandText=«select X from`»+lBase>Text+«`;»;
                mySqlConnection1>Open();
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                while(MySqlDataReader1>Read())
                {
                }
                trackBar1>Maximum=Convert::ToInt16(MySqlDataReader1>RecordCount::get());
                mySqlCommand1>CommandText=«select `obj` from`obj` where `database`='»+lBase>Text+«‘;»;
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                    while(MySqlDataReader1>Read())
                    {
                    for (int i = 0; i < MySqlDataReader1>FieldCount; i++)
                    {
                    lObject>Text=MySqlDataReader1>GetValue(i)>ToString();
                    }
                }
                mySqlConnection1>Close();
            }
            canalOpen[Convert::ToInt32(lCanal>Text)]=false;
            this>Load_Graw();
             }
private: System::Void tAmp1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
             set_generator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_compensator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_amp(Convert::ToInt32(attIn>Text)/3,Convert::ToInt32(attOut>Text)/3,Convert::ToInt32(lCanal>Text));
             set_frequency(fBar1>Value,1,Convert::ToInt32(lCanal>Text));
         }
private: System::Void tf1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
             fBar1>Value=Convert::ToInt32(tf1>Text);
             set_frequency(fBar1>Value,1,Convert::ToInt32(lCanal>Text));

         }
private: System::Void tPhase1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
             set_generator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_compensator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_amp(Convert::ToInt32(attIn>Text)/3,Convert::ToInt32(attOut>Text)/3,Convert::ToInt32(lCanal>Text));
             set_frequency(fBar1>Value,1,Convert::ToInt32(lCanal>Text));
         }
private: System::Void phaseBar1_Scroll(System::Object^  sender, System::EventArgs^  e) {
             tPhase1>Text=Convert::ToString((float)phaseBar1>Value/10);
         }
private: System::Void fBar1_Scroll(System::Object^  sender, System::EventArgs^  e) {
             tf1>Text=Convert::ToString(fBar1>Value);
         }

private: System::Void bResize_Click(System::Object^  sender, System::EventArgs^  e) {
                 click++;
                 if(click%2){
                     splitContainer1>SplitterDistance=tf1>Width+tf1>Left+3;
                     bResize>Text=«<«;
                 }
                 else{
                     splitContainer1>SplitterDistance=bResize>Width;
                     bResize>Text=«>»;
                 }

         }
private: System::Void attIn_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
             tAmp1>Text=Convert::ToString(get_amp1());
             set_generator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_compensator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_amp(Convert::ToInt32(attIn>Text)/3,Convert::ToInt32(attOut>Text)/3,Convert::ToInt32(lCanal>Text));
         }
private: System::Void attOut_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
             tAmp1>Text=Convert::ToString(get_amp1());
             set_generator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_compensator(phaseBar1>Value,Convert::ToInt32(tAmp1>Text),Convert::ToInt32(lCanal>Text));
             set_amp(Convert::ToInt32(attIn>Text)/3,Convert::ToInt32(attOut>Text)/3,Convert::ToInt32(lCanal>Text));
         }
private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {
             if(this>Name!=«Can0»&&this>Name!=«Can1»&&this>Name!=«Can2»&&this>Name!=«Can3»)
             {//алгоритм вывода из базы
                if(lObject>Text!=«»){
                int z;
                l2[4]=trackBar1>Value;
                if(trackBar1>Value<64){
                    z=0;
                }
                else{
                    z=trackBar1>Value64;
                }
                timer1>Interval=42;
                //timer1->Interval=65;
                //timer1->Interval=1;
                l2[4]=++l2[4];
                trackBar1>Value=Convert::ToInt32(l2[4]);
                if(l2[4]>trackBar1>Maximum2){
                            timer1>Enabled=false;
                        }      
                mySqlCommand1>CommandText = «select `X` from`»+lBase>Text+«` where `id`=»+trackBar1>Value+«;»;
                mySqlConnection1>Open();
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                while(MySqlDataReader1>Read())
                {
                    for (int i = 0; i < MySqlDataReader1>FieldCount; i++)
                    {
                        l1=Convert::ToDouble(MySqlDataReader1>GetValue(i)>ToString());
                        if(l2[4]>trackBar1>Maximum2){
                            break;
                            timer1>Enabled=false;
                        }
                        per++;
                        if(per>=64){
                        per=0;};
                        if(l1>t) t=t+2.5;
                        if(l3>t) t=t+2.5;
                        if(l1<t) t=t+2.5;
                        if(l3<t) t=t+2.5;
                    }
                }
                mySqlCommand1>CommandText = «select `Y` from`»+lBase>Text+«` where `id`=»+trackBar1>Value+«;»;
                mySqlConnection1>Open();
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                while(MySqlDataReader1>Read())
                {
                    for (int i = 0; i < MySqlDataReader1>FieldCount; i++)
                    {
                        l3=Convert::ToDouble(MySqlDataReader1>GetValue(i)>ToString());
                        if(l2[4]>trackBar1>Maximum2){
                            break;
                            timer1>Enabled=false;
                        }
                        per++;
                        if(per>=64){
                        per=0;};
                        if(l1>t) t=t+2.5;
                        if(l3>t) t=t+2.5;
                        if(l1<t) t=t+2.5;
                        if(l3<t) t=t+2.5;
                    }
                }
                Load_Graw();
                Graw_Draw();
                mySqlConnection1>Close();
             }
             }
             else
             {
                     l1=coordX[Convert::ToInt32(lCanal>Text)][per]/1000;
                     l3=coordY[Convert::ToInt32(lCanal>Text)][per]/1000;
                     this>Load_Graw();
                     this>Graw_Draw();
                     l2[Convert::ToInt32(lCanal>Text)]=++l2[Convert::ToInt32(lCanal>Text)];
                     mySqlCommand1>CommandText = «insert into `»+label2>Text+«`(`X`,`Y`) values (‘»+Convert::ToString(l1)+«‘,'»+Convert::ToString(l3)+«‘);»;
                     mySqlConnection1>Open();
                     mySqlCommand1>ExecuteNonQuery();
                     per++;
                     if(per>=64){
                     per=0;};
                     if(l1>t) t=t+2.5;
                     if(l3>t) t=t+2.5;
                     if(l1<t) t=t+2.5;
                     if(l3<t) t=t+2.5;
             }

           
           
         }
private: System::Void bStart_Click(System::Object^  sender, System::EventArgs^  e) {
            if((tObj>Text!=«»)&&(tObj>Text!=«Enter the name of the object inspection»)&&(this>Name==«Can0»||this>Name==«Can1»||this>Name==«Can2»||this>Name==«Can3»)){
                timer1>Interval=1;
            DateTime date1;
            date1=DateTime::Now;
            mySqlCommand1>CommandText = «create table `»+Convert::ToString(date1.Day)+«_»+Convert::ToString(date1.Month)+«_»+Convert::ToString(date1.Year)+«_»+Convert::ToString(date1.Hour)+«_»+Convert::ToString(date1.Minute)+«_»+Convert::ToString(date1.Second)+«`(`ID` int(10) AUTO_INCREMENT,`X` char(10),`Y` char(10), `step` int(10), PRIMARY KEY(`ID`));»;
            mySqlConnection1>Open();
            label2>Text=Convert::ToString(date1.Day)+«_»+Convert::ToString(date1.Month)+«_»+Convert::ToString(date1.Year)+«_»+Convert::ToString(date1.Hour)+«_»+Convert::ToString(date1.Minute)+«_»+Convert::ToString(date1.Second);
            mySqlCommand1>ExecuteNonQuery();
            mySqlCommand1>CommandText = «insert into `obj`(`OBJ`,`database`) values (‘»+tObj>Text+«‘,'»+label2>Text+«‘);»;
            mySqlCommand1>ExecuteNonQuery();
            timer1>Enabled=true;
            mySqlConnection1>Close();
            }
            else
            {
                tObj>Text=«Enter the name of the object inspection»;
            }
            if((lObject>Text!=«»)&&(trackBar1>Value<trackBar1>Maximum2)){
            timer1>Enabled=true;
            l2[4]=trackBar1>Value;
            }
/*          if(lObject->Text!=»»){
                int z;
                l2[4]=trackBar1->Value;
                if(trackBar1->Value<64){
                    z=0;
                }
                else{
                    z=trackBar1->Value-64;
                }
                mySqlCommand1->CommandText = «select `X` from`»+lBase->Text+»` where `id`<«+trackBar1->Value+» and `id`>=»+z+»;»;
                mySqlConnection1->Open();
                MySqlDataReader1 = mySqlCommand1->ExecuteReader();
                while(MySqlDataReader1->Read())
                {
                    for (int i = 0; i < MySqlDataReader1->FieldCount; i++)
                    {
                        l1=Convert::ToDouble(MySqlDataReader1->GetValue(i)->ToString());
                        l2[4]=++l2[4];
                        trackBar1->Value=Convert::ToInt32(l2[4]);
                        per++;
                        if(per>=64){
                        per=0;};
                        if(l1>t) t=t+2.5;
                        if(l3>t) t=t+2.5;
                        if(l1<-t) t=t+2.5;
                        if(l3<-t) t=t+2.5;
                    }
                }
            mySqlConnection1->Close();
            timer1->Enabled=true;*/

        //  }
         }
private: System::Void bSizePlus_Click(System::Object^  sender, System::EventArgs^  e) {
             t=t2.5;
         }
private: System::Void bSizeMinus_Click(System::Object^  sender, System::EventArgs^  e) {
             t=t+2.5;
         }
private: System::Void trackBar1_Scroll(System::Object^  sender, System::EventArgs^  e) {
             if(!timer1>Enabled){
                int z;
                l2[4]=trackBar1>Value;
                if(trackBar1>Value<64){
                    z=0;
                }
                else{
                    z=trackBar1>Value64;
                }
                l2[4]=++l2[4];
                mySqlCommand1>CommandText = «select `X` from`»+lBase>Text+«` where `id`<«+trackBar1>Value+» and `id`>»+z+«;»;
                mySqlConnection1>Open();
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                while(MySqlDataReader1>Read())
                {
                    for (int i = 0; i < MySqlDataReader1>FieldCount; i++)
                    {
                        l1=Convert::ToDouble(MySqlDataReader1>GetValue(i)>ToString());
                        per++;
                        if(per>=64){
                        per=0;};
                        if(l1>t) t=t+2.5;
                        if(l3>t) t=t+2.5;
                        if(l1<t) t=t+2.5;
                        if(l3<t) t=t+2.5;
                    }
                }
                mySqlCommand1>CommandText = «select `Y` from`»+lBase>Text+«` where `id`=»+trackBar1>Value+«;»;
                mySqlConnection1>Open();
                MySqlDataReader1 = mySqlCommand1>ExecuteReader();
                while(MySqlDataReader1>Read())
                {
                    for (int i = 0; i < MySqlDataReader1>FieldCount; i++)
                    {
                        l3=Convert::ToDouble(MySqlDataReader1>GetValue(i)>ToString());
                        per++;
                        if(per>=64){
                        per=0;};
                        if(l1>t) t=t+2.5;
                        if(l3>t) t=t+2.5;
                        if(l1<t) t=t+2.5;
                        if(l3<t) t=t+2.5;
                    }
                }
                Load_Graw();
                Graw_Draw();
                mySqlConnection1>Close();
                }
         }
private: System::Void bStop_Click(System::Object^  sender, System::EventArgs^  e) {
             timer1>Enabled=false;
         }
private: System::Void bBalance_Click(System::Object^  sender, System::EventArgs^  e) {
                balance(Convert::ToInt32(lCanal>Text));
         }
private: System::Void bFilt_Click(System::Object^  sender, System::EventArgs^  e) {
             filt1^ gfilt = gcnew filt1;
             gfilt>Show();
         }
private: System::Void Def_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
             canalOpen[Convert::ToInt32(lCanal>Text)]=true;
         }
};
}
//Convert::ToInt32(lCanal)
/*          mySqlInsertData->CommandText = «insert into `»+label2->Text+»`(`X`,`Y`, `step`) values (‘»+textBox1->Text+»‘,'»+textBox2->Text+»‘,'»+textBox3->Text+»‘);»;
            label1->Text=mySqlInsertData->CommandText;
            mySqlInsertData->ExecuteNonQuery();
*/

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка lnk2001 неразрешенный внешний символ maincrtstartup
  • Ошибка lo на электронных весах vitek