public bool Init(string cellset) { string datapath = EDDOptions.Instance.MapsAppDirectory(); if (Directory.Exists(datapath)) { galaxy = Map2d.LoadImage(Path.Combine(datapath, "Galaxy_L_Grid.json")); if (galaxy != null) { imageViewer.Image = new Bitmap(galaxy.FilePath); imageViewer.ZoomToFit(); imageViewer.Init(galaxy); comboBoxSelections.Items.AddRange((from x in DefaultGalaxyOptions select x.Item1)); initialsel = Selection = cellset; initiallist = new List <int>(imageViewer.Selection); // copy of.. EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); statusStripCustom.Visible = panel_close.Visible = panel_minimize.Visible = !winborder; BaseUtils.Translator.Instance.Translate(this, new Control[] { labelX, labelXName, labelZ, labelZName, labelID }); SetComboBox(); imageViewer.BackColor = Color.FromArgb(5, 5, 5); return(true); } } return(false); }
public AboutForm() { InitializeComponent(); labelVersion.Text = EDDApplicationContext.UserAgent; SetTipAndTag(linkLabelDeveloperChat, Resources.URLProjectDiscord); SetTipAndTag(linkLabelEDDB, Resources.URLeddb); SetTipAndTag(linkLabelEDSM, Resources.URLedsm); SetTipAndTag(linkLabelEliteDangerous, Resources.URLEDHomepage); SetTipAndTag(linkLabelFDForum, Resources.URLProjectEDForumPost); SetTipAndTag(linkLabelGitHub, Resources.URLProjectGithub); SetTipAndTag(linkLabelGitHubIssue, Resources.URLProjectFeedback); SetTipAndTag(linkLabelHelp, Resources.URLProjectWiki); SetTipAndTag(linkLabelLicense, Resources.URLProjectLicense); SetTipAndTag(panelLogo, Resources.URLProjectWiki); SetTipAndTag(panelEDCD, Resources.URLEDCD); var x = Properties.Resources.EDD_License; textBoxLicense.Rtf = x; // we use the RTB to convert from RTF to text, and double space the result. this makes the scroll bar work. textBoxLicense.Text = textBoxLicense.Text.LineTextInsersion("", "\n", "\n"); System.Diagnostics.Debug.WriteLine("Theme AF"); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); panel_close.Visible = !winborder; labelDevelopersEnum.Text = Properties.Resources.Credits; }
public CommanderForm() { InitializeComponent(); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); panelTop.Visible = panelTop.Enabled = !winborder; BaseUtils.Translator.Instance.Translate(this); BaseUtils.Translator.Instance.Translate(toolTip, this); }
private void Form2dLoad(object sender, EventArgs e) { initdone = false; pickerStart = new DateTimePicker(); pickerStop = new DateTimePicker(); 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); if (!AddImages()) { ExtendedControls.MessageBoxTheme.Show(this, "No maps available".Tx(this), "Warning".Tx(), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Close(); return; } toolStripComboExpo.Items.Clear(); foreach (Map2d img in fgeimages) { toolStripComboExpo.Items.Add(img.FileName); } toolStripComboBoxTime.Items.AddRange(new string[] { "Distant Worlds Expedition", "FGE Expedition", "Last Week".Tx(this), "Last Month".Tx(this), "Last Year".Tx(this), "All".Tx(this), "Custom".Tx(this) }); toolStripComboExpo.SelectedIndex = 0; toolStripComboBoxTime.SelectedIndex = 0; initdone = true; ShowSelectedImage(); imageViewer.BackColor = Color.FromArgb(5, 5, 5); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); statusStripCustom.Visible = panel_close.Visible = panel_minimize.Visible = !winborder; BaseUtils.Translator.Instance.Translate(this); }
public bool Init() { List <EDCommander> commanders = EDCommander.GetListCommanders(); comboBoxCommanders.DisplayMember = "Name"; comboBoxCommanders.ValueMember = "Nr"; comboBoxCommanders.DataSource = commanders; BaseUtils.Translator.Instance.Translate(this); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; theme.ApplyDialog(this); return(true); }
public void Init(string[] exportlist, bool disablestartendtime = false, string[] outputext = null) { outputextension = outputext; if (exportlist != null) { comboBoxCustomExportType.Items.AddRange(exportlist); } customDateTimePickerFrom.Value = EDDConfig.Instance.ConvertTimeToSelectedFromUTC(new DateTime(2014, 11, 22, 0, 0, 0, DateTimeKind.Utc)); //Gamma start customDateTimePickerTo.Value = EDDConfig.Instance.ConvertTimeToSelectedFromUTC(new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day, 23, 59, 59)); if (System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Equals(".")) { radioButtonComma.Checked = true; } else { radioButtonSemiColon.Checked = true; } checkBoxIncludeHeader.Checked = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool("ExportFormIncludeHeader", true); checkBoxCustomAutoOpen.Checked = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool("ExportFormOpenExcel", true); comboBoxCustomExportType.SelectedIndex = 0; EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); panelTop.Visible = !winborder; if (comboBoxCustomExportType.Items.Count < 2) // disable if no selection { panelCombo.Visible = false; } if (disablestartendtime) // disable if required { panelDate.Visible = false; } BaseUtils.Translator.Instance.Translate(this); }
public void Init(string[] exportlist, bool disablestartendtime = false, bool allowRawJournalExport = false) { comboBoxCustomExportType.Items.AddRange(exportlist); customDateTimePickerFrom.Value = new DateTime(2014, 11, 22, 4, 0, 0, DateTimeKind.Utc); //Gamma start customDateTimePickerTo.Value = DateTime.Now; if (System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Equals(".")) { radioButtonComma.Checked = true; } else { radioButtonSemiColon.Checked = true; } checkBoxIncludeHeader.Checked = EliteDangerousCore.DB.SQLiteConnectionUser.GetSettingBool("ExportFormIncludeHeader", true); checkBoxCustomAutoOpen.Checked = EliteDangerousCore.DB.SQLiteConnectionUser.GetSettingBool("ExportFormOpenExcel", true); checkBoxRawJournal.Checked = EliteDangerousCore.DB.SQLiteConnectionUser.GetSettingBool("ExportAsJournals", true); comboBoxCustomExportType.SelectedIndex = 0; EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); label_index.Visible = panel_minimize.Visible = panel_close.Visible = !winborder; if (disablestartendtime) { customDateTimePickerFrom.Visible = customDateTimePickerTo.Visible = false; int d = panelBottom.Top - customDateTimePickerFrom.Top; panelBottom.Top -= d; panelOuter.Height -= d; Height -= d; } checkBoxRawJournal.Visible = checkBoxRawJournal.Enabled = allowRawJournalExport; if (!allowRawJournalExport) { checkBoxRawJournal.Checked = false; } BaseUtils.Translator.Instance.Translate(this); }
public void Init(EDDProfiles pr, Icon ic) { profiles = pr; Icon = ic; EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); statusStripCustom.Visible = panelTop.Visible = panelTop.Enabled = !winborder; BaseUtils.Translator.Instance.Translate(this); SuspendLayout(); foreach (EDDProfiles.Profile p in profiles.ProfileList) { AddProfile(p.Id, p.Name, p.TripCondition, p.BackCondition, p == pr.PowerOn); } PositionPanels(); ResumeLayout(); }
public SetNoteForm(HistoryEntry he, EDDiscoveryForm parent) { InitializeComponent(); this.Owner = parent; this.HistoryEntry = he; this.NoteText = he.snc?.Note; this.textBoxNote.Text = this.NoteText ?? ""; this.labelTimestamp.Text = EDDConfig.Instance.ConvertTimeToSelectedFromUTC(he.EventTimeUTC).ToString(); this.labelSystem.Text = he.System.Name; he.FillInformation(out string EventDescription, out string EventDetailedInfo); this.labelSummary.Text = he.EventSummary; this.labelDetails.Text = EventDescription; EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); panelTop.Visible = panelTop.Enabled = !winborder; BaseUtils.Translator.Instance.Translate(this, new Control[] { labelTimestamp, labelSystem, labelSummary, labelDetails }); }
public void Init(Vector3 pos, Vector3 dir, float zoom) { initpos = pos; initdir = dir; initzoom = zoom; textBoxWait.Text = "100"; textBoxPanTime.Text = "0"; textBoxFlyTime.Text = "0"; textBoxZoomTime.Text = "0"; textBoxMsgTime.Text = "0"; checkBoxPan.Checked = true; checkBoxPos.Checked = true; checkBoxChangeZoom.Checked = true; ValidateData(); EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance; bool winborder = theme.ApplyDialog(this); panelTop.Visible = panelTop.Enabled = !winborder; BaseUtils.Translator.Instance.Translate(this); }