public override bool Action(string action) { bool result = base.Action(action); if (result) { try { //get from goundspeak if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, false)) { #if DEBUG //using (var client = new Utils.API.GeocachingLiveV6(Core, true)) using (var client = new Utils.API.GeocachingLiveV6(Core)) #else using (var client = new Utils.API.GeocachingLiveV6(Core)) #endif { if (action == ACTION_SINGLE) { using (GeocacheLogForm dlg = new GeocacheLogForm(Core, client, Core.ActiveGeocache)) { dlg.ShowDialog(); } } else if (action == ACTION_BATCH) { using (GeocacheBatchLogForm dlg = new GeocacheBatchLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_GARMINVISIT) { using (GarminGeocacheVisitsLogForm dlg = new GarminGeocacheVisitsLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_CGEOVISIT) { using (CGeoGeocacheVisitsLogForm dlg = new CGeoGeocacheVisitsLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_OFFLINE) { using (OfflineLogForm dlg = new OfflineLogForm(this, Core, client)) { dlg.ShowDialog(); } } } } } catch { System.Windows.Forms.MessageBox.Show(Utils.LanguageSupport.Instance.GetTranslation(STR_UNABLEACCESSAPI), Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } return result; }
public override bool Action(string action) { bool result = base.Action(action); if (result) { try { //get from goundspeak if (Utils.API.GeocachingLiveV6.CheckAPIAccessAvailable(Core, false)) { #if DEBUG //using (var client = new Utils.API.GeocachingLiveV6(Core, true)) using (var client = new Utils.API.GeocachingLiveV6(Core)) #else using (var client = new Utils.API.GeocachingLiveV6(Core)) #endif { if (action == ACTION_SINGLE) { using (GeocacheLogForm dlg = new GeocacheLogForm(Core, client, Core.ActiveGeocache)) { dlg.ShowDialog(); } } else if (action == ACTION_BATCH) { using (GeocacheBatchLogForm dlg = new GeocacheBatchLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_GARMINVISIT) { using (GarminGeocacheVisitsLogForm dlg = new GarminGeocacheVisitsLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_CGEOVISIT) { using (CGeoGeocacheVisitsLogForm dlg = new CGeoGeocacheVisitsLogForm(this, Core, client)) { dlg.ShowDialog(); } } else if (action == ACTION_OFFLINE) { using (OfflineLogForm dlg = new OfflineLogForm(this, Core, client)) { dlg.ShowDialog(); } } } } } catch { System.Windows.Forms.MessageBox.Show(Utils.LanguageSupport.Instance.GetTranslation(STR_UNABLEACCESSAPI), Utils.LanguageSupport.Instance.GetTranslation(STR_ERROR), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } } return(result); }
public GeocacheLogForm(Framework.Interfaces.ICore core, Utils.API.GeocachingLiveV6 client, Framework.Data.Geocache gc, GarminGeocacheVisitsLogForm.GeocacheVisitsItem data) : this(core, client, gc) { if (data.LogType.ID > 0) { comboBoxLogType1.SelectedItem = data.LogType; dateTimePicker1.Value = data.LogDate; textBox1.Text = data.Comment; } }