private void Discoveryform_OnNewEntry(HistoryEntry he, HistoryList hl) { if (he.IsFSDCarrierJump) { systemlist = HistoryList.FilterByFSDCarrierJumpAndPosition(discoveryform.history.EntryOrder()); if (imageViewer.Image != null) // make sure we have a image up, if so, just augment the travel history { DrawTravelHistory(); } else { Display(); // else do the whole thing } } }
public override void Init() { BaseUtils.Translator.Instance.Translate(this); // translate before we add anything else to the panel systemlist = HistoryList.FilterByFSDCarrierJumpAndPosition(discoveryform.history.EntryOrder()); pickerStart = new ExtendedControls.ExtDateTimePicker(); pickerStop = new ExtendedControls.ExtDateTimePicker(); pickerStart.Size = new Size(200, 20); pickerStop.Size = new Size(200, 20); host1 = new ToolStripControlHost(pickerStart); toolStrip.Items.Add(host1); host2 = new ToolStripControlHost(pickerStop); toolStrip.Items.Add(host2); pickerStart.Value = DateTime.Today.AddMonths(-1); this.pickerStart.ValueChanged += new System.EventHandler(this.dateTimePickerStart_ValueChanged); this.pickerStop.ValueChanged += new System.EventHandler(this.dateTimePickerStop_ValueChanged); startDate = new DateTime(2010, 1, 1); images = EDDiscovery.Icons.IconMaps.StandardMaps(); images.AddRange(Map2d.LoadFromFolder(EDDOptions.Instance.MapsAppDirectory())); toolStripComboExpo.Items.Clear(); foreach (Map2d img in images) { toolStripComboExpo.Items.Add(img.FileName); } toolStripComboBoxTime.Items.AddRange(new string[] { "Last Week".T(EDTx.Form2DMap_LastWeek), "Last Month".T(EDTx.Form2DMap_LastMonth), "Last Year".T(EDTx.Form2DMap_LastYear), "All".T(EDTx.Form2DMap_All), "Custom".T(EDTx.Form2DMap_Custom) }); toolStripComboExpo.SelectedIndex = 0; // causes a display toolStripComboBoxTime.SelectedIndex = 3; imageViewer.BackColor = Color.FromArgb(5, 5, 5); discoveryform.OnHistoryChange += Discoveryform_OnHistoryChange; discoveryform.OnNewEntry += Discoveryform_OnNewEntry; }
private void Discoveryform_OnHistoryChange(HistoryList obj) { systemlist = HistoryList.FilterByFSDCarrierJumpAndPosition(discoveryform.history.EntryOrder()); Display(); }