public AssignTravelLogSystemForm(EliteDangerous.JournalEvents.JournalLocOrJump vsc) { InitializeComponent(); this._travelLogEntry = vsc; SystemClass.GetSystemAndAlternatives(vsc, out _linkSystem, out _alternatives, out _namestatus); this.tbLogSystemName.Text = vsc.StarSystem; this.tbVisitedDate.Text = vsc.EventTimeLocal.ToString(); this.tbLogCoordX.Text = vsc.HasCoordinate ? vsc.StarPos[0].ToString("0.000") : "?"; this.tbLogCoordY.Text = vsc.HasCoordinate ? vsc.StarPos[1].ToString("0.000") : "?"; this.tbLogCoordZ.Text = vsc.HasCoordinate ? vsc.StarPos[2].ToString("0.000") : "?"; this.tbLogCoordX.TextAlign = vsc.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; this.tbLogCoordY.TextAlign = vsc.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; this.tbLogCoordZ.TextAlign = vsc.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; UpdateLinkedSystemList(_linkSystem); tbManualSystemName.AutoCompleteMode = AutoCompleteMode.SuggestAppend; tbManualSystemName.AutoCompleteSource = AutoCompleteSource.CustomSource; tbManualSystemName.SetAutoCompletor(EDDiscovery.DB.SystemClass.ReturnSystemListForAutoComplete); }
public AssignTravelLogSystemForm(ISystem refsys, DateTime?visited = null) { InitializeComponent(); SystemClass.GetSystemAndAlternatives(refsys, out _linkSystem, out _alternatives, out _namestatus); this.tbLogSystemName.Text = refsys.name; this.tbVisitedDate.Text = visited == null ? "-" : visited.ToString(); this.tbLogCoordX.Text = refsys.HasCoordinate ? refsys.x.ToString("0.00") : "?"; this.tbLogCoordY.Text = refsys.HasCoordinate ? refsys.y.ToString("0.00") : "?"; this.tbLogCoordZ.Text = refsys.HasCoordinate ? refsys.z.ToString("0.00") : "?"; this.tbLogCoordX.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; this.tbLogCoordY.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; this.tbLogCoordZ.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center; UpdateLinkedSystemList(_linkSystem); tbManualSystemName.AutoCompleteMode = AutoCompleteMode.SuggestAppend; tbManualSystemName.AutoCompleteSource = AutoCompleteSource.CustomSource; tbManualSystemName.SetAutoCompletor(EDDiscovery.DB.SystemClass.ReturnSystemListForAutoComplete); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; theme.ApplyToForm(this); }