none
le script automatiquement généré par Form génére une erreur de compilation RRS feed

  • Discussion générale

  • bonjour

    J'ai maquetté une nouvelle fonction sur Le spécification checker.

    Le code e erreur de compilation

    Je vous met l'include, le code  l'erreur

    #ifndef ChangeStatus_H
    #define ChangeStatus_H
    #pragma once
    
    namespace SpecificationChecker {
    
    	using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    
    	/// Description résumée de ChangeStatus
    	/// </summary>
    	public ref class ChangeStatus : public System::Windows::Forms::Form
    	{
    	/// <summary>
    	public:
    		ChangeStatus::ChangeStatus(void);
    		void ChangeStatus::InitializeComponent();
    	protected:
    		/// <summary>
    		/// Nettoyage des ressources utilisées.
    		/// </summary>
    		ChangeStatus::~ChangeStatus();
    	private: 
    		System::Windows::Forms::Label^  label1;
    		System::Windows::Forms::Label^  label2;
    		System::Windows::Forms::ListBox^  listBox1;
    		System::Windows::Forms::ListBox^  listBox2;
    		System::Windows::Forms::Button^  button1;
    			 /// <summary>
    		/// Variable nécessaire au concepteur.
    		/// </summary>
    		System::ComponentModel::Container ^components;
    		static System::Void ChangeStatus::button1_Click(System::Object^  sender, System::EventArgs^  e);
    	};
    }
    #endif

    Le code:

    #include "StdAfx.h"
    #include "AlignStructure.h"
    #include "Macro.h"
    #include "EnumerationM.hpp"
    #include "StructureM.h"
    #include "Layout.h"
    #include "ClasseAlignerManaged.hpp"
    #include "Database.h"
    #include "Exception.h"
    #include "InterbaseManagerM.hpp"
    #include "MissionDatabaseManagerM.hpp"
    #include "SchedulerGlobal.hpp"
    #include "ChangeStatus.h"
    #include "MainMenue.h"
    
    namespace SpecificationChecker {
    
    	using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    	
    	
    		ChangeStatus::ChangeStatus(void)
    		{
    			List<ElementWork^>^ ListStringDoc;
    			ElementWork^ pElement;
    			InitializeComponent();
    			//
    			//TODO: ajoutez ici le code du constructeur
    			//
    			// il faut maintenat ouvrir les ligens à afficher
    			ListStringDoc = CMDBManagerM::readWork( enStatusDoc::DOCUMENT_LOADE);
    			for each( pElement in ListStringDoc)
    			{
    				System::String^ line = pElement->Id + L"   " + pElement->wsText;
    				this->listBox1->Items->Add(line);
    			}
    			ListStringDoc = CMDBManagerM::readWork( enStatusDoc::DOCUMENT_TO_REWORK);
    			for each( pElement in ListStringDoc)
    			{
    				System::String^ line = pElement->Id + L"   " + pElement->wsText;
    				this->listBox2->Items->Add(line);
    			}
    			this->ShowDialog();
    			
    			
    		}
    
    		ChangeStatus::~ChangeStatus()
    		{
    			if (components)
    			{
    				delete components;
    			}
    		}
    
    		#pragma region Windows Form Designer generated code
    		/// <summary>
    		/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
    		/// le contenu de cette méthode avec l'éditeur de code.
    		/// </summary>
    		void ChangeStatus::InitializeComponent(void)
    		{
    			this->label1 = (gcnew System::Windows::Forms::Label());
    			this->label2 = (gcnew System::Windows::Forms::Label());
    			this->listBox1 = (gcnew System::Windows::Forms::ListBox());
    			this->listBox2 = (gcnew System::Windows::Forms::ListBox());
    			this->button1 = (gcnew System::Windows::Forms::Button());
    			this->SuspendLayout();
    			// 
    			// label1
    			// 
    			this->label1->AutoSize = true;
    			this->label1->Location = System::Drawing::Point(64, 9);
    			this->label1->Name = L"label1";
    			this->label1->Size = System::Drawing::Size(95, 13);
    			this->label1->TabIndex = 2;
    			this->label1->Text = L"Document Loaded";
    			// 
    			// label2
    			// 
    			this->label2->AutoSize = true;
    			this->label2->Location = System::Drawing::Point(64, 136);
    			this->label2->Name = L"label2";
    			this->label2->Size = System::Drawing::Size(112, 13);
    			this->label2->TabIndex = 3;
    			this->label2->Text = L"Document To Rework";
    			// 
    			// listBox1
    			// 
    			this->listBox1->FormattingEnabled = true;
    			this->listBox1->Location = System::Drawing::Point(67, 25);
    			this->listBox1->Name = L"listBox1";
    			this->listBox1->Size = System::Drawing::Size(898, 95);
    			this->listBox1->TabIndex = 4;
    			// 
    			// listBox2
    			// 
    			this->listBox2->FormattingEnabled = true;
    			this->listBox2->Location = System::Drawing::Point(67, 157);
    			this->listBox2->Name = L"listBox2";
    			this->listBox2->Size = System::Drawing::Size(898, 147);
    			this->listBox2->TabIndex = 5;
    			// 
    			// button1
    			// 
    			this->button1->Location = System::Drawing::Point(982, 356);
    			this->button1->Name = L"button1";
    			this->button1->Size = System::Drawing::Size(75, 23);
    			this->button1->TabIndex = 6;
    			this->button1->Text = "Done";
    			this->button1->UseVisualStyleBackColor = true;
    			this->button1->Click += gcnew System::EventHandler(this, &ChangeStatus::button1_Click);
    			// 
    			// ChangeStatus
    			// 
    			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
    			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    			this->ClientSize = System::Drawing::Size(1316, 429);
    			this->Controls->Add(this->button1);
    			this->Controls->Add(this->listBox2);
    			this->Controls->Add(this->listBox1);
    			this->Controls->Add(this->label2);
    			this->Controls->Add(this->label1);
    			this->Name = L"ChangeStatus";
    			this->Text = L"ChangeStatus";
    			this->ResumeLayout(false);
    			this->PerformLayout();
    
    		}
    #pragma endregion
    		System::Void ChangeStatus::button1_Click(System::Object^  sender, System::EventArgs^  e)
    		{
    			//this->Close();
    		}
    };

    et l'erreur

    1>ChangeStatus.cpp(116): error C3350: 'System::EventHandler' : un constructeur délégué attend 1 argument(s)
    1>


    Jean Noël Martin


    vendredi 17 octobre 2014 17:02

Toutes les réponses

  • C'est quoi la ligne 116 de ChangeStatus ?

    La plus belle fille du monde ne peut offrir que ce qu'elle a, le Designer WinForm aussi.

    Il y a 1000 et une façon de le mettre en défaut, alors considérez le comme votre allié et ne lui en demandez pas trop non plus.


    Paul Bacelar, Ex - MVP VC++

    dimanche 19 octobre 2014 22:55
    Modérateur