#pragma once

#include "Mix/Tool/CLR/Core/Utility/BindingItem.h"

namespace Mix{ namespace Tool{ namespace Dynamics{

	public ref class IdentifierGenerator
	{
	private:
		Mix::Tool::Utility::BindingItemCollection<int>^ m_Owner;
		System::String^ m_Name;
		int m_RealValue;
		bool m_Err;

	internal:
		IdentifierGenerator( Mix::Tool::Utility::BindingItemCollection<int>^ owner );
		~IdentifierGenerator( void );

	public:
		System::EventHandler^ ValueChanged;

		property System::String^ Name
		{
			System::String^ get( void );
			void set( System::String^ value );
		}

		property int Value
		{
			int get( void );
		}

		property bool Error
		{
			bool get( void );
		}

	private:
		void Update( void );
		void ListChanged( System::Object^ sender, System::ComponentModel::ListChangedEventArgs^ e );
	};

}}}
