private void Init_EveCentralCom_CmbSolar() { List <TextItemWithUInt32> items = new List <TextItemWithUInt32>(); items.Add(new TextItemWithUInt32("[All solar systems]", 0)); UInt32 regionID = TextItemWithUInt32.GetData(Cmb_EveCentralCom_Region.SelectedItem); foreach (EveSolarSystem currSystem in m_EveDatabase.GetSolarSystems(regionID)) { items.Add(new TextItemWithUInt32(currSystem.Name, currSystem.ID)); } PopulateCombo(Cmb_EveCentralCom_Solar, items, m_Settings.EveCentralCom.SolarID); }
private void EveMarketdataCom_Init_CmbStation() { List <TextItemWithUInt32> items = new List <TextItemWithUInt32>(); items.Add(new TextItemWithUInt32("[All stations]", 0)); if (null == Cmb_EveMarketdataCom_Solar.SelectedItem) { return; // Workaround for premature call from PopulateCombo() } UInt32 solarID = TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_Solar.SelectedItem); foreach (EveStation currStation in m_EveDatabase.GetStations(solarID)) { items.Add(new TextItemWithUInt32(currStation.Name, currStation.ID)); } PopulateCombo(Cmb_EveMarketdataCom_Station, items, m_Settings.EveMarketdataCom.StationID); }
private void EveMarketdataCom_Init_CmbSolar() { List <TextItemWithUInt32> items = new List <TextItemWithUInt32>(); items.Add(new TextItemWithUInt32("[All solar systems]", 0)); if (null == Cmb_EveMarketdataCom_Region.SelectedItem) { return; // Workaround for premature call from PopulateCombo() } UInt32 regionID = TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_Region.SelectedItem); foreach (EveSolarSystem currSystem in m_EveDatabase.GetSolarSystems(regionID)) { items.Add(new TextItemWithUInt32(currSystem.Name, currSystem.ID)); } PopulateCombo(Cmb_EveMarketdataCom_Solar, items, m_Settings.EveMarketdataCom.SolarID); }
private void BtnOk_Click(object sender, EventArgs e) { switch (TabProviders.SelectedIndex) { case 0: m_Settings.Provider = PriceProviders.EveCentral; break; case 1: m_Settings.Provider = PriceProviders.FuzzworkCoUk; break; case 2: m_Settings.Provider = PriceProviders.EveMarketdataCom; break; default: Debug.Assert(false, "Wrong tab page selected"); break; } m_Settings.EveCentralCom.RegionID = TextItemWithUInt32.GetData(Cmb_EveCentralCom_Region.SelectedItem); m_Settings.EveCentralCom.SolarID = TextItemWithUInt32.GetData(Cmb_EveCentralCom_Solar.SelectedItem); m_Settings.EveCentralCom.PriceType = (PriceTypes)TextItemWithUInt32.GetData(Cmb_EveCentralCom_PriceType.SelectedItem); m_Settings.EveCentralCom.HistoryDays = (UInt32)Txt_EveCentralCom_PriceHistory.Value; m_Settings.FuzzworkCoUk.IsRegion = Rad_FuzzworkCoUk_Region.Checked; m_Settings.FuzzworkCoUk.RegionID = TextItemWithUInt32.GetData(Cmb_FuzzworkCoUk_Region.SelectedItem); m_Settings.FuzzworkCoUk.StationID = TextItemWithUInt32.GetData(Cmb_FuzzworkCoUk_Station.SelectedItem); m_Settings.FuzzworkCoUk.PriceType = (PriceTypes)TextItemWithUInt32.GetData(Cmb_FuzzworkCoUk_PriceType.SelectedItem); m_Settings.EveMarketdataCom.RegionID = TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_Region.SelectedItem); m_Settings.EveMarketdataCom.SolarID = TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_Solar.SelectedItem); m_Settings.EveMarketdataCom.StationID = TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_Station.SelectedItem); m_Settings.EveMarketdataCom.PriceType = (PriceTypes)TextItemWithUInt32.GetData(Cmb_EveMarketdataCom_PriceType.SelectedItem); this.DialogResult = DialogResult.OK; Close(); }
private void BtnLoadSkills_Click(object sender, EventArgs e) { if (null == CmbLoadSkills.SelectedItem) { return; } UInt32 userID = TextItemWithUInt32.GetData(CmbLoadSkills.SelectedItem); Settings.V1._ApiKey apiKey = Engine.GetCharacterKey(m_Settings, userID); if (null == apiKey) { ErrorMessageBox.Show("Can't find API key for selected character"); return; } Dictionary <UInt32, UInt32> skills = new Dictionary <UInt32, UInt32>(); if (!LoadSkills(apiKey, userID, skills)) { return; } EveSkills[] skillIDs = (EveSkills[])Enum.GetValues(typeof(EveSkills)); foreach (EveSkills currSkill in skillIDs) { UInt32 skillLevel = 0; if (skills.ContainsKey((UInt32)currSkill)) { skillLevel = skills[(UInt32)currSkill]; } m_Settings.Refining.Skills[(UInt32)currSkill] = skillLevel; } PrpRefining.Refresh(); }