public MainForm() { InitializeComponent(); Text = Program.AssemblyTitle; _displayPropertyDescription = BrawlBox.Properties.Settings.Default.DisplayPropertyDescriptionWhenAvailable; _updatesOnStartup = BrawlBox.Properties.Settings.Default.CheckUpdatesAtStartup; _showHex = BrawlBox.Properties.Settings.Default.ShowHex; _compatibilityMode = BrawlLib.Properties.Settings.Default.CompatibilityMode; #if !DEBUG //Don't need to see this every time a debug build is compiled if (CheckUpdatesOnStartup) { CheckUpdates(false); } #else Text += " DEBUG"; #endif soundPackControl1._grid = propertyGrid1; soundPackControl1.lstSets.SmallImageList = ResourceTree.Images; foreach (Control c in splitContainer2.Panel2.Controls) { c.Visible = false; c.Dock = DockStyle.Fill; } m_DelegateOpenFile = new DelegateOpenFile(Program.Open); _instance = this; _currentControl = modelPanel1; modelPanel1.CurrentViewport._allowSelection = false; RecentFileHandler = new RecentFileHandler(this.components); RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem; }
public MainForm() { InitializeComponent(); Text = Program.AssemblyTitle; //#if _DEBUG // Text += " - DEBUG"; //#endif soundPackControl1._grid = propertyGrid1; soundPackControl1.lstSets.SmallImageList = ResourceTree.Images; msBinEditor1.Dock = animEditControl.Dock = texAnimEditControl.Dock = shpAnimEditControl.Dock = soundPackControl1.Dock = audioPlaybackPanel1.Dock = clrControl.Dock = visEditor.Dock = scN0CameraEditControl1.Dock = scN0LightEditControl1.Dock = scN0FogEditControl1.Dock = modelPanel1.Dock = previewPanel2.Dock = videoPlaybackPanel1.Dock = DockStyle.Fill; m_DelegateOpenFile = new DelegateOpenFile(Program.Open); _instance = this; modelPanel1._forceNoSelection = true; _currentControl = modelPanel1; RecentFileHandler = new RecentFileHandler(this.components); RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem; }
public MainForm() { InitializeComponent(); Text = Program.AssemblyTitle; _displayPropertyDescription = BrawlBox.Properties.Settings.Default.DisplayPropertyDescriptionWhenAvailable; _updatesOnStartup = BrawlBox.Properties.Settings.Default.CheckUpdatesAtStartup; #if !DEBUG //Don't need to see this every time a debug build is compiled if (CheckUpdatesOnStartup) { CheckUpdates(false); } #else Text += " DEBUG"; #endif foreach (string filename in new string[] { "BrawlLib.dll", "OpenTK.dll", "Octokit.dll", "Updater.exe" }) { string directory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); if (File.Exists(Path.Combine(directory, filename))) { if (File.Exists(Path.Combine(directory, "lib", filename))) { MessageBox.Show(@"The directory structure of BrawlBox has changed. Please delete the files BrawlLib.dll, OpenTK.dll, Octokit.dll, and Updater.exe; newer versions of these files should be located in the Lib directory."); Enabled = false; break; } } } soundPackControl1._grid = propertyGrid1; soundPackControl1.lstSets.SmallImageList = ResourceTree.Images; foreach (Control c in splitContainer2.Panel2.Controls) { c.Visible = false; c.Dock = DockStyle.Fill; } m_DelegateOpenFile = new DelegateOpenFile(Program.Open); _instance = this; _currentControl = modelPanel1; modelPanel1.CurrentViewport._allowSelection = false; RecentFileHandler = new RecentFileHandler(this.components); RecentFileHandler.RecentFileToolStripItem = this.recentFilesToolStripMenuItem; var plugins = $"{Application.StartupPath}/Plugins"; var loaders = $"{Application.StartupPath}/Loaders"; API.bboxapi.Plugins.Clear(); API.bboxapi.Loaders.Clear(); pluginToolStripMenuItem.DropDown.Items.Clear(); if (Directory.Exists(plugins)) { foreach (var str in Directory.EnumerateFiles(plugins, "*.py")) { API.bboxapi.CreatePlugin(str, false); pluginToolStripMenuItem.DropDownItems.Add(Path.GetFileNameWithoutExtension(str), null, onPluginClicked); } } if (Directory.Exists(loaders)) { foreach (var str in Directory.EnumerateFiles(loaders, "*.py")) { API.bboxapi.CreatePlugin(str, true); } } }