public Form1() { Form = this; compiler = new GalaxyCompiler(this); compiler.LoadLibraries(/*new List<DirectoryInfo>(new []{new DirectoryInfo("Standard libraries\\Standard")})*/); compiler.CompilationSuccessfull += compiler_CompilationSuccessfull; compiler.CompilationFailed += compiler_CompilationFailed; Application.AddMessageFilter(this); suggestionBox = new SuggestionBoxForm(compiler, this); //Create directories if missing); if (!projectDir.Exists) projectDir.Create(); InitializeComponent(); Language = Options.Editor.LanguageSet; Thread.CurrentThread.CurrentUICulture = new CultureInfo(Language); Thread.CurrentThread.CurrentCulture = new CultureInfo(Language); ApplyResource(); ObjectBrowserCatagory.Items.AddRange(Enum.GetNames(typeof(MapObjectsManager.ObjectType))); ObjectBrowserCatagory.SelectedIndex = 0; ObjectBrowserTooltip.SetToolTip(ObjectBrowserList, LocRM.GetString("Text2.Text")); SetObjectBrowserVisible(Options.General.ViewObjectBrowser); foreach (ToolStripMenuItem subItem in this.LanguageToolStripMenuItem.DropDownItems) { subItem.Checked = false; } if (Language == "en") { this.englishToolStripMenuItem.Checked = true; } if (Language == "zh-Hans") { this.chineseSimpleToolStripMenuItem.Checked = true; } //BTNShowErrors.BackColor = Options.General.ShowErrors ? Color.FromArgb(255, 239, 187) : panel1.BackColor; //BTNShowWarnings.BackColor = Options.General.ShowWarnings ? Color.FromArgb(255, 239, 187) : panel1.BackColor; CBShowErrors.Checked = Options.General.ShowErrors; CBShowWarnings.Checked = Options.General.ShowWarnings; if (Options.Editor.OpenInLastProject || Options.OverrideLoad != null) { string lastProject = Options.OverrideLoad ?? Options.Editor.LastProject; foreach (DirectoryInfo directory in projectDir.GetDirectories(lastProject)) { openProjectDir = directory; compiler.AddSourceFiles(GetSourceFiles(openProjectSrcDir)); compiler.AddDialogItems(GetDialogsFiles(openProjectSrcDir)); foreach (Library library in ProjectProperties.CurrentProjectPropperties.Libraries) { compiler.AddLibrary(library); } break; } } RebuildProjectView(); RebuildJumpList(); UnitFilterGrid.SelectedObject = UnitFilter.Instance; }
public Form1() { Form = this; compiler = new GalaxyCompiler(this); compiler.LoadLibraries(/*new List<DirectoryInfo>(new []{new DirectoryInfo("Standard libraries\\Standard")})*/); compiler.CompilationSuccessfull += compiler_CompilationSuccessfull; compiler.CompilationFailed += compiler_CompilationFailed; Application.AddMessageFilter(this); suggestionBox = new SuggestionBoxForm(compiler, this); //Create directories if missing); if (!projectDir.Exists) projectDir.Create(); InitializeComponent(); ObjectBrowserCatagory.Items.AddRange(Enum.GetNames(typeof(MapObjectsManager.ObjectType))); ObjectBrowserCatagory.SelectedIndex = 0; ObjectBrowserTooltip.SetToolTip(ObjectBrowserList, "Double click on an item to insert it in the code."); SetObjectBrowserVisible(Options.General.ViewObjectBrowser); //BTNShowErrors.BackColor = Options.General.ShowErrors ? Color.FromArgb(255, 239, 187) : panel1.BackColor; //BTNShowWarnings.BackColor = Options.General.ShowWarnings ? Color.FromArgb(255, 239, 187) : panel1.BackColor; CBShowErrors.Checked = Options.General.ShowErrors; CBShowWarnings.Checked = Options.General.ShowWarnings; if (Options.Editor.OpenInLastProject) { string lastProject = Options.Editor.LastProject; foreach (DirectoryInfo directory in projectDir.GetDirectories(lastProject)) { openProjectDir = directory; compiler.AddSourceFiles(GetSourceFiles(openProjectSrcDir)); compiler.AddDialogItems(GetDialogsFiles(openProjectSrcDir)); foreach (Library library in ProjectProperties.CurrentProjectPropperties.Libraries) { compiler.AddLibrary(library); } break; } } RebuildProjectView(); }