コード例 #1
0
        public void Load()
        {
            HeroesKV    = LoadValveKVFile(HEROES_FILE);
            UnitsKV     = LoadValveKVFile(UNITS_FILE);
            GameItemsKV = LoadValveKVFile(ITEMS_FILE);

            ActiveData = this;
        }
コード例 #2
0
        public void Load()
        {
            HeroesKV = LoadValveKVFile(HEROES_FILE);
            UnitsKV = LoadValveKVFile(UNITS_FILE);
            GameItemsKV = LoadValveKVFile(ITEMS_FILE);

            ActiveData = this;
        }
コード例 #3
0
        public Main()
        {
            InitializeComponent();
            Database = new LegionDatabase();
            Database = Database.Load() ?? Database;
            Database.Setup();

            DotaDatabase = new DotaData();
            DotaDatabase.Load();

            // Localization Tab
            LocalizationTab = new SpreadsheetDataDisplayTab<LocalizedLanguage, LocalizationDataTable>();
            LocalizationTab.DataTreeView = spreadsheetDisplayLocalization.treeData;
            LocalizationTab.SourcesTreeView = spreadsheetDisplayLocalization.treeDataSources;
            LocalizationTab.AddSourceButton = spreadsheetDisplayLocalization.buttonAddSpreadsheet;
            LocalizationTab.UpdateButton = spreadsheetDisplayLocalization.buttonUpdateSpreadsheets;
            LocalizationTab.RebuildButton = spreadsheetDisplayLocalization.buttonRebuildTrees;
            LocalizationTab.SpreadsheetIDTextBox = spreadsheetDisplayLocalization.textSpreadsheetId;
            LocalizationTab.TabIDTextBox = spreadsheetDisplayLocalization.textTabId;
            LocalizationTab.DataView = spreadsheetDisplayLocalization.dataGridInfo;
            LocalizationTab.AddSourceFunc = Database.AddNewLocalizationSheet;
            LocalizationTab.RemoveSourceFunc = Database.RemoveLocalizationSheet;
            LocalizationTab.GetDataFunc = Database.GetLocalizationLanguages;
            LocalizationTab.GetSourcesFunc = Database.GetLocalizationSheets;
            LocalizationTab.OnPreRebuildFunc = Database.RebuildLanguageCache;
            LocalizationTab.Setup(Database);
            LocalizationTab.Rebuild();

            // Units Tab
            UnitsTab = new SpreadsheetDataDisplayTab<LegionUnit, UnitDataTable>();
            UnitsTab.DataTreeView = spreadsheetDisplayUnits.treeData;
            UnitsTab.SourcesTreeView = spreadsheetDisplayUnits.treeDataSources;
            UnitsTab.AddSourceButton = spreadsheetDisplayUnits.buttonAddSpreadsheet;
            UnitsTab.UpdateButton = spreadsheetDisplayUnits.buttonUpdateSpreadsheets;
            UnitsTab.RebuildButton = spreadsheetDisplayUnits.buttonRebuildTrees;
            UnitsTab.SpreadsheetIDTextBox = spreadsheetDisplayUnits.textSpreadsheetId;
            UnitsTab.TabIDTextBox = spreadsheetDisplayUnits.textTabId;
            UnitsTab.DataView = spreadsheetDisplayUnits.dataGridInfo;
            UnitsTab.AddSourceFunc = Database.AddNewUnitSheet;
            UnitsTab.RemoveSourceFunc = Database.RemoveUnitSheet;
            UnitsTab.GetDataFunc = Database.GetUnits;
            UnitsTab.GetSourcesFunc = Database.GetUnitSheets;
            UnitsTab.OnPreRebuildFunc = Database.RebuildUnitCache;
            UnitsTab.Setup(Database);
            UnitsTab.Rebuild();

            // Heroes Tab
            HeroesTab = new SpreadsheetDataDisplayTab<LegionHero, HeroDataTable>();
            HeroesTab.DataTreeView = spreadsheetDisplayHeroes.treeData;
            HeroesTab.SourcesTreeView = spreadsheetDisplayHeroes.treeDataSources;
            HeroesTab.AddSourceButton = spreadsheetDisplayHeroes.buttonAddSpreadsheet;
            HeroesTab.UpdateButton = spreadsheetDisplayHeroes.buttonUpdateSpreadsheets;
            HeroesTab.RebuildButton = spreadsheetDisplayHeroes.buttonRebuildTrees;
            HeroesTab.SpreadsheetIDTextBox = spreadsheetDisplayHeroes.textSpreadsheetId;
            HeroesTab.TabIDTextBox = spreadsheetDisplayHeroes.textTabId;
            HeroesTab.DataView = spreadsheetDisplayHeroes.dataGridInfo;
            HeroesTab.AddSourceFunc = Database.AddNewHeroSheet;
            HeroesTab.RemoveSourceFunc = Database.RemoveHeroSheet;
            HeroesTab.GetDataFunc = Database.GetHeroes;
            HeroesTab.GetSourcesFunc = Database.GetHeroSheets;
            HeroesTab.OnPreRebuildFunc = Database.RebuildHeroCache;
            HeroesTab.Setup(Database);
            HeroesTab.Rebuild();

            // Abilities Tab
            AbilitiesTab = new SpreadsheetDataDisplayTab<LegionAbility, AbilityDataTable>();
            AbilitiesTab.DataTreeView = spreadsheetDisplayAbilities.treeData;
            AbilitiesTab.SourcesTreeView = spreadsheetDisplayAbilities.treeDataSources;
            AbilitiesTab.AddSourceButton = spreadsheetDisplayAbilities.buttonAddSpreadsheet;
            AbilitiesTab.UpdateButton = spreadsheetDisplayAbilities.buttonUpdateSpreadsheets;
            AbilitiesTab.RebuildButton = spreadsheetDisplayAbilities.buttonRebuildTrees;
            AbilitiesTab.SpreadsheetIDTextBox = spreadsheetDisplayAbilities.textSpreadsheetId;
            AbilitiesTab.TabIDTextBox = spreadsheetDisplayAbilities.textTabId;
            AbilitiesTab.DataView = spreadsheetDisplayAbilities.dataGridInfo;
            AbilitiesTab.AddSourceFunc = Database.AddNewAbilitySheet;
            AbilitiesTab.RemoveSourceFunc = Database.RemoveAbilitySheet;
            AbilitiesTab.GetDataFunc = Database.GetAbilities;
            AbilitiesTab.GetSourcesFunc = Database.GetAbilitySheets;
            AbilitiesTab.OnPreRebuildFunc = Database.RebuildAbilityCache;
            AbilitiesTab.Setup(Database);
            AbilitiesTab.Rebuild();
        }