Sign in to follow this  

Windows forms

This topic is 3730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm new to windows horrid .net programming. All these system namespaces seem wonderfully clear, but apparently the default construction doesn't want to provide a constructor (either that or its the more likely case of my having inadvertantly removing a character or something) anyway, I'm getting a no default constructor error, even though there is definitely a constructor there. (There may be other errors, I couldn't get VC++2005 over this one, but here's my source) Build Output:
------ Build started: Project: Core Object Creator, Configuration: Debug Win32 ------
Compiling...
Core Object Creator.cpp
c:\documents and settings\owner.plasma\my documents\visual studio 2005\projects\core object creator\core object creator\Form1.h(29) : error C2512: 'System::Windows::Forms::Form::Form' : no appropriate default constructor available
c:\documents and settings\owner.plasma\my documents\visual studio 2005\projects\core object creator\core object creator\Form1.h(174) : error C3149: 'System::Windows::Forms::SafeNativeMethods::IFontDisp' : cannot use this type here without a top-level '^'
        This diagnostic occurred while importing type 'System::Windows::Forms::SafeNativeMethods::IFontDisp ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Control ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::ButtonBase ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Button ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
c:\documents and settings\owner.plasma\my documents\visual studio 2005\projects\core object creator\core object creator\Form1.h(174) : error C3149: 'System::Windows::Forms::SafeNativeMethods::IFontDisp' : cannot use this type here without a top-level '^'
        This diagnostic occurred while importing type 'System::Windows::Forms::SafeNativeMethods::IFontDisp ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Control ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::ButtonBase ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Button ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
c:\documents and settings\owner.plasma\my documents\visual studio 2005\projects\core object creator\core object creator\Form1.h(174) : fatal error C1903: unable to recover from previous error(s); stopping compilation
        This diagnostic occurred while importing type 'System::Windows::Forms::SafeNativeMethods::IFontDisp ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Control ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::ButtonBase ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
        This diagnostic occurred while importing type 'System::Windows::Forms::Button ' from assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
cObjects.cpp
Generating Code...
Build log was saved at "file://c:\Documents and Settings\Owner.plasma\My Documents\Visual Studio 2005\Projects\Core Object Creator\Core Object Creator\Debug\BuildLog.htm"
Core Object Creator - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Yeah, I know what absolutely NONE of that means. I just wanted to visually design my object constructor. I kinda hate dot net. Anyway, here is my forms header: (There is alot of code that doesn't matter, but the error occurs at the beginning, and I was afraid that it might have some random deep rooted cause that only I could possibly make, so I kept the other junk in)
#pragma once
#include "cObjects.h"
#include <iostream>
#include <fstream>

namespace CoreObjectCreator {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	CORE::cObjects ObjCon;
	CORE::cObject2d *objptr;
	public ref class Form1 : public System::Windows::Forms::Form //yarr, this be where the first error reside
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}
		//Create a Global Object Container
	
	private: System::Windows::Forms::TextBox^  objnum;
	public: 
		
	private: System::Windows::Forms::Label^  div;
	private: System::Windows::Forms::TextBox^  max;
	private: System::Windows::Forms::Button^  aquire;
	private: System::Windows::Forms::TextBox^  index;
	private: System::Windows::Forms::Button^  button3;
	private: System::Windows::Forms::Button^  button2;


	public: 

	public: 

			 int current_object;

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  load;

	private: 
	private: System::Windows::Forms::TabControl^  Window;
	private: System::Windows::Forms::TabPage^  main;
	private: System::Windows::Forms::TabPage^  edit;
	private: System::Windows::Forms::TabPage^  anim;
	private: System::Windows::Forms::Button^  save;
	private: System::Windows::Forms::TextBox^  sx;
	private: System::Windows::Forms::TextBox^  texture;


	private: System::Windows::Forms::TextBox^  cy;

	private: System::Windows::Forms::TextBox^  cx;

	private: System::Windows::Forms::TextBox^  id;
	private: System::Windows::Forms::TextBox^  animation;


	private: System::Windows::Forms::PictureBox^  pictureBox1;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::Label^  lq;

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



	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::Label^  lw;


	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TextBox^  w;

	private: System::Windows::Forms::TextBox^  sy;

	private: System::Windows::Forms::TextBox^  h;
	private: System::Windows::Forms::OpenFileDialog^  Open;
	private: System::Windows::Forms::SaveFileDialog^  SaveDiag;
	private: System::Windows::Forms::Button^  add;
	private: System::Windows::Forms::Button^  prev;



	private: System::Windows::Forms::Button^  next;

	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::TextBox^  ah;

	private: System::Windows::Forms::TextBox^  aw;




	private: System::Windows::Forms::Button^  animsave;

	private: System::Windows::Forms::Button^  animload;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::TextBox^  animef;

	private: System::Windows::Forms::TextBox^  animer;

	private: System::Windows::Forms::TextBox^  animfr;

	private: System::Windows::Forms::TextBox^  animrow;
	private: System::Windows::Forms::PictureBox^  pictureBox2;
	private: System::Windows::Forms::OpenFileDialog^  AnimOpen;
	private: System::Windows::Forms::SaveFileDialog^  AnimSaveDiag;







	public: 
	protected: 

	protected: 








	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->load = (gcnew System::Windows::Forms::Button());
			this->Window = (gcnew System::Windows::Forms::TabControl());
			this->main = (gcnew System::Windows::Forms::TabPage());
			this->div = (gcnew System::Windows::Forms::Label());
			this->max = (gcnew System::Windows::Forms::TextBox());
			this->objnum = (gcnew System::Windows::Forms::TextBox());
			this->prev = (gcnew System::Windows::Forms::Button());
			this->next = (gcnew System::Windows::Forms::Button());
			this->add = (gcnew System::Windows::Forms::Button());
			this->save = (gcnew System::Windows::Forms::Button());
			this->edit = (gcnew System::Windows::Forms::TabPage());
			this->aquire = (gcnew System::Windows::Forms::Button());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->lq = (gcnew System::Windows::Forms::Label());
			this->l2 = (gcnew System::Windows::Forms::Label());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->lw = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->w = (gcnew System::Windows::Forms::TextBox());
			this->sy = (gcnew System::Windows::Forms::TextBox());
			this->h = (gcnew System::Windows::Forms::TextBox());
			this->sx = (gcnew System::Windows::Forms::TextBox());
			this->texture = (gcnew System::Windows::Forms::TextBox());
			this->cy = (gcnew System::Windows::Forms::TextBox());
			this->cx = (gcnew System::Windows::Forms::TextBox());
			this->id = (gcnew System::Windows::Forms::TextBox());
			this->animation = (gcnew System::Windows::Forms::TextBox());
			this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
			this->anim = (gcnew System::Windows::Forms::TabPage());
			this->index = (gcnew System::Windows::Forms::TextBox());
			this->button3 = (gcnew System::Windows::Forms::Button());
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->animef = (gcnew System::Windows::Forms::TextBox());
			this->animer = (gcnew System::Windows::Forms::TextBox());
			this->animfr = (gcnew System::Windows::Forms::TextBox());
			this->animrow = (gcnew System::Windows::Forms::TextBox());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->ah = (gcnew System::Windows::Forms::TextBox());
			this->aw = (gcnew System::Windows::Forms::TextBox());
			this->animsave = (gcnew System::Windows::Forms::Button());
			this->animload = (gcnew System::Windows::Forms::Button());
			this->Open = (gcnew System::Windows::Forms::OpenFileDialog());
			this->SaveDiag = (gcnew System::Windows::Forms::SaveFileDialog());
			this->AnimOpen = (gcnew System::Windows::Forms::OpenFileDialog());
			this->AnimSaveDiag = (gcnew System::Windows::Forms::SaveFileDialog());
			this->Window->SuspendLayout();
			this->main->SuspendLayout();
			this->edit->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
			this->anim->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->BeginInit();
			this->SuspendLayout();
			// 
			// load
			// 
			this->load->Location = System::Drawing::Point(9, 6);
			this->load->Name = L"load";
			this->load->Size = System::Drawing::Size(75, 23);
			this->load->TabIndex = 0;
			this->load->Text = L"Load";
			this->load->UseVisualStyleBackColor = true;
			this->load->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
			// 
			// Window
			// 
			this->Window->Controls->Add(this->main);
			this->Window->Controls->Add(this->edit);
			this->Window->Controls->Add(this->anim);
			this->Window->Location = System::Drawing::Point(-1, 0);
			this->Window->Name = L"Window";
			this->Window->SelectedIndex = 0;
			this->Window->Size = System::Drawing::Size(418, 358);
			this->Window->TabIndex = 4;
			// 
			// main
			// 
			this->main->Controls->Add(this->div);
			this->main->Controls->Add(this->max);
			this->main->Controls->Add(this->objnum);
			this->main->Controls->Add(this->prev);
			this->main->Controls->Add(this->next);
			this->main->Controls->Add(this->add);
			this->main->Controls->Add(this->save);
			this->main->Controls->Add(this->load);
			this->main->Location = System::Drawing::Point(4, 22);
			this->main->Name = L"main";
			this->main->Padding = System::Windows::Forms::Padding(3);
			this->main->Size = System::Drawing::Size(410, 332);
			this->main->TabIndex = 0;
			this->main->Text = L"Object";
			this->main->UseVisualStyleBackColor = true;
			// 
			// div
			// 
			this->div->AutoSize = true;
			this->div->Location = System::Drawing::Point(90, 39);
			this->div->Name = L"div";
			this->div->Size = System::Drawing::Size(12, 13);
			this->div->TabIndex = 10;
			this->div->Text = L"/";
			this->div->Click += gcnew System::EventHandler(this, &Form1::label13_Click);
			// 
			// max
			// 
			this->max->Location = System::Drawing::Point(105, 36);
			this->max->Name = L"max";
			this->max->ReadOnly = true;
			this->max->Size = System::Drawing::Size(74, 20);
			this->max->TabIndex = 9;
			// 
			// objnum
			// 
			this->objnum->Location = System::Drawing::Point(10, 36);
			this->objnum->Name = L"objnum";
			this->objnum->ReadOnly = true;
			this->objnum->Size = System::Drawing::Size(74, 20);
			this->objnum->TabIndex = 8;
			this->objnum->TextChanged += gcnew System::EventHandler(this, &Form1::objnum_TextChanged);
			// 
			// prev
			// 
			this->prev->Location = System::Drawing::Point(333, 6);
			this->prev->Name = L"prev";
			this->prev->Size = System::Drawing::Size(75, 23);
			this->prev->TabIndex = 7;
			this->prev->Text = L"Prev";
			this->prev->UseVisualStyleBackColor = true;
			this->prev->Click += gcnew System::EventHandler(this, &Form1::prev_Click);
			// 
			// next
			// 
			this->next->Location = System::Drawing::Point(252, 6);
			this->next->Name = L"next";
			this->next->Size = System::Drawing::Size(75, 23);
			this->next->TabIndex = 6;
			this->next->Text = L"Next";
			this->next->UseCompatibleTextRendering = true;
			this->next->UseVisualStyleBackColor = true;
			this->next->Click += gcnew System::EventHandler(this, &Form1::next_Click);
			// 
			// add
			// 
			this->add->Location = System::Drawing::Point(171, 6);
			this->add->Name = L"add";
			this->add->Size = System::Drawing::Size(75, 23);
			this->add->TabIndex = 5;
			this->add->Text = L"Add";
			this->add->UseVisualStyleBackColor = true;
			this->add->Click += gcnew System::EventHandler(this, &Form1::button1_Click_1);
			// 
			// save
			// 
			this->save->Location = System::Drawing::Point(90, 6);
			this->save->Name = L"save";
			this->save->Size = System::Drawing::Size(75, 23);
			this->save->TabIndex = 4;
			this->save->Text = L"Save";
			this->save->UseVisualStyleBackColor = true;
			this->save->Click += gcnew System::EventHandler(this, &Form1::save_Click);
			// 
			// edit
			// 
			this->edit->Controls->Add(this->aquire);
			this->edit->Controls->Add(this->label9);
			this->edit->Controls->Add(this->label8);
			this->edit->Controls->Add(this->lq);
			this->edit->Controls->Add(this->l2);
			this->edit->Controls->Add(this->label5);
			this->edit->Controls->Add(this->lw);
			this->edit->Controls->Add(this->label3);
			this->edit->Controls->Add(this->label2);
			this->edit->Controls->Add(this->label1);
			this->edit->Controls->Add(this->w);
			this->edit->Controls->Add(this->sy);
			this->edit->Controls->Add(this->h);
			this->edit->Controls->Add(this->sx);
			this->edit->Controls->Add(this->texture);
			this->edit->Controls->Add(this->cy);
			this->edit->Controls->Add(this->cx);
			this->edit->Controls->Add(this->id);
			this->edit->Controls->Add(this->animation);
			this->edit->Controls->Add(this->pictureBox1);
			this->edit->Location = System::Drawing::Point(4, 22);
			this->edit->Name = L"edit";
			this->edit->Padding = System::Windows::Forms::Padding(3);
			this->edit->Size = System::Drawing::Size(410, 332);
			this->edit->TabIndex = 1;
			this->edit->Text = L"Editor";
			this->edit->UseVisualStyleBackColor = true;
			this->edit->Click += gcnew System::EventHandler(this, &Form1::edit_Click);
			// 
			// aquire
			// 
			this->aquire->Location = System::Drawing::Point(10, 296);
			this->aquire->Name = L"aquire";
			this->aquire->Size = System::Drawing::Size(75, 23);
			this->aquire->TabIndex = 19;
			this->aquire->Text = L"Aquire";
			this->aquire->UseVisualStyleBackColor = true;
			this->aquire->Click += gcnew System::EventHandler(this, &Form1::aquire_Click);
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(3, 241);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(35, 13);
			this->label9->TabIndex = 18;
			this->label9->Text = L"Width";
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(3, 202);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(44, 13);
			this->label8->TabIndex = 17;
			this->label8->Text = L"Scale Y";
			// 
			// lq
			// 
			this->lq->AutoSize = true;
			this->lq->Location = System::Drawing::Point(3, 162);
			this->lq->Name = L"lq";
			this->lq->Size = System::Drawing::Size(44, 13);
			this->lq->TabIndex = 16;
			this->lq->Text = L"Scale X";
			// 
			// l2
			// 
			this->l2->AutoSize = true;
			this->l2->Location = System::Drawing::Point(3, 123);
			this->l2->Name = L"l2";
			this->l2->Size = System::Drawing::Size(38, 13);
			this->l2->TabIndex = 15;
			this->l2->Text = L"Height";
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Location = System::Drawing::Point(277, 241);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(43, 13);
			this->label5->TabIndex = 14;
			this->label5->Text = L"Texture";
			// 
			// lw
			// 
			this->lw->AutoSize = true;
			this->lw->Location = System::Drawing::Point(3, 84);
			this->lw->Name = L"lw";
			this->lw->Size = System::Drawing::Size(48, 13);
			this->lw->TabIndex = 13;
			this->lw->Text = L"Center Y";
			this->lw->Click += gcnew System::EventHandler(this, &Form1::label4_Click);
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Location = System::Drawing::Point(3, 45);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(48, 13);
			this->label3->TabIndex = 12;
			this->label3->Text = L"Center X";
			this->label3->Click += gcnew System::EventHandler(this, &Form1::label3_Click);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(3, 6);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(18, 13);
			this->label2->TabIndex = 11;
			this->label2->Text = L"ID";
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(277, 284);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(53, 13);
			this->label1->TabIndex = 10;
			this->label1->Text = L"Animation";
			// 
			// w
			// 
			this->w->Location = System::Drawing::Point(10, 257);
			this->w->Name = L"w";
			this->w->Size = System::Drawing::Size(29, 20);
			this->w->TabIndex = 9;
			// 
			// sy
			// 
			this->sy->Location = System::Drawing::Point(10, 218);
			this->sy->Name = L"sy";
			this->sy->Size = System::Drawing::Size(29, 20);
			this->sy->TabIndex = 8;
			// 
			// h
			// 
			this->h->Location = System::Drawing::Point(10, 139);
			this->h->Name = L"h";
			this->h->Size = System::Drawing::Size(29, 20);
			this->h->TabIndex = 7;
			// 
			// sx
			// 
			this->sx->Location = System::Drawing::Point(10, 179);
			this->sx->Name = L"sx";
			this->sx->Size = System::Drawing::Size(29, 20);
			this->sx->TabIndex = 6;
			// 
			// texture
			// 
			this->texture->Location = System::Drawing::Point(280, 257);
			this->texture->Name = L"texture";
			this->texture->Size = System::Drawing::Size(100, 20);
			this->texture->TabIndex = 5;
			// 
			// cy
			// 
			this->cy->Location = System::Drawing::Point(10, 100);
			this->cy->Name = L"cy";
			this->cy->Size = System::Drawing::Size(29, 20);
			this->cy->TabIndex = 4;
			// 
			// cx
			// 
			this->cx->Location = System::Drawing::Point(10, 61);
			this->cx->Name = L"cx";
			this->cx->Size = System::Drawing::Size(29, 20);
			this->cx->TabIndex = 3;
			// 
			// id
			// 
			this->id->Location = System::Drawing::Point(10, 22);
			this->id->Name = L"id";
			this->id->ReadOnly = true;
			this->id->Size = System::Drawing::Size(29, 20);
			this->id->TabIndex = 2;
			// 
			// animation
			// 
			this->animation->Location = System::Drawing::Point(280, 300);
			this->animation->Name = L"animation";
			this->animation->Size = System::Drawing::Size(100, 20);
			this->animation->TabIndex = 1;
			// 
			// pictureBox1
			// 
			this->pictureBox1->Location = System::Drawing::Point(153, 6);
			this->pictureBox1->Name = L"pictureBox1";
			this->pictureBox1->Size = System::Drawing::Size(248, 232);
			this->pictureBox1->TabIndex = 0;
			this->pictureBox1->TabStop = false;
			this->pictureBox1->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
			// 
			// anim
			// 
			this->anim->Controls->Add(this->index);
			this->anim->Controls->Add(this->button3);
			this->anim->Controls->Add(this->button2);
			this->anim->Controls->Add(this->pictureBox2);
			this->anim->Controls->Add(this->label12);
			this->anim->Controls->Add(this->label11);
			this->anim->Controls->Add(this->label10);
			this->anim->Controls->Add(this->label7);
			this->anim->Controls->Add(this->animef);
			this->anim->Controls->Add(this->animer);
			this->anim->Controls->Add(this->animfr);
			this->anim->Controls->Add(this->animrow);
			this->anim->Controls->Add(this->label6);
			this->anim->Controls->Add(this->label4);
			this->anim->Controls->Add(this->ah);
			this->anim->Controls->Add(this->aw);
			this->anim->Controls->Add(this->animsave);
			this->anim->Controls->Add(this->animload);
			this->anim->Location = System::Drawing::Point(4, 22);
			this->anim->Name = L"anim";
			this->anim->Size = System::Drawing::Size(410, 332);
			this->anim->TabIndex = 2;
			this->anim->Text = L"Animation Editor";
			this->anim->UseVisualStyleBackColor = true;
			// 
			// index
			// 
			this->index->Location = System::Drawing::Point(9, 177);
			this->index->Name = L"index";
			this->index->ReadOnly = true;
			this->index->Size = System::Drawing::Size(49, 20);
			this->index->TabIndex = 22;
			// 
			// button3
			// 
			this->button3->Location = System::Drawing::Point(312, 129);
			this->button3->Name = L"button3";
			this->button3->Size = System::Drawing::Size(75, 23);
			this->button3->TabIndex = 21;
			this->button3->Text = L"PrevIndex";
			this->button3->UseVisualStyleBackColor = true;
			this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
			// 
			// button2
			// 
			this->button2->Location = System::Drawing::Point(312, 99);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(75, 23);
			this->button2->TabIndex = 20;
			this->button2->Text = L"NextIndex";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
			// 
			// pictureBox2
			// 
			this->pictureBox2->Location = System::Drawing::Point(3, 4);
			this->pictureBox2->Name = L"pictureBox2";
			this->pictureBox2->Size = System::Drawing::Size(185, 167);
			this->pictureBox2->TabIndex = 18;
			this->pictureBox2->TabStop = false;
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Location = System::Drawing::Point(228, 146);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(58, 13);
			this->label12->TabIndex = 17;
			this->label12->Text = L"End Frame";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Location = System::Drawing::Point(229, 119);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(51, 13);
			this->label11->TabIndex = 16;
			this->label11->Text = L"End Row";
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Location = System::Drawing::Point(229, 92);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(62, 13);
			this->label10->TabIndex = 15;
			this->label10->Text = L"Frame Rate";
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(229, 64);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(52, 13);
			this->label7->TabIndex = 14;
			this->label7->Text = L"Row Size";
			// 
			// animef
			// 
			this->animef->Location = System::Drawing::Point(194, 139);
			this->animef->Name = L"animef";
			this->animef->Size = System::Drawing::Size(28, 20);
			this->animef->TabIndex = 13;
			this->animef->TextChanged += gcnew System::EventHandler(this, &Form1::textBox5_TextChanged);
			// 
			// animer
			// 
			this->animer->Location = System::Drawing::Point(194, 112);
			this->animer->Name = L"animer";
			this->animer->Size = System::Drawing::Size(28, 20);
			this->animer->TabIndex = 12;
			// 
			// animfr
			// 
			this->animfr->Location = System::Drawing::Point(194, 85);
			this->animfr->Name = L"animfr";
			this->animfr->Size = System::Drawing::Size(28, 20);
			this->animfr->TabIndex = 11;
			this->animfr->TextChanged += gcnew System::EventHandler(this, &Form1::textBox3_TextChanged_1);
			// 
			// animrow
			// 
			this->animrow->Location = System::Drawing::Point(194, 58);
			this->animrow->Name = L"animrow";
			this->animrow->Size = System::Drawing::Size(28, 20);
			this->animrow->TabIndex = 10;
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(229, 37);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(38, 13);
			this->label6->TabIndex = 9;
			this->label6->Text = L"Height";
			this->label6->Click += gcnew System::EventHandler(this, &Form1::label6_Click);
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Location = System::Drawing::Point(229, 10);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(35, 13);
			this->label4->TabIndex = 8;
			this->label4->Text = L"Width";
			// 
			// ah
			// 
			this->ah->Location = System::Drawing::Point(194, 31);
			this->ah->Name = L"ah";
			this->ah->Size = System::Drawing::Size(28, 20);
			this->ah->TabIndex = 7;
			this->ah->TextChanged += gcnew System::EventHandler(this, &Form1::textBox3_TextChanged);
			// 
			// aw
			// 
			this->aw->Location = System::Drawing::Point(194, 4);
			this->aw->Name = L"aw";
			this->aw->Size = System::Drawing::Size(28, 20);
			this->aw->TabIndex = 6;
			// 
			// animsave
			// 
			this->animsave->Location = System::Drawing::Point(312, 39);
			this->animsave->Name = L"animsave";
			this->animsave->Size = System::Drawing::Size(75, 23);
			this->animsave->TabIndex = 2;
			this->animsave->Text = L"SaveAnim";
			this->animsave->UseVisualStyleBackColor = true;
			this->animsave->Click += gcnew System::EventHandler(this, &Form1::animsave_Click);
			// 
			// animload
			// 
			this->animload->Location = System::Drawing::Point(312, 10);
			this->animload->Name = L"animload";
			this->animload->Size = System::Drawing::Size(75, 23);
			this->animload->TabIndex = 1;
			this->animload->Text = L"LoadAnim";
			this->animload->UseVisualStyleBackColor = true;
			this->animload->Click += gcnew System::EventHandler(this, &Form1::animload_Click);
			// 
			// Open
			// 
			this->Open->InitialDirectory = L"\\";
			this->Open->FileOk += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::openFileDialog1_FileOk);
			// 
			// SaveDiag
			// 
			this->SaveDiag->InitialDirectory = L"\\";
			this->SaveDiag->FileOk += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::SaveDiag_FileOk);
			// 
			// AnimOpen
			// 
			this->AnimOpen->InitialDirectory = L"\\";
			this->AnimOpen->FileOk += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::AnimOpen_FileOk);
			// 
			// AnimSaveDiag
			// 
			this->AnimSaveDiag->FileOk += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::AnimSaveDiag_FileOk);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(416, 358);
			this->Controls->Add(this->Window);
			this->Name = L"Form1";
			this->Text = L"Object Editor";
			this->Window->ResumeLayout(false);
			this->main->ResumeLayout(false);
			this->main->PerformLayout();
			this->edit->ResumeLayout(false);
			this->edit->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
			this->anim->ResumeLayout(false);
			this->anim->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->EndInit();
			this->ResumeLayout(false);

		}
#pragma endregion
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->Open->ShowDialog();
			 }
private: System::Void label3_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void label4_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void edit_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void openFileDialog1_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
			 char* dir = this->Open->FileName->ToCharArray(0,this->Open->FileName->Length());
			 ObjCon.LoadAll(dir);
			 this->current_object = 0;
			 this->objptr = ObjCon.GrabObject(this->current_object);
			 this->objnum->Text = this->objptr->m_id;
			 this->max->Text = ObjCon.m_size;
			 this->objptr->m_index = 0; 
			 
			 
		 }
private: System::Void SaveDiag_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
		 }
private: System::Void save_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->SaveDiag->ShowDialog();
		 }
private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
			 objptr = NULL;
			 objptr = new cObject2d;			
			 ObjCon.AddObject(objptr, ObjCon.m_size);
			 this->max->Text = ObjCon.m_size;
		 }
private: System::Void label6_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void textBox3_TextChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void textBox3_TextChanged_1(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void textBox5_TextChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void animload_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->AnimOpen->ShowDialog();
		 }
private: System::Void animsave_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->AnimSaveDiag->ShowDialog();
		 }
private: System::Void AnimOpen_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
			 //Load animation
			 objptr->LoadAnimation(this->animation->Text);
			 this->pictureBox2->Load(this->AnimOpen->ToString());
			 this->animef->Text = objptr->m_animation.m_data[0].m_endframe;
			 this->animer->Text = objptr->m_animation.m_data[0].m_endrow;
			 this->animfr->Text = objptr->m_animation.m_data[0].m_rate;
			 this->aw->Text = objptr->m_animation.m_data[0].m_width;
			 this->ah->Text = objptr->m_animation.m_data[0].m_height;
			 this->animrow->Text = objptr->m_animation.m_rowsize;
			 this->objptr->m_index = this->index->Text = 0;

				 
		 }

private: System::Void pictureBox1_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->pictureBox1->Load(this->texture->ToString());
		 }
private: System::Void AnimSaveDiag_FileOk(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
			 
			 objptr->m_animation.m_data[0].m_endframe = this->animef->Text;
			 objptr->m_animation.m_data[0].m_endrow = this->animer->Text;
			 objptr->m_animation.m_data[0].m_rate = this->animfr->Text;
			 objptr->m_animation.m_data[0].m_width = this->aw->Text;
			 objptr->m_animation.m_data[0].m_height = this->ah->Text;
			 objptr->m_animation.m_rowsize = this->animrow->Text;
			 objptr->m_animation.Save(this->AnimSaveDiag->ToString());
		 }
private: System::Void next_Click(System::Object^  sender, System::EventArgs^  e) {
			 objptr = ObjCon.GrabObject(++current_object);
			 this->max->Text = ObjCon.m_size;
			 this->id->Text = this->current_object;
		 }
private: System::Void prev_Click(System::Object^  sender, System::EventArgs^  e) {
			 objptr = ObjCon.GrabObject(--current_object);
			 this->max->Text = ObjCon.m_size;
			 this->id->Text = this->current_object;
		 }
private: System::Void label13_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void aquire_Click(System::Object^  sender, System::EventArgs^  e) {
			 objptr->m_cx = this->cx->Text;
			 objptr->m_cy = this->cy->Text;
			 objptr->m_h = this->h->Text;
			 objptr->m_w = this->w->Text;
			 objptr->m_sy = this->sy->Text;
			 objptr->m_sx = this->sx->Text;
			 objptr->m_animdir = this->animation->Text;
			 objptr->m_dir = this->texture->Text;
		 }
private: System::Void button1_Click_2(System::Object^  sender, System::EventArgs^  e) {

		 }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 ++this->index;
			 this->animef->Text = objptr->m_animation.m_data[this->index].m_endframe;
			 this->animer->Text = objptr->m_animation.m_data[this->index].m_endrow;
			 this->animfr->Text = objptr->m_animation.m_data[this->index].m_rate;
			 this->aw->Text = objptr->m_animation.m_data[this->index].m_width;
			 this->ah->Text = objptr->m_animation.m_data[this->index].m_height;
			 this->animrow->Text = objptr->m_animation.m_rowsize;
			 
		 }
private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
			 --this->index;
			 this->animef->Text = objptr->m_animation.m_data[this->index].m_endframe;
			 this->animer->Text = objptr->m_animation.m_data[this->index].m_endrow;
			 this->animfr->Text = objptr->m_animation.m_data[this->index].m_rate;
			 this->aw->Text = objptr->m_animation.m_data[this->index].m_width;
			 this->ah->Text = objptr->m_animation.m_data[this->index].m_height;
			 this->animrow->Text = objptr->m_animation.m_rowsize;
		 }
};
}


Share this post


Link to post
Share on other sites

This topic is 3730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this