public void RefreshSolarSystem(EveJimaUniverse.System location) { SolarSystem = location.Clone() as EveJimaUniverse.System; txtSolarSystemClass.Text = location.Class; if (location.Effect != null) { txtSolarSystemEffect.Text = location.Effect.Trim(); } txtSolarSystemRegion.Text = location.Region.Replace(" Unknown (", "").Replace(")", ""); txtSolarSystemConstellation.Text = location.Constelation != null?location.Constelation.Replace(" Unknown (", "").Replace(")", "") : ""; txtSolarSystemStaticI.Text = ""; txtSolarSystemStaticII.Text = ""; txtSolarSystemStaticIData.Text = ""; txtSolarSystemStaticIIData.Text = ""; txtSolarSystemStaticI.Visible = false; txtSolarSystemStaticII.Visible = false; txtSolarSystemStaticIData.Visible = false; txtSolarSystemStaticIIData.Visible = false; if (string.IsNullOrEmpty(location.Static) == false) { var wormholeI = Global.Space.WormholeTypes[location.Static.Trim()]; txtSolarSystemStaticI.Text = wormholeI.Name; txtSolarSystemStaticI.Visible = true; txtSolarSystemStaticI.ForeColor = Tools.GetColorBySolarSystem(wormholeI.LeadsTo); txtSolarSystemStaticIData.Text = wormholeI.LeadsTo; txtSolarSystemStaticIData.Visible = true; toolTip1.SetToolTip(txtSolarSystemStaticI, "Max Stable Mass=" + wormholeI.TotalMass + "\r\nMax Jump Mass=" + wormholeI.SingleMass); } if (string.IsNullOrEmpty(location.Static2) == false) { var wormholeII = Global.Space.WormholeTypes[location.Static2.Trim()]; txtSolarSystemStaticII.Text = wormholeII.Name; txtSolarSystemStaticII.Visible = true; txtSolarSystemStaticII.ForeColor = Tools.GetColorBySolarSystem(wormholeII.LeadsTo); txtSolarSystemStaticIIData.Text = wormholeII.LeadsTo; txtSolarSystemStaticIIData.Visible = true; toolTip2.SetToolTip(txtSolarSystemStaticII, "Max Stable Mass=" + wormholeII.TotalMass + "\r\nMax Jump Mass=" + wormholeII.SingleMass); } }
public void RefreshSolarSystem(EveJimaUniverse.System location) { if (location == null) { return; } try { Log.DebugFormat("[whlSolarSystem.RefreshSolarSystem] start"); SolarSystem = location.Clone() as EveJimaUniverse.System; if (Global.Pilots.Selected.Location.Name == "unknown") { return; } txtSolarSystemName.Text = Global.Pilots.Selected.Location.Name; txtSolarSystemStaticI.Text = ""; txtSolarSystemStaticII.Text = ""; txtSolarSystemStaticIData.Text = ""; txtSolarSystemStaticIIData.Text = ""; txtSolarSystemStaticI.Visible = false; txtSolarSystemStaticII.Visible = false; txtSolarSystemStaticIData.Visible = false; txtSolarSystemStaticIIData.Visible = false; if (Tools.IsWSpaceSystem(Global.Pilots.Selected.Location.Name) == false) { return; } txtSolarSystemClass.Text = Global.Pilots.Selected.Location.Class; txtSolarSystemEffect.Text = Global.Pilots.Selected.Location.Effect.Trim(); txtSolarSystemRegion.Text = Global.Pilots.Selected.Location.Region.Replace(" Unknown (", "").Replace(")", ""); txtSolarSystemConstellation.Text = Global.Pilots.Selected.Location.Constelation.Replace(" Unknown (", "").Replace(")", ""); var title = Global.Pilots.Selected.Location.Name + ""; if (string.IsNullOrEmpty(Global.Pilots.Selected.Location.Class) == false) { title = title + "[C" + Global.Pilots.Selected.Location.Class + "]"; } if (string.IsNullOrEmpty(Global.Pilots.Selected.Location.Static) == false) { var wormholeI = Global.Space.WormholeTypes[Global.Pilots.Selected.Location.Static.Trim()]; txtSolarSystemStaticI.Text = wormholeI.Name; txtSolarSystemStaticI.Visible = true; txtSolarSystemStaticI.ForeColor = Tools.GetColorBySolarSystem(wormholeI.LeadsTo); txtSolarSystemStaticIData.Text = wormholeI.LeadsTo; txtSolarSystemStaticIData.Visible = true; toolTip1.SetToolTip(txtSolarSystemStaticI, "Max Stable Mass=" + wormholeI.TotalMass + "\r\nMax Jump Mass=" + wormholeI.SingleMass + "\r\nMax Life time =" + wormholeI.Lifetime); title = title + " " + wormholeI.Name + "[" + wormholeI.LeadsTo + "]"; } if (string.IsNullOrEmpty(Global.Pilots.Selected.Location.Static2) == false) { var wormholeII = Global.Space.WormholeTypes[Global.Pilots.Selected.Location.Static2.Trim()]; txtSolarSystemStaticII.Text = wormholeII.Name; txtSolarSystemStaticII.Visible = true; txtSolarSystemStaticII.ForeColor = Tools.GetColorBySolarSystem(wormholeII.LeadsTo); txtSolarSystemStaticIIData.Text = wormholeII.LeadsTo; txtSolarSystemStaticIIData.Visible = true; toolTip2.SetToolTip(txtSolarSystemStaticII, "Max Stable Mass=" + wormholeII.TotalMass + "\r\nMax Jump Mass=" + wormholeII.SingleMass + "\r\nMax Life time =" + wormholeII.Lifetime); title = title + " " + wormholeII.Name + "[" + wormholeII.LeadsTo + "]"; } if (OnChangeSolarSystemInfo == null) { return; } try { OnChangeSolarSystemInfo(title); } catch (Exception ex) { Log.ErrorFormat("[whlSolarSystem.RefreshSolarSystem] Critical error = {0}", ex); } } catch (Exception) { //throw; } }