Example #1
0
        public MainForm()
        {
            InitializeComponent();

            LogView.ListView  = this.LogListView;
            Connect.RenderBox = this.RenderBox;

            this.Load        += Connect.Create;
            this.FormClosed  += Connect.Destory;
            Application.Idle += Connect.Idle;

            _models = new Models(MaterialTable, SkeletonTreeView, SkeletonPanel, AnimationTrackBar, AnimationBarPanel, ModelLayoutPanel, ModelAdderPathBox, ModelAdderSkeletonBox);
            FileFbxConvertMenu.Click += _models.FileFbxConvertMenu_Click;
            FileOpenMenu.Click       += _models.FileOpenMenu_Click;
            FileSaveMenu.Click       += _models.FileSaveMenu_Click;

            _shaders = new Shaders(ShaderFileList, PartsListBox, ModelAdderPathBox);
            RefreshShaderFileList.Click += _shaders.Refresh;
            ShaderFileList.MouseDown    += ShaderFileLlist_MouseDown;

            _textures = new Textures(TextureFileList);
            TextureFileList.MouseDown    += TextureFileList_MouseDown;
            RefreshTextureFileList.Click += _textures.Refresh;

            _animations = new Animation(AnimationFileList, AnimationFilePathTextBox, AnimationNameTextBox, AnimationAdderButton, AnimationLayoutPanel, AnimationTrackBar, AnimationBarPanel);
            RefreshAnimationFileList.Click += _animations.Refresh;

            FrameTimer.Tick += FrameTimer_Tick;

            LogListView.Focus();
        }
Example #2
0
        public MainForm()
        {
            InitializeComponent();

            LogView.ListView  = this.LogListView;
            Connect.RenderBox = this.RenderBox;
            this.Load        += Connect.Create;
            this.Load        += DataLoad;

            this.FormClosed += Connect.Destroy;

            Application.Idle += Connect.Idle;

            this.RenderBox.MouseEnter += Connect.MouseEnter;
            this.RenderBox.MouseLeave += Connect.MouseLeave;
            this.RenderBox.AllowDrop   = true;



            /////////////////// Shaders /////////////////////
            _shaders = new Shaders(ShaderFileList, SkyShaderFilePathText, TerrainShaderFilePathText);
            RefreshShaderFileList.Click += _shaders.Refresh;

            ShaderFileList.MouseDown += ShaderFileList_MouseDown;

            SkyShaderFilePathText.DragEnter += _shaders.DragEnterInSky;
            SkyShaderFilePathText.DragDrop  += _shaders.DragDropInSky;

            TerrainShaderFilePathText.DragEnter += _shaders.DragDropInTerrain;
            TerrainShaderFilePathText.DragDrop  += _shaders.DragDropInTerrain;
            /////////////////// Shaders End /////////////////////

            /////////////////// Textures /////////////////////
            _textures = new Textures(TextureFileList, TerrainDiffuseFileText, TerrainStage1FileText, TerrainStage2FileText, TerrainStage3FileText, TerrainStage4FileText);
            RefreshTextureFileList.Click += _textures.Refresh;

            TextureFileList.MouseDown += TextureFileList_MouseDown;

            TerrainDiffuseFileText.DragEnter += _textures.DragEnter;
            TerrainStage1FileText.DragEnter  += _textures.DragEnter;
            TerrainStage2FileText.DragEnter  += _textures.DragEnter;
            TerrainStage3FileText.DragEnter  += _textures.DragEnter;
            TerrainStage4FileText.DragEnter  += _textures.DragEnter;

            TerrainDiffuseFileText.DragDrop += _textures.DragDropInTerrainDiffuseFileText;
            TerrainStage1FileText.DragDrop  += _textures.DragDropInTerrainStage1FileText;
            TerrainStage2FileText.DragDrop  += _textures.DragDropInTerrainStage2FileText;
            TerrainStage3FileText.DragDrop  += _textures.DragDropInTerrainStage3FileText;
            TerrainStage4FileText.DragDrop  += _textures.DragDropInTerrainStage4FileText;

            /////////////////// Textures End /////////////////////

            /////////////////// Models  /////////////////////
            _models = new Models(ModelFileList, ModelTXText, ModelTYText, ModelTZText, ModelRXText, ModelRYText, ModelRZText, ModelSXText, ModelSYText, ModelSZText);
            ModelFileList.MouseDown += ModelFileList_MouseDown;

            RenderBox.DragEnter += _models.DragEnter;
            RenderBox.DragDrop  += _models.DragDrop_InRenderBox;

            RefreshModelFileList.Click += _models.Refresh;

            /////////////////// Models End /////////////////////

            FileOpenMenu.Click += FileOpenMenu_Click;

            TerrainWidthText.KeyPress             += textBox_KeyPress;
            TerrainHeightText.KeyPress            += textBox_KeyPress;
            TerrainBrushSizeText.KeyPress         += textBox_KeyPress;
            TerrainHeightOptionValueText.KeyPress += textBox_KeyPress;

            TerrainSizeChangeButton.Click += TerrainSizeChangeButton_Clicked;

            TerrainDiffuseColorChangeButton.Click += TerrainDiffuseColorChangeButton_Click;
            TerrainAmbientColorChangeButton.Click += TerrainAmbientColorChangeButton_Click;

            TerrainHeightRadioButton.CheckedChanged    += TerrainHeightRadioButton_CkeckedChanged;
            TerrainSplattingRadioButton.CheckedChanged += TerrainSplattingRadioButton_CkeckedChanged;

            TerrainHeightRadioButton.CheckedChanged    += TerrainHeightRadioButton_CheckedChanged;
            TerrainSplattingRadioButton.CheckedChanged += TerrainSplattingRadioButton_CheckedChanged;

            TerrainSplattingStage1RadioButton.CheckedChanged += TerrainSplattingStage1RadioButton_CheckChanged;
            TerrainSplattingStage2RadioButton.CheckedChanged += TerrainSplattingStage2RadioButton_CheckChanged;
            TerrainSplattingStage3RadioButton.CheckedChanged += TerrainSplattingStage3RadioButton_CheckChanged;
            TerrainSplattingStage4RadioButton.CheckedChanged += TerrainSplattingStage4RadioButton_CheckChanged;

            TerrainHeightOptionNoneRadioButton.CheckedChanged       += TerrainHeightOptionNoneRadioButton_CheckChanged;
            TerrainHeightOptionHeightLockRadioButton.CheckedChanged += TerrainHeightOptionHeightLockRadioButton_CheckChanged;
            TerrainHeightOptionValueText.TextChanged += TerrainHeightOptionValueText_TextChanged;

            TerrainBrushSizeText.TextChanged += TerrainBrushSizeText_TextChanged;
            TerrainBushTypeRectRadioButton.CheckedChanged   += TerrainBushTypeRectRadioButton_CheckedChanged;
            TerrainBushTypeCircleRadioButton.CheckedChanged += TerrainBushTypeCircleRadioButton_CheckChanged;

            SkyApexColorButton.Click   += SkyApexColorButton_Click;
            SkyCenterColorButton.Click += SkyCenterColorButton_Click;

            ConvertFbxFile.Click += ConvertFbxFile_Click;

            FileSaveMenu.Click += Save_Click;
        }