예제 #1
0
        public void NotedSystem(string name, string note, bool target)
        {
            this.Text = "System Information";
            buttonCancel.Hide();
            buttonDelete.Hide();
            textBoxNotes.Hide();
            textBoxTime.Hide();
            labelTimeMade.Hide();
            labelBookmarkNotes.Hide();
            textBoxName.Text       = name;
            textBoxTravelNote.Text = (note != null) ? note : "";

            int delta = textBoxTravelNote.Location.Y - checkBoxTarget.Location.Y;       // before we move it

            checkBoxTarget.Location = new Point(checkBoxTarget.Location.X, labelTimeMade.Location.Y);
            buttonEDSM.Location     = new Point(buttonEDSM.Location.X, labelTimeMade.Location.Y);

            ShiftLocationY(buttonOK, delta);
            ShiftLocationY(labelTravelNote, delta);
            ShiftLocationY(labelTravelNoteEdit, delta);
            ShiftLocationY(textBoxTravelNote, delta);
            this.Height           -= delta;
            checkBoxTarget.Checked = target;

            var edsm = new EDSM.EDSMClass();

            edsmurl = edsm.GetUrlToEDSMSystem(name);
        }
예제 #2
0
        public void Update(string name, string note, string bookmarknote, string tme, bool regionmark, bool istarget)
        {
            this.Text              = "Update Bookmark";
            buttonOK.Text          = "Update";
            textBoxName.Text       = name;
            textBoxName.ReadOnly   = !regionmark;
            textBoxNotes.Text      = bookmarknote;
            textBoxTravelNote.Text = note;
            textBoxTime.Text       = tme;
            checkBoxTarget.Checked = istarget;

            if (regionmark)
            {
                buttonEDSM.Hide();
                labelTravelNote.Hide();
                labelTravelNoteEdit.Hide();
                textBoxTravelNote.Hide();
                int delta = buttonOK.Location.Y - labelTravelNote.Location.Y;
                ShiftLocationY(buttonOK, delta);
                ShiftLocationY(buttonCancel, delta);
                ShiftLocationY(buttonDelete, delta);
                this.Height -= delta;
            }
            else
            {
                var edsm = new EDSM.EDSMClass();
                edsmurl = edsm.GetUrlToEDSMSystem(name);
            }
        }
예제 #3
0
        public void NewSystemBookmark(string name, string note, string tme)
        {
            this.Text              = "New System Bookmark";
            textBoxName.Text       = name;
            textBoxTravelNote.Text = note;
            textBoxTime.Text       = tme;
            buttonDelete.Hide();
            var edsm = new EDSM.EDSMClass();

            edsmurl = edsm.GetUrlToEDSMSystem(name);
        }
예제 #4
0
        public void EDSM_Click(object sender, EventArgs e)
        {
            DrawnPanel dp = sender as DrawnPanel;
            Console.WriteLine("EDSM click on " + dp.Name);

            EDSMClass edsm = new EDSMClass();
            string url = edsm.GetUrlToEDSMSystem(dp.Name);

            if (url.Length > 0)         // may pass back empty string if not known, this solves another exception
                System.Diagnostics.Process.Start(url);
            else
                MessageBox.Show("System " + dp.Name + " unknown to EDSM");
        }
예제 #5
0
        void gotoEDSM()
        {
            HistoryEntry sys = userControlTravelGrid.GetCurrentHistoryEntry;

            if (sys != null)
                _discoveryForm.history.FillEDSM(sys, reload: true);

            if (sys != null && sys.System != null) // solve a possible exception
            {
                if (!String.IsNullOrEmpty(sys.System.name))
                {
                    long? id_edsm = sys.System.id_edsm;
                    if (id_edsm <= 0)
                    {
                        id_edsm = null;
                    }

                    EDSMClass edsm = new EDSMClass();
                    string url = edsm.GetUrlToEDSMSystem(sys.System.name, id_edsm);

                    if (url.Length > 0)         // may pass back empty string if not known, this solves another exception
                        Process.Start(url);
                    else
                        MessageBox.Show("System unknown to EDSM");
                }
            }
        }
예제 #6
0
        public void Update(string name, string note, string bookmarknote, string tme, bool regionmark , bool istarget )
        {
            this.Text = "Update Bookmark";
            buttonOK.Text = "Update";
            textBoxName.Text = name;
            textBoxName.ReadOnly = !regionmark;
            textBoxNotes.Text = bookmarknote;
            textBoxTravelNote.Text = note;
            textBoxTime.Text = tme;
            checkBoxTarget.Checked = istarget;

            if ( regionmark )
            {
                buttonEDSM.Hide();
                labelTravelNote.Hide();
                labelTravelNoteEdit.Hide();
                textBoxTravelNote.Hide();
                int delta = buttonOK.Location.Y - labelTravelNote.Location.Y;
                ShiftLocationY(buttonOK, delta);
                ShiftLocationY(buttonCancel, delta);
                ShiftLocationY(buttonDelete, delta);
                this.Height -= delta;
            }
            else
            {
                var edsm = new EDSM.EDSMClass();
                edsmurl = edsm.GetUrlToEDSMSystem(name);
            }
        }
예제 #7
0
        public void NotedSystem(string name, string note, bool target)
        {
            this.Text = "System Information";
            buttonCancel.Hide();
            buttonDelete.Hide();
            textBoxNotes.Hide();
            textBoxTime.Hide();
            labelTimeMade.Hide();
            labelBookmarkNotes.Hide();
            textBoxName.Text = name;
            textBoxTravelNote.Text = (note != null) ? note : "";

            int delta = textBoxTravelNote.Location.Y - checkBoxTarget.Location.Y;       // before we move it

            checkBoxTarget.Location = new Point(checkBoxTarget.Location.X, labelTimeMade.Location.Y);
            buttonEDSM.Location = new Point(buttonEDSM.Location.X, labelTimeMade.Location.Y);

            ShiftLocationY(buttonOK, delta);
            ShiftLocationY(labelTravelNote, delta);
            ShiftLocationY(labelTravelNoteEdit, delta);
            ShiftLocationY(textBoxTravelNote, delta);
            this.Height -= delta;
            checkBoxTarget.Checked = target;

            var edsm = new EDSM.EDSMClass();
            edsmurl = edsm.GetUrlToEDSMSystem(name);
        }
예제 #8
0
 public void NewSystemBookmark(string name, string note, string tme)
 {
     this.Text = "New System Bookmark";
     textBoxName.Text = name;
     textBoxTravelNote.Text = note;
     textBoxTime.Text = tme;
     buttonDelete.Hide();
     var edsm = new EDSM.EDSMClass();
     edsmurl = edsm.GetUrlToEDSMSystem(name);
 }