#pragma once
#ifndef DEF_FORMADDFILE
#define DEF_FORMADDFILE
#include "Catalogue.h"
#include "dotnetInterface.h"
#include "Form1.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace MPEG2_TS_Gui {
///
/// Summary for FormAddFile
///
/// 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.
///
ref class Form1; //: public System::Windows::Forms::Form;
public ref class FormAddFile : public System::Windows::Forms::Form
{
public:
FormAddFile()
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
f = nullptr;
}
FormAddFile(Form1^ formGeneral)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
f = formGeneral;
}
//FormAddFile(dotnetInterface^ dot)
//{
// InitializeComponent();
// //
// //TODO: Add the constructor code here
// //
// d = dot;
//}
protected:
///
/// Clean up any resources being used.
///
~FormAddFile()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ lSelectFileTS;
private: System::Windows::Forms::Label^ lFileTSName;
private: System::Windows::Forms::Label^ lFileTSSize;
private: System::Windows::Forms::Label^ lFileTSDescription;
private: System::Windows::Forms::TextBox^ tBFileTSName;
private: System::Windows::Forms::TextBox^ tBFileTSSize;
private: System::Windows::Forms::TextBox^ tBFileTSDescription;
private: System::Windows::Forms::Button^ bAddFileToCatalogue;
private: System::Windows::Forms::Button^ bClose;
private: Form1^ f;
//private: dotnetInterface^ d;
protected:
private:
///
/// Required designer variable.
///
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
this->lSelectFileTS = (gcnew System::Windows::Forms::Label());
this->lFileTSName = (gcnew System::Windows::Forms::Label());
this->lFileTSSize = (gcnew System::Windows::Forms::Label());
this->lFileTSDescription = (gcnew System::Windows::Forms::Label());
this->tBFileTSName = (gcnew System::Windows::Forms::TextBox());
this->tBFileTSSize = (gcnew System::Windows::Forms::TextBox());
this->tBFileTSDescription = (gcnew System::Windows::Forms::TextBox());
this->bAddFileToCatalogue = (gcnew System::Windows::Forms::Button());
this->bClose = (gcnew System::Windows::Forms::Button());
this->SuspendLayout();
//
// lSelectFileTS
//
this->lSelectFileTS->AutoSize = true;
this->lSelectFileTS->Location = System::Drawing::Point(13, 14);
this->lSelectFileTS->Name = L"lSelectFileTS";
this->lSelectFileTS->Size = System::Drawing::Size(91, 13);
this->lSelectFileTS->TabIndex = 0;
this->lSelectFileTS->Text = L"Select the TS File";
//
// lFileTSName
//
this->lFileTSName->AutoSize = true;
this->lFileTSName->Location = System::Drawing::Point(12, 93);
this->lFileTSName->Name = L"lFileTSName";
this->lFileTSName->Size = System::Drawing::Size(35, 13);
this->lFileTSName->TabIndex = 1;
this->lFileTSName->Text = L"Name";
//
// lFileTSSize
//
this->lFileTSSize->AutoSize = true;
this->lFileTSSize->Location = System::Drawing::Point(12, 122);
this->lFileTSSize->Name = L"lFileTSSize";
this->lFileTSSize->Size = System::Drawing::Size(27, 13);
this->lFileTSSize->TabIndex = 2;
this->lFileTSSize->Text = L"Size";
//
// lFileTSDescription
//
this->lFileTSDescription->AutoSize = true;
this->lFileTSDescription->Location = System::Drawing::Point(12, 151);
this->lFileTSDescription->Name = L"lFileTSDescription";
this->lFileTSDescription->Size = System::Drawing::Size(60, 13);
this->lFileTSDescription->TabIndex = 3;
this->lFileTSDescription->Text = L"Description";
//
// tBFileTSName
//
this->tBFileTSName->Location = System::Drawing::Point(103, 90);
this->tBFileTSName->Name = L"tBFileTSName";
this->tBFileTSName->Size = System::Drawing::Size(161, 20);
this->tBFileTSName->TabIndex = 4;
//
// tBFileTSSize
//
this->tBFileTSSize->Location = System::Drawing::Point(103, 119);
this->tBFileTSSize->Name = L"tBFileTSSize";
this->tBFileTSSize->Size = System::Drawing::Size(161, 20);
this->tBFileTSSize->TabIndex = 5;
//
// tBFileTSDescription
//
this->tBFileTSDescription->Location = System::Drawing::Point(103, 151);
this->tBFileTSDescription->Multiline = true;
this->tBFileTSDescription->Name = L"tBFileTSDescription";
this->tBFileTSDescription->Size = System::Drawing::Size(161, 100);
this->tBFileTSDescription->TabIndex = 6;
//
// bAddFileToCatalogue
//
this->bAddFileToCatalogue->Location = System::Drawing::Point(26, 282);
this->bAddFileToCatalogue->Name = L"bAddFileToCatalogue";
this->bAddFileToCatalogue->Size = System::Drawing::Size(97, 24);
this->bAddFileToCatalogue->TabIndex = 7;
this->bAddFileToCatalogue->Text = L"Add";
this->bAddFileToCatalogue->UseVisualStyleBackColor = true;
this->bAddFileToCatalogue->Click += gcnew System::EventHandler(this, &FormAddFile::bAddFileToCatalogue_Click);
//
// bClose
//
this->bClose->Location = System::Drawing::Point(163, 282);
this->bClose->Name = L"bClose";
this->bClose->Size = System::Drawing::Size(101, 24);
this->bClose->TabIndex = 8;
this->bClose->Text = L"Close";
this->bClose->UseVisualStyleBackColor = true;
this->bClose->Click += gcnew System::EventHandler(this, &FormAddFile::bClose_Click);
//
// FormAddFile
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(292, 318);
this->Controls->Add(this->bClose);
this->Controls->Add(this->bAddFileToCatalogue);
this->Controls->Add(this->tBFileTSDescription);
this->Controls->Add(this->tBFileTSSize);
this->Controls->Add(this->tBFileTSName);
this->Controls->Add(this->lFileTSDescription);
this->Controls->Add(this->lFileTSSize);
this->Controls->Add(this->lFileTSName);
this->Controls->Add(this->lSelectFileTS);
this->Name = L"FormAddFile";
this->Text = L"*Add a Transport Stream File*";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void bAddFileToCatalogue_Click(System::Object^ sender, System::EventArgs^ e) {
if((this->tBFileTSName->Text != "")&&(this->tBFileTSSize->Text != "")&&(this->tBFileTSDescription->Text != ""))
{
// mise dans le fichier Description.dat
//this->f->dotnetInt->AddAFileToCatalogue(this->f->dotnetInt->StringTostringSTL(this->tBFileTSName->Text),this->f->dotnetInt->StringTostringSTL(this->tBFileTSSize->Text),this->f->dotnetInt->StringTostringSTL(this->tBFileTSDescription->Text));
// mise a jour dans la listBox
//this->f->lBFileTS->Items->AddRange(this->tBFileTSName->Text);
//this->f->tBDescription->Text = "wech ca ecrit la!";
//this->tBFileTSDescription->Text = gcnew String(this->d->GetCatalogueName(0).c_str());
}
else
{
this->tBFileTSName->Text = "You need to enter data here...";
this->tBFileTSSize->Text = "You need to enter data here...";
this->tBFileTSDescription->Text = "You need to enter data here...";
}
}
private: System::Void bClose_Click(System::Object^ sender, System::EventArgs^ e) {
this->Close();
}
};
}
#endif