示例#1
0
        private void editLevelButton_Click(object sender, EventArgs e)
        {
            // Make a caption
            string EditorCaption = "";

            if (levelTreeView.SelectedNode.Parent.Parent == null)
            {
                EditorCaption += levelTreeView.SelectedNode.Text;
            }
            else
            {
                EditorCaption += levelTreeView.SelectedNode.Parent.Text + ", " + levelTreeView.SelectedNode.Text;
            }

            // Open it
            try
            {
                LevelEditor NewEditor = new LevelEditor(new NSMBLevel(new InternalLevelSource((string)levelTreeView.SelectedNode.Tag, EditorCaption)));
                NewEditor.Show();
            }
            catch (AlreadyEditingException)
            {
                MessageBox.Show(LanguageManager.Get("Errors", "Level"));
            }
        }
示例#2
0
 public void Initialise(NSMBGraphics GFX, NSMBLevel Level, LevelEditor editor)
 {
     this.GFX           = GFX;
     this.Level         = Level;
     this.editor        = editor;
     Ready              = true;
     hScrollBar.Visible = true;
     vScrollBar.Visible = true;
     ViewablePixels     = new Rectangle();
     ViewableBlocks     = new Rectangle();
     UpdateScrollbars();
     remakeTileCache();
     DrawingArea.Invalidate();
 }