#pragma once
#include "BaseForm.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 ObjDataEdit
{
	/// <summary> 
	/// Summary for CampForm
	///
	/// 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>
#ifndef _Just_Show_DotNet_Form_
    public __gc class CampForm : public System::Windows::Forms::Form
#else 
    public __gc class CampForm : public BaseForm 
#endif
	{
	public: 
        CampForm( char* FormName , char* DBName , char* OutputFile  , bool IsReadOnly , SearchFormTypeENUM FormType ) :  BaseForm( FormName , DBName , OutputFile  , IsReadOnly , FormType )
        {
            InitializeComponent();
            this->panel4_Base->Controls->Add(this->panel1);
			Initial( );
			
        }
        
	protected: 
		void Dispose(Boolean disposing)
		{
			Release( );
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
    private: System::Windows::Forms::Panel *  panel1;
	private: System::Windows::Forms::DataGridView*  dataGridView1;
	private: System::Windows::Forms::DataGridViewTextBoxColumn*  Column1;



	private: System::ComponentModel::IContainer*  components;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>


		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			System::Windows::Forms::DataGridViewCellStyle*  dataGridViewCellStyle2 = (new System::Windows::Forms::DataGridViewCellStyle());
			this->panel1 = (new System::Windows::Forms::Panel());
			this->dataGridView1 = (new System::Windows::Forms::DataGridView());
			this->Column1 = (new System::Windows::Forms::DataGridViewTextBoxColumn());
			this->panel1->SuspendLayout();
			(__try_cast<System::ComponentModel::ISupportInitialize*  >(this->dataGridView1))->BeginInit();
			this->SuspendLayout();
			// 
			// panel1
			// 
			this->panel1->Controls->Add(this->dataGridView1);
			this->panel1->Dock = System::Windows::Forms::DockStyle::Fill;
			this->panel1->Location = System::Drawing::Point(0, 0);
			this->panel1->Name = S"panel1";
			this->panel1->Size = System::Drawing::Size(792, 782);
			this->panel1->TabIndex = 0;
			// 
			// dataGridView1
			// 
			this->dataGridView1->AllowUserToDeleteRows = false;
			this->dataGridView1->BackgroundColor = System::Drawing::SystemColors::Control;
			this->dataGridView1->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
			System::Windows::Forms::DataGridViewColumn* __mcTemp__1[] = new System::Windows::Forms::DataGridViewColumn*[1];
			__mcTemp__1[0] = this->Column1;
			this->dataGridView1->Columns->AddRange(__mcTemp__1);
			this->dataGridView1->Dock = System::Windows::Forms::DockStyle::Fill;
			this->dataGridView1->GridColor = System::Drawing::SystemColors::ControlDarkDark;
			this->dataGridView1->Location = System::Drawing::Point(0, 0);
			this->dataGridView1->Name = S"dataGridView1";
			this->dataGridView1->RowHeadersWidth = 16;
			this->dataGridView1->RowTemplate->Height = 24;
			this->dataGridView1->Size = System::Drawing::Size(792, 782);
			this->dataGridView1->TabIndex = 0;
			this->dataGridView1->CellValueChanged += new System::Windows::Forms::DataGridViewCellEventHandler(this, &CampForm::dataGridView1_CellValueChanged);
			this->dataGridView1->DataError += new System::Windows::Forms::DataGridViewDataErrorEventHandler(this, &CampForm::dataGridView1_DataError);
			// 
			// Column1
			// 
			dataGridViewCellStyle2->BackColor = System::Drawing::SystemColors::ControlDark;
			dataGridViewCellStyle2->ForeColor = System::Drawing::Color::Black;
			dataGridViewCellStyle2->SelectionBackColor = System::Drawing::SystemColors::Control;
			dataGridViewCellStyle2->SelectionForeColor = System::Drawing::Color::Black;
			this->Column1->DefaultCellStyle = dataGridViewCellStyle2;
			this->Column1->HeaderText = S"主 \\ 副";
			this->Column1->Name = S"Column1";
			this->Column1->Resizable = System::Windows::Forms::DataGridViewTriState::True;
			this->Column1->SortMode = System::Windows::Forms::DataGridViewColumnSortMode::NotSortable;
			this->Column1->Width = 60;
			// 
			// CampForm
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(5, 15);
			this->ClientSize = System::Drawing::Size(792, 782);
			this->Controls->Add(this->panel1);
			this->Name = S"CampForm";
			this->Text = S"CampForm";
			this->panel1->ResumeLayout(false);
			(__try_cast<System::ComponentModel::ISupportInitialize*  >(this->dataGridView1))->EndInit();
			this->ResumeLayout(false);

		}		


#ifndef _Just_Show_DotNet_Form_
    private:
        System::Void GetStr_TextChanged(System::Object *  sender, System::EventArgs *  e);
        System::Void GetValue_ValueChanged(System::Object *  sender, System::EventArgs *  e);
        System::Void ChangeFlag(System::Object *  sender, System::EventArgs *  e);
        System::Void GetIndex_SelectedIndexChanged(System::Object *  sender, System::EventArgs *  e);
        System::Void GetIntValue_TextChanged(System::Object *  sender, System::EventArgs *  e);
        System::Void BaseForm_Closing(System::Object *  sender, System::ComponentModel::CancelEventArgs *  e);
        System::Void SearchObj_DClick(System::Object *  sender, System::EventArgs *  e);

#endif
    protected:
        //######################################################################################################
        //主要需要繼承的涵式
        virtual ReaderClass< DB_GameObjDbStruct >* ObjReader( );        
        virtual void    OnActive();
        virtual void    OnSelectObj( bool LockOk );
        virtual void    OnOutputObjSetting( DB_GameObjDbStruct* TempObj );
        virtual void    OnTimeProc();
        virtual int     ObjSize();
        //######################################################################################################


	public:
		String*		_ComboBoxStr[];// = new System::Object*[3];
		//ArrayList*	_ColList;
		DataGridViewComboBoxColumn*	_ColList[];
		bool		_IsNeedUpdateCol;		//需要更新Title欄位
		bool		_IsNeedUpdateCell;		//需要更新所有欄位

		void	Initial( );
		void	Release( );


	private:
		System::Void dataGridView1_CellValueChanged(System::Object*  sender, System::Windows::Forms::DataGridViewCellEventArgs*  e);
		System::Void dataGridView1_DataError(System::Object*  sender, System::Windows::Forms::DataGridViewDataErrorEventArgs*  e){};
};
}