public override bool ExecuteAction(ActionProgramRun ap) { List <string> ctrl = FromString(UserData); if (ctrl != null) { List <string> exp; if (ap.Functions.ExpandStrings(ctrl, out exp) != Functions.ExpandResult.Failed) { string caption = (exp[1].Length > 0) ? exp[1]: "EDDiscovery Program Message"; ExtendedControls.InfoForm ifrm = new ExtendedControls.InfoForm(); ifrm.Info(caption, ap.ActionController.Icon, exp[0]); ifrm.Show(ap.ActionController.Form); } else { ap.ReportError(exp[0]); } } else { ap.ReportError("InfoBox command line not in correct format"); } return(true); }
private void buttonImportHelp_Click(object sender, EventArgs e) { ExtendedControls.InfoForm dl = new ExtendedControls.InfoForm(); string text = EDDiscovery.Properties.Resources.ImportHelp; dl.Info("Import Help", text, new Font("Microsoft Sans Serif", 10), new int[] { 50, 200, 400 }); dl.Show(); }
private void buttonImportHelp_Click(object sender, EventArgs e) { ExtendedControls.InfoForm dl = new ExtendedControls.InfoForm(); string text = EDDiscovery.Properties.Resources.ImportHelp; dl.Info("Import Help", Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetExecutingAssembly().Location), text, new Font("Microsoft Sans Serif", 10), new int[] { 50, 200, 400 }); dl.Show(); }
// About Map private void aboutToolStripAbout_Click(object sender, EventArgs e) { ExtendedControls.InfoForm frm = new ExtendedControls.InfoForm(); frm.Info("Map Help", FindForm().Icon, EDDiscovery.Properties.Resources.mapuc, null, new int[1] { 300 }, true); frm.StartPosition = FormStartPosition.CenterParent; frm.Show(FindForm()); }
private void dataGridViewJournal_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (leftclickrow >= 0) // Click expands it.. { ExtendedControls.InfoForm info = new ExtendedControls.InfoForm(); leftclicksystem.journalEntry.FillInformation(out string EventDescription, out string EventDetailedInfo); string infodetailed = EventDescription.AppendPrePad(EventDetailedInfo, Environment.NewLine); info.Info((EDDiscoveryForm.EDDConfig.ConvertTimeToSelectedFromUTC(leftclicksystem.EventTimeUTC)) + ": " + leftclicksystem.EventSummary, FindForm().Icon, infodetailed); info.Size = new Size(1200, 800); info.Show(FindForm()); } }
private void dataGridViewModules_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex >= 0) { string tt = dataGridViewModules.Rows[e.RowIndex].Cells[e.ColumnIndex].ToolTipText; if (!string.IsNullOrEmpty(tt)) { Form mainform = FindForm(); ExtendedControls.InfoForm frm = new ExtendedControls.InfoForm(); frm.Info("Module Information".T(EDTx.UserControlModules_MI), mainform.Icon, tt); frm.Size = new Size(600, 400); frm.StartPosition = FormStartPosition.CenterParent; frm.Show(mainform); } } }
private void buttonExtEDSMConfigureArea_Click(object sender, EventArgs e) { GalaxySectorSelect gss = new GalaxySectorSelect(); if (!gss.Init(EDDConfig.Instance.EDSMGridIDs)) { ExtendedControls.MessageBoxTheme.Show(this, "Warning".T(EDTx.Warning), "No map downloaded - please wait for it to download".T(EDTx.UserControlSettings_NoMap)); } else if (gss.ShowDialog() == DialogResult.OK) { EDDConfig.Instance.EDSMGridIDs = gss.Selection; if (gss.Action == GalaxySectorSelect.ActionToDo.Add) { discoveryform.ForceEDSMEDDBFullRefresh(); } else if (gss.Action == GalaxySectorSelect.ActionToDo.Remove) { System.Diagnostics.Debug.WriteLine("Remove "); info = new ExtendedControls.InfoForm(); info.Info("Remove Sectors".T(EDTx.UserControlSettings_RemoveSectors), EDDiscovery.Properties.Resources.edlogo_3mo_icon, string.Format(("Removing {0} Sector(s)." + Environment.NewLine + Environment.NewLine + "This will take a while (up to 30 mins dep on drive type and amount of sectors)." + Environment.NewLine + "You may continue to use EDD while this operation takes place" + Environment.NewLine + "but it may be slow to respond. Do not close down EDD until this window says" + Environment.NewLine + "the process has finished" + Environment.NewLine + Environment.NewLine).T(EDTx.UserControlSettings_GalRemove), gss.Removed.Count)); info.EnableClose = false; info.Show(discoveryform); taskremovesectors = Task.Factory.StartNew(() => RemoveSectors(gss.AllRemoveSectors, (s) => discoveryform.Invoke(new Action(() => { info.AddText(s); })))); removetimer = new Timer() { Interval = 200 }; removetimer.Tick += Removetimer_Tick; removetimer.Start(); } } }
void ShowNotification() // orgnanise pop ups one at a time.. { if (popupnotificationlist.Count > 0) { Notifications.NotificationParas p = popupnotificationlist[0].Select(EDDConfig.Instance.Language); Action <object> act = new Action <object>((o) => // on ack, update list of ack entries { DateTime ackdate = (DateTime)o; System.Diagnostics.Debug.WriteLine("Ack to " + ackdate.ToStringZulu()); EliteDangerousCore.DB.UserDatabase.Instance.PutSettingString("NotificationLastAckTime", EliteDangerousCore.DB.UserDatabase.Instance.GetSettingString("NotificationLastAckTime", "") + ackdate.ToStringZulu()); }); ExtendedControls.InfoForm infoform = new ExtendedControls.InfoForm(); infoform.Info(p.Caption, this.Icon, p.Text, pointsize: popupnotificationlist[0].PointSize, acknowledgeaction: act, acknowledgedata: popupnotificationlist[0].StartUTC); infoform.FormClosed += (s, e1) => { ShowNotification(); }; // chain to next, one at a time.. popupnotificationlist.RemoveAt(0); infoform.Show(); } }