public frmMain()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            //Create open file dialog
            mOpenFileDialog = new OpenFileDialog();
            mOpenFileDialog.InitialDirectory = (string)Directory.GetCurrentDirectory().Clone();
            mOpenFileDialog.RestoreDirectory = true;

            mSaveFileDialog = new SaveFileDialog();
            mSaveFileDialog.InitialDirectory = (string)Directory.GetCurrentDirectory().Clone();
            mSaveFileDialog.RestoreDirectory = true;

            //Create select directory dialog
            mSelectDirDialog              = new FolderBrowserDialog();
            mSelectDirDialog.Description  = "Select the resource directory to add. The directory MUST be a subdirectory in redist folder!";
            mSelectDirDialog.RootFolder   = Environment.SpecialFolder.MyComputer;
            mSelectDirDialog.SelectedPath = Directory.GetCurrentDirectory();

            mpTransBaseData = new HplTrans(this);
            mpTransDestData = new HplTrans(this);

            mpEnterNameForm = new frmEnterName();
        }
예제 #2
0
		public frmMain()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			
			//Create open file dialog
			mOpenFileDialog = new OpenFileDialog();
			mOpenFileDialog.InitialDirectory = (string)Directory.GetCurrentDirectory().Clone();
			mOpenFileDialog.RestoreDirectory = true;

			mSaveFileDialog = new SaveFileDialog();
			mSaveFileDialog.InitialDirectory = (string)Directory.GetCurrentDirectory().Clone();
			mSaveFileDialog.RestoreDirectory = true;

			//Create select directory dialog
			mSelectDirDialog = new FolderBrowserDialog();
			mSelectDirDialog.Description = "Select the resource directory to add. The directory MUST be a subdirectory in redist folder!";
			mSelectDirDialog.RootFolder=  Environment.SpecialFolder.MyComputer;
			mSelectDirDialog.SelectedPath = Directory.GetCurrentDirectory();
			
			mpMaterial = new HplMaterial();
			
			//init sound data
			mpSoundData = new HplSound();
			mpSoundData.ClearData(this);

			mpTransData = new HplTrans(this);

			mpEnterNameForm = new frmEnterName();
			
			//Load resource directories
			LoadResourceDirs(msResourceDirFile);

			//Load physics material name
			LoadPhysicsMaterialNames(msPhysicsMaterialsFile);
			
			//Add the types of materials available
			AddMaterialTypes();
		}