コード例 #1
0
        private void viewOnEDSMToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dataGridViewNearest.RightClickRowValid)
            {
                var rightclicksystem = (ISystem)dataGridViewNearest.Rows[dataGridViewNearest.RightClickRow].Tag;

                if (rightclicksystem != null)
                {
                    this.Cursor = Cursors.WaitCursor;
                    EDSMClass edsm    = new EDSMClass();
                    long?     id_edsm = rightclicksystem.EDSMID;

                    if (id_edsm == 0)
                    {
                        id_edsm = null;
                    }

                    if (!edsm.ShowSystemInEDSM(rightclicksystem.Name, id_edsm))
                    {
                        ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable".T(EDTx.UserControlStarDistance_NoEDSMSys));
                    }

                    this.Cursor = Cursors.Default;
                }
            }
        }
コード例 #2
0
        private void showInEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (rightclickrow >= 0)
            {
                ISystem sys = dataGridViewRoute.Rows[rightclickrow].Tag as ISystem;

                if (sys != null) // paranoia because it should not be enabled otherwise
                {
                    this.Cursor = Cursors.WaitCursor;

                    EliteDangerousCore.EDSM.EDSMClass edsm = new EDSMClass();
                    long?id_edsm = sys.EDSMID;

                    if (id_edsm <= 0)
                    {
                        id_edsm = null;
                    }

                    if (!edsm.ShowSystemInEDSM(sys.Name, id_edsm))
                    {
                        ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable");
                    }

                    this.Cursor = Cursors.Default;
                }
            }
        }
コード例 #3
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EDSMClass edsm = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(rightclicksystem.System.Name))
            {
                ExtendedControls.MessageBoxTheme.Show(this.FindForm(), "System could not be found - has not been synched or EDSM is unavailable".T(EDTx.UserControlJournalGrid_NotSynced));
            }
        }
コード例 #4
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EliteDangerousCore.EDSM.EDSMClass edsm = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(rightclicksystem.System.Name))
            {
                ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable".T(EDTx.UserControlStarList_NoEDSM));
            }
        }
コード例 #5
0
        private void buttonToEDSM_Click(object sender, EventArgs e)
        {
            string    sysname = SystemNameOnly(textBox_To.Text);
            EDSMClass edsm    = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(sysname))
            {
                ExtendedControls.MessageBoxTheme.Show(FindForm(), "System unknown to EDSM");
            }
        }
コード例 #6
0
        private void openInEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            EliteDangerousCore.EDSM.EDSMClass edsm = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(rightclickentry.SystemName, null))
            {
                ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable".Tx(this, "SysU"));
            }

            this.Cursor = Cursors.Default;
        }
コード例 #7
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (rightclicktag != null)
            {
                this.Cursor = Cursors.WaitCursor;
                EDSMClass edsm = new EDSMClass();
                if (!edsm.ShowSystemInEDSM(SysFrom(rightclicktag).Name))
                {
                    ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable");
                }

                this.Cursor = Cursors.Default;
            }
        }
コード例 #8
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            EDDiscovery.EDSM.EDSMClass edsm = new EDSMClass();
            long? id_edsm = rightclicksystem.System?.id_edsm;

            if (id_edsm <= 0)
            {
                id_edsm = null;
            }

            if (!edsm.ShowSystemInEDSM(rightclicksystem.System.name, id_edsm))
                EDDiscovery.Forms.MessageBoxTheme.Show("System could not be found - has not been synched or EDSM is unavailable");

            this.Cursor = Cursors.Default;
        }
コード例 #9
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            EliteDangerousCore.EDSM.EDSMClass edsm = new EDSMClass();
            long? id_edsm = rightclicksystem.System?.EDSMID;

            if (id_edsm <= 0)
            {
                id_edsm = null;
            }

            if (!edsm.ShowSystemInEDSM(rightclicksystem.System.Name, id_edsm))
                ExtendedControls.MessageBoxTheme.Show(FindForm(), "System could not be found - has not been synched or EDSM is unavailable");

            this.Cursor = Cursors.Default;
        }
コード例 #10
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            EDSMClass edsm    = new EDSMClass();
            long?     id_edsm = rightclicksystem.System?.EDSMID;

            if (id_edsm == 0)
            {
                id_edsm = null;
            }

            if (!edsm.ShowSystemInEDSM(rightclicksystem.System.Name, id_edsm))
            {
                ExtendedControls.MessageBoxTheme.Show(this.FindForm(), "System could not be found - has not been synched or EDSM is unavailable".T(EDTx.UserControlJournalGrid_NotSynced));
            }

            this.Cursor = Cursors.Default;
        }
コード例 #11
0
        private void viewOnEDSMToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            IEnumerable <DataGridViewRow> selectedRows = dataGridViewNearest.SelectedCells.Cast <DataGridViewCell>()
                                                         .Select(cell => cell.OwningRow)
                                                         .Distinct()
                                                         .OrderBy(cell => cell.Index);

            this.Cursor = Cursors.WaitCursor;
            ISystem   system = (ISystem)selectedRows.First <DataGridViewRow>().Tag;
            EDSMClass edsm   = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(system.name, system.id_edsm))
            {
                MessageBox.Show("System could not be found - has not been synched or EDSM is unavailable");
            }

            this.Cursor = Cursors.Default;
        }
コード例 #12
0
        private void viewOnEDSMToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            IEnumerable <DataGridViewRow> selectedRows = dataGridViewClosestSystems.SelectedCells.Cast <DataGridViewCell>()
                                                         .Select(cell => cell.OwningRow)
                                                         .Distinct()
                                                         .OrderBy(cell => cell.Index);

            this.Cursor = Cursors.WaitCursor;
            string    sysName = selectedRows.First <DataGridViewRow>().Cells[1].Value.ToString();
            EDSMClass edsm    = new EDSMClass();

            if (!edsm.ShowSystemInEDSM(sysName))
            {
                LogTextHighlight("System could not be found - has not been synched or EDSM is unavailable" + Environment.NewLine);
            }

            this.Cursor = Cursors.Default;
        }
コード例 #13
0
        private void viewOnEDSMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IEnumerable <DataGridViewRow> selectedRows = dataGridViewDistances.SelectedCells.Cast <DataGridViewCell>()
                                                         .Select(cell => cell.OwningRow)
                                                         .Distinct()
                                                         .OrderBy(cell => cell.Index);

            this.Cursor = Cursors.WaitCursor;
            var cellVal = selectedRows.First <DataGridViewRow>().Cells[0].Value;

            if (cellVal != null)
            {
                string    sysName = cellVal.ToString();
                EDSMClass edsm    = new EDSMClass();
                if (!edsm.ShowSystemInEDSM(sysName))
                {
                    LogTextHighlight("System could not be found - has not been synched or EDSM is unavailable".T(EDTx.UserControlTrilateration_NoEDSM) + Environment.NewLine);
                }
            }
            this.Cursor = Cursors.Default;
        }