private void LoadLevel(Level level) { this.currentLevel = level; // Enable controls this.toolstripmenuRender.Enabled = true; this.toolstripmenuLevelProperties.Enabled = true; this.toolstripbuttonProperties.Enabled = true; this.toolstripbuttonRender.Enabled = true; this.splitcontainerMain.Panel1.Enabled = true; // Reset values this.argumentOneZone = new ZoneArgument(); this.argumentTwoZone = new LevelArgument(); this.comboboxAreas.SelectedIndex = Properties.Settings.Default.DefaultSelection; // Has warnings? if (level.Warnings.Length > 0) { this.toolstripmenuErrors.Enabled = true; this.toolstripbuttonErrors.Enabled = true; this.toolstripbuttonErrors.Text = this.toolstripbuttonErrors.Text = string.Format("&Error List ({0:N})", level.Warnings.Length); this.labelStatus.Text = string.Format("Loaded \"{0}\" sucessfully with {1:N} warnings", level.Name.Replace(Environment.NewLine, string.Empty), level.Warnings.Length); } else { this.toolstripmenuErrors.Enabled = false; this.toolstripbuttonErrors.Enabled = false; this.toolstripbuttonErrors.Text = "&Error List (0)"; this.labelStatus.Text = string.Format("Loaded \"{0}\" sucessfully", level.Name.Replace(Environment.NewLine, string.Empty)); } this.Text = string.Format("{0} - Level2Pic v{1}", this.currentLevel.Name, new Version(Application.ProductVersion).ToString(2)); }
public Options() { InitializeComponent(); this.levelArguments = new LevelArgument(); this.zoneArguments = new ZoneArgument(); this.GetSettings(); this.comboboxDefaultSelection.SelectedIndex = Properties.Settings.Default.DefaultSelection; this.comboboxZone.SelectedIndex = 0; this.propertygridArguments.SelectedObject = this.levelArguments; }