コード例 #1
0
        public NewLevelWindow( )
        {
            InitializeComponent( );
            levelNameText.GotFocus += new EventHandler( levelNameText_GotFocus );
            levelNameText.LostFocus += new EventHandler( levelNameText_LostFocus );

            _level = new LevelEd( );
        }
コード例 #2
0
        public LevelTabPage( LevelEd level )
        {
            viewport = new ViewportControl( );

            this.BorderStyle = BorderStyle.FixedSingle;

            this.Controls.Add( viewport );
            viewport.Dock = DockStyle.Fill;

            this.Text = level.Name;
            this._level = level;
        }
コード例 #3
0
        private void createButton_Click( object sender, EventArgs e )
        {
            levelNameText.Text = Helper.CheckLetterDigitInput( levelNameText.Text );
            if( Global.World.LevelExists( levelNameText.Text ) )
            {
                MessageBox.Show( Global.EditorTxt.LevelWithSameNameExists, "", MessageBoxButtons.OK, MessageBoxIcon.Information );
                levelNameText.Focus( );
                levelNameText.SelectAll( );
                return;
            }

            string fullPath = Path.Combine( Global.World.LevelsFolderPath, levelNameText.Text + Consts.Files.LEVEL_EXTENSION );
            _level = new LevelEd( );
            _level.FilePath = fullPath;
            _level.Name = levelNameText.Text;
            _level.NewLayer( );

            this.Close( );
        }
コード例 #4
0
        private void cancelButton_Click( object sender, EventArgs e )
        {
            _level = null;

            this.Close( );
        }