public void AutoTuneLoading() { if (GenGlobal.GetSetting(GenGlobal.AutoTuneSettings.OLD_GEN_CONFIG)) { GenConfigBindingSource.DataSource = GenGlobal.AppConfig; } else { GenGlobal.AppConfig = new AppConfig(); GenConfigBindingSource.DataSource = GenGlobal.AppConfig; } rdbMultiline.Checked = GenGlobal.AppConfig.Multiline; rdbSignleline.Checked = GenGlobal.AppConfig.SingleLine; GenGlobal.ProjectManager = new ProjectManager(); OpenProjects = new List <Project>(); GenGlobal.ProjectManager.LockProjectByDefault = false; OpenProjects = new List <Project>(GenGlobal.ProjectManager.OpenProjects); if (OpenProjects != null) { cbbDesProject.Items.Clear(); cbbDesProject.Items.AddRange(OpenProjects.Select(i => i.ProjectName).ToArray()); GenGlobal.CurrentProject = GenGlobal.ProjectManager.GetCurrentProjectWithDialog(); cbbDesProject.Text = GenGlobal.CurrentProject.ProjectName; btnGenerate.Enabled = true; } else { btnGenerate.Enabled = false; WriteLine("Can not find any opned project in your workspace."); } }
public GenRulesForm() { InitializeComponent(); if (!GenGlobal.GetSetting(GenGlobal.AutoTuneSettings.GEN_RULES)) { GenGlobal.GenerationRules = new GenerationRules(); GenGlobal.SaveSetting(GenGlobal.AutoTuneSettings.GEN_RULES); } GenerationRules = GenGlobal.GenerationRules; GenRulesProp.SelectedObject = GenerationRules; }