コード例 #1
0
ファイル: PluginSettings.cs プロジェクト: pheijmans-zz/GAPP
 public PluginSettings(ICore core)
 {
     _uniqueInstance = this;
     _core           = core;
 }
コード例 #2
0
ファイル: InternalStorage.cs プロジェクト: gahadzikwa/GAPP
        public async override Task<bool> InitializeAsync(Framework.Interfaces.ICore core)
        {
            var p = new PluginSettings(core);

            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADING));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGDATA));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGGEOCACHES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGLOGS));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGLOGIMAGES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGGEOCACHEIMAGES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_LOADINGWAYPOINTS));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVING));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGDATA));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGGEOCACHES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGLOGS));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGLOGIMAGES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGGEOCACHEIMAGES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGLOGIMAGES));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_SAVINGWAYPOINTS));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_BACKINGUPDATA));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(STR_RESTORINGDATA));

            core.LanguageItems.Add(new Framework.Data.LanguageItem(SettingsPanel.STR_BACKUPFOLDER));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(SettingsPanel.STR_MAXCOUNT));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(SettingsPanel.STR_MAXDAYS));

            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_TITLE));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_BACKUPFOLDER));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_BACKUPS));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_DATE));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_FILE));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_OK));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_PATH));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_RESTOREFOLDER));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_WARNING));
            core.LanguageItems.Add(new Framework.Data.LanguageItem(RestoreForm.STR_OVERWRITE));

            if (string.IsNullOrEmpty(PluginSettings.Instance.ActiveDataFile))
            {
                PluginSettings.Instance.ActiveDataFile = System.IO.Path.Combine(core.PluginDataPath, "GAPPDataStorage.gpp" );
            }

            try
            {
                _fileCollection = new FileCollection(PluginSettings.Instance.ActiveDataFile);
            }
            catch
            {
            }

            SetDataSourceName(PluginSettings.Instance.ActiveDataFile);
            core.Logs.LoadFullData += new Framework.EventArguments.LoadFullLogEventHandler(Logs_LoadFullData);
            core.Geocaches.LoadFullData += new Framework.EventArguments.LoadFullGeocacheEventHandler(Geocaches_LoadFullData);

            return await base.InitializeAsync(core);
        }
コード例 #3
0
ファイル: PluginSettings.cs プロジェクト: gahadzikwa/GAPP
 public PluginSettings(ICore core)
 {
     _uniqueInstance = this;
     _core = core;
 }