Beispiel #1
0
        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 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);
        }
Beispiel #3
0
        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);

            var x = Properties.Resources.EDD_License;

            textBoxLicense.Rtf = x;
            textBoxLicense.ScrollBarLineTweak = -15;     // RTF ends up formatting it with non regular spacing.. add on 15 lines so you can see the bottom. fudge

            System.Diagnostics.Debug.WriteLine("Theme AF");
            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyToFormStandardFontSize(this);

            panel_close.Visible = !winborder;

            panelLogo.Tag = Resources.URLProjectGithub;
        }
Beispiel #4
0
        public void Init(string[] exportlist, bool disablestartendtime = 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);

            comboBoxCustomExportType.SelectedIndex = 0;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            font = new Font(theme.FontName, 10);
            bool winborder = theme.ApplyToForm(this, font);

            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;
            }
        }
        public AssignTravelLogSystemForm(ISystem refsys, DateTime?visited = null)
        {
            InitializeComponent();
            EliteDangerousCore.EDSM.SystemClassEDSM.CheckSystemAliases();
            SystemClassDB.GetSystemAndAlternatives(refsys, out _linkSystem, out _alternatives, out _namestatus);

            this.tbLogSystemName.Text  = refsys.Name;
            this.tbVisitedDate.Text    = visited == null ? "-" : visited.ToString();
            this.tbLogCoordX.Text      = refsys.HasCoordinate ? refsys.X.ToString("0.00") : "?";
            this.tbLogCoordY.Text      = refsys.HasCoordinate ? refsys.Y.ToString("0.00") : "?";
            this.tbLogCoordZ.Text      = refsys.HasCoordinate ? refsys.Z.ToString("0.00") : "?";
            this.tbLogCoordX.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;
            this.tbLogCoordY.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;
            this.tbLogCoordZ.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;

            UpdateLinkedSystemList(_linkSystem);
            tbManualSystemName.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            tbManualSystemName.AutoCompleteSource = AutoCompleteSource.CustomSource;

            tbManualSystemName.SetAutoCompletor(SystemClassDB.ReturnSystemListForAutoComplete);

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;

            BaseUtils.Translator.Instance.Translate(this);
            theme.ApplyToFormStandardFontSize(this);
        }
        public bool Init(string cellset)
        {
            string datapath = Path.Combine(EDDOptions.Instance.AppDataDirectory, "Maps");

            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 defaultsel select x.Item1));

                    initialsel  = Selection = cellset;
                    initiallist = new List <int>(imageViewer.Selection);     // copy of..

                    EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
                    bool winborder             = theme.ApplyToForm(this);
                    statusStripCustom.Visible = panel_close.Visible = panel_minimize.Visible = !winborder;

                    SetComboBox();

                    imageViewer.BackColor = Color.FromArgb(5, 5, 5);

                    return(true);
                }
            }

            return(false);
        }
Beispiel #7
0
        public CommanderForm()
        {
            InitializeComponent();
            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyToFormStandardFontSize(this);

            panelTop.Visible = panelTop.Enabled = !winborder;
        }
        bool hires; // for file name presentation only

        public ScreenShotConfigureForm()
        {
            InitializeComponent();
            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyStd(this);

            panelTop.Visible = panelTop.Enabled = !winborder;
        }
        public void Init()
        {
            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            font = new Font(theme.FontName, 10);
            bool winborder = theme.ApplyToForm(this, font);

            statusStripCustom.Visible = panelTop.Visible = panelTop.Enabled = !winborder;
            richTextBoxScrollDescription.TextBox.ReadOnly = true;
        }
Beispiel #10
0
        public CommanderForm()
        {
            InitializeComponent();
            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            font = new Font(theme.FontName, 10);
            bool winborder = theme.ApplyToForm(this, font);

            panelTop.Visible = panelTop.Enabled = !winborder;
        }
Beispiel #11
0
        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);
        }
Beispiel #12
0
        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.ApplyToFormStandardFontSize(this);

            statusStripCustom.Visible = panel_close.Visible = panel_minimize.Visible = !winborder;

            BaseUtils.Translator.Instance.Translate(this);
        }
Beispiel #13
0
        public bool Init()
        {
            List <EDCommander> commanders = EDCommander.GetList();

            comboBoxCommanders.DisplayMember = "Name";
            comboBoxCommanders.ValueMember   = "Nr";
            comboBoxCommanders.DataSource    = commanders;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            theme.ApplyToForm(this);

            return(true);
        }
Beispiel #14
0
        public void Init(bool ad, Icon ic)           // true = manage downloads, else just show actions and allow editing of them
        {
            this.Icon          = ic;
            managedownloadmode = ad;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyToFormStandardFontSize(this);

            statusStripCustom.Visible             = panelTop.Visible = panelTop.Enabled = !winborder;
            richTextBoxScrollDescription.ReadOnly = true;
            label_index.Text = this.Text = (managedownloadmode) ? "Add-On Manager" : "Edit Add-Ons";

            buttonExtGlobals.Visible = !managedownloadmode;
            buttonMore.Visible       = !managedownloadmode;
        }
Beispiel #15
0
        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.ApplyToFormStandardFontSize(this);

            return(true);
        }
Beispiel #16
0
        public SetNoteForm(HistoryEntry he, EDDiscoveryForm parent)
        {
            InitializeComponent();
            this.Owner               = parent;
            this._discoveryForm      = parent;
            this.HistoryEntry        = he;
            this.NoteText            = he.snc?.Note;
            this.textBoxNote.Text    = this.NoteText ?? "";
            this.labelTimestamp.Text = he.EventTimeLocal.ToString();
            this.labelSystem.Text    = he.System.name;
            this.labelSummary.Text   = he.EventSummary;
            this.labelDetails.Text   = he.EventDescription;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            theme.ApplyToForm(this);
        }
Beispiel #17
0
        public void Show()
        {
            if (_formMap != null)
            {
                if (SystemsDatabase.Instance.RebuildRunning)
                {
                    ExtendedControls.MessageBoxTheme.Show("Not Available due to DB rebuild", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
                    _formMap.IconSelect(theme.ApplyStd(_formMap));

                    _formMap.Show();
                    _formMap.Focus();
                }
            }
        }
Beispiel #18
0
        public SetNoteForm(HistoryEntry he, EDDiscoveryForm parent)
        {
            InitializeComponent();
            this.Owner               = parent;
            this._discoveryForm      = parent;
            this.HistoryEntry        = he;
            this.NoteText            = he.snc?.Note;
            this.textBoxNote.Text    = this.NoteText ?? "";
            this.labelTimestamp.Text = he.EventTimeLocal.ToString();
            this.labelSystem.Text    = he.System.Name;

            he.journalEntry.FillInformation(out string EventDescription, out string EventDetailedInfo);

            this.labelSummary.Text = he.EventSummary;
            this.labelDetails.Text = EventDescription;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            theme.ApplyToFormStandardFontSize(this);
        }
        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);
        }
Beispiel #20
0
        public void Init(string[] exportlist, bool disablestartendtime = false, bool allowRawJournalExport = false)
        {
            comboBoxCustomExportType.Items.AddRange(exportlist);
            customDateTimePickerFrom.Value = EDDConfig.Instance.ConvertTimeToSelectedFromUTC(new DateTime(2014, 11, 22, 4, 0, 0, DateTimeKind.Utc)); //Gamma start
            customDateTimePickerTo.Value   = EDDConfig.Instance.ConvertTimeToSelectedFromUTC(DateTime.UtcNow);

            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);
            checkBoxRawJournal.Checked     = EliteDangerousCore.DB.UserDatabase.Instance.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(bool ad, Icon ic)           // true = manage downloads, else just show actions and allow editing of them
        {
            this.Icon          = ic;
            managedownloadmode = ad;

            SizeF prev = this.AutoScaleDimensions;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyStd(this); // changing FONT changes the autoscale since form is in AutoScaleMode=font

            //System.Diagnostics.Debug.WriteLine("Scale factor " + prev + "->" + this.AutoScaleDimensions);

            statusStripCustom.Visible             = panelTop.Visible = panelTop.Enabled = !winborder;
            richTextBoxScrollDescription.ReadOnly = true;

            buttonExtGlobals.Visible = !managedownloadmode;

            BaseUtils.Translator.Instance.Translate(this);

            label_index.Text = this.Text = (managedownloadmode) ? "Add-On Manager".T(EDTx.AddOnManagerForm_AddOnTitle) : "Edit Add-Ons".T(EDTx.AddOnManagerForm_EditTitle);
        }
Beispiel #22
0
        public void Init(EDDProfiles pr, Icon ic)
        {
            profiles = pr;
            Icon     = ic;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyToFormStandardFontSize(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();
        }
Beispiel #23
0
        // altops, if given, describes the operator of each variable.

        public void Init(string t, EDDiscovery.EDDTheme th, ConditionVariables vbs, Dictionary <string, string> altops = null,
                         bool showone     = false,
                         bool showrefresh = false, bool showrefreshstate = false,
                         bool allowadd    = false, bool allownoexpand    = false)
        {
            theme = th;

            bool winborder = theme.ApplyToForm(this, SystemFonts.DefaultFont);

            statusStripCustom.Visible = panelTop.Visible = panelTop.Enabled = !winborder;
            this.Text = label_index.Text = t;

            showadd      = allowadd;
            shownoexpand = allownoexpand;

            int pos = panelmargin;

            checkBoxCustomRefresh.Enabled  = checkBoxCustomRefresh.Visible = showrefresh;
            checkBoxCustomRefresh.Checked  = showrefreshstate;
            checkBoxCustomRefresh.Location = new Point(pos, panelmargin);

            if (vbs != null)
            {
                foreach (string key in vbs.NameEnumuerable)
                {
                    CreateEntry(key, vbs[key], (altops != null) ? altops[key] : "=");
                }
            }

            if (groups.Count == 0 && showone)
            {
                CreateEntry("", "", "=");
            }

            if (groups.Count >= 1)
            {
                groups[0].var.Focus();
            }
        }
Beispiel #24
0
        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 });
        }
Beispiel #25
0
        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);

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            bool winborder             = theme.ApplyToFormStandardFontSize(this);

            panel_close.Visible = !winborder;

            panelLogo.Tag = Resources.URLProjectGithub;
        }
Beispiel #26
0
        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.ApplyToFormStandardFontSize(this);

            panelTop.Visible = panelTop.Enabled = !winborder;

            BaseUtils.Translator.Instance.Translate(this);
        }
Beispiel #27
0
        public AssignTravelLogSystemForm(ISystem refsys, DateTime?visited = null)
        {
            InitializeComponent();
            SystemClass.GetSystemAndAlternatives(refsys, out _linkSystem, out _alternatives, out _namestatus);

            this.tbLogSystemName.Text  = refsys.name;
            this.tbVisitedDate.Text    = visited == null ? "-" : visited.ToString();
            this.tbLogCoordX.Text      = refsys.HasCoordinate ? refsys.x.ToString("0.00") : "?";
            this.tbLogCoordY.Text      = refsys.HasCoordinate ? refsys.y.ToString("0.00") : "?";
            this.tbLogCoordZ.Text      = refsys.HasCoordinate ? refsys.z.ToString("0.00") : "?";
            this.tbLogCoordX.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;
            this.tbLogCoordY.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;
            this.tbLogCoordZ.TextAlign = refsys.HasCoordinate ? HorizontalAlignment.Right : HorizontalAlignment.Center;

            UpdateLinkedSystemList(_linkSystem);
            tbManualSystemName.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            tbManualSystemName.AutoCompleteSource = AutoCompleteSource.CustomSource;

            tbManualSystemName.SetAutoCompletor(EDDiscovery.DB.SystemClass.ReturnSystemListForAutoComplete);

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            theme.ApplyToForm(this);
        }
        void ReadyToDisplay()
        {
            panelVScroll.RemoveAllControls(new List <Control>()
            {
                buttonMore
            });

            mgr = new VersioningManager();

            int[] edversion = System.Reflection.Assembly.GetExecutingAssembly().GetVersion();
            System.Diagnostics.Debug.Assert(edversion != null);

            mgr.ReadLocalFiles(EDDOptions.Instance.AppDataDirectory, "Actions", "*.act", "Action File");

            if (managedownloadmode)
            {
                mgr.ReadLocalFiles(EDDOptions.Instance.AppDataDirectory, "Flights", "*.vid", "Video File");
                mgr.ReadLocalFiles(EDDOptions.Instance.AppDataDirectory, "AddonFiles", "*.inf", "Other Files");

                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "ActionFiles/V1", downloadactfolder, EDDOptions.Instance.AppDataDirectory, "*.act", edversion, "Action File");
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "VideoFiles/V1", downloadflightfolder, EDDOptions.Instance.AppDataDirectory, "*.vid", edversion, "Video File");
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "AddonFiles/V1", downloadaddonfolder, EDDOptions.Instance.AppDataDirectory, "*.inf", edversion, "Other File");

#if DEBUG
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "ActionFiles/Debug", downloadactdebugfolder, EDDOptions.Instance.AppDataDirectory, "*.act", edversion, "Action File");
#endif
            }

            mgr.Sort();

            panelVScroll.SuspendLayout();

            int[] tabs;
            if (managedownloadmode)
            {
                tabs = new int[] { 0, 100, 300, 380, 590, 770, 860, 940 }
            }
            ;
            else
            {
                tabs = new int[] { 0, 100, 300, 380, 590, 590, 740, 840 }
            };

            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[0] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Type"
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[1] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Name"
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[2] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Version"
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[3] + panelleftmargin, panelheightmargin), Size = new Size(120, 24), Text = "Description"
            });
            if (managedownloadmode)
            {
                panelVScroll.Controls.Add(new Label()
                {
                    Location = new Point(tabs[4] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Status"
                });
            }
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[5] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Action"
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[6] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Delete"
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[7] + panelleftmargin, panelheightmargin), Size = new Size(80, 24), Text = "Enabled"
            });

            int vpos = panelheightmargin + 30;

            foreach (VersioningManager.DownloadItem di in mgr.downloaditems)
            {
                Group g = new Group();
                g.di                = di;
                g.panel             = new Panel();
                g.panel.BorderStyle = BorderStyle.FixedSingle;
                g.panel.Tag         = g;
                g.panel.MouseEnter += MouseEnterControl;

                g.type          = new Label();
                g.type.Location = new Point(tabs[0], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.type.Size     = new Size(tabs[1] - tabs[0], 24);
                g.type.Text     = di.itemtype;
                g.panel.Controls.Add(g.type);

                g.info          = new ExtendedControls.ButtonExt();
                g.info.Location = new Point(tabs[1], labelheightmargin + 2);      // 8 spacing, allow 8*4 to indent
                g.info.Size     = new Size(16, 16);
                g.info.Text     = "i";
                g.info.Click   += Info_Click;
                g.info.Tag      = g;
                g.panel.Controls.Add(g.info);

                g.name          = new Label();
                g.name.Location = new Point(tabs[1] + 18, labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.name.Size     = new Size(tabs[2] - tabs[1] - 18, 24);
                g.name.Text     = di.itemname;
                g.panel.Controls.Add(g.name);

                g.version          = new Label();
                g.version.Location = new Point(tabs[2], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.version.Size     = new Size(tabs[3] - tabs[2], 24);
                g.version.Text     = (di.localversion != null) ? di.localversion.ToString(".") : "N/A";
                g.panel.Controls.Add(g.version);

                g.shortdesc          = new Label();
                g.shortdesc.Location = new Point(tabs[3], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.shortdesc.Size     = new Size(tabs[4] - tabs[3], 24);
                g.shortdesc.Text     = di.ShortLocalDescription;
                if (g.shortdesc.Text.Length == 0)
                {
                    g.shortdesc.Text = "N/A";
                }
                g.panel.Controls.Add(g.shortdesc);

                if (managedownloadmode)
                {
                    string text;
                    if (di.state == VersioningManager.ItemState.EDOutOfDate)
                    {
                        text = "Newer EDD required";
                    }
                    else if (di.state == VersioningManager.ItemState.UpToDate)
                    {
                        text = (di.localmodified) ? "Locally modified" : "Up to Date";
                    }
                    else if (di.state == VersioningManager.ItemState.LocalOnly)
                    {
                        text = "Local Only";
                    }
                    else if (di.state == VersioningManager.ItemState.NotPresent)
                    {
                        text = "Version " + di.downloadedversion.ToString(".") + ((di.localmodified) ? "*" : "");
                    }
                    else
                    {
                        text = "New version " + di.downloadedversion.ToString(".") + ((di.localmodified) ? "*" : "");
                    }

                    g.actionlabel          = new Label();
                    g.actionlabel.Location = new Point(tabs[4], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                    g.actionlabel.Size     = new Size(tabs[5] - tabs[4], 24);
                    g.actionlabel.Text     = text;
                    g.panel.Controls.Add(g.actionlabel);

                    if (text.Contains("ersion"))        // cheap and nasty way
                    {
                        g.actionbutton          = new ExtendedControls.ButtonExt();
                        g.actionbutton.Location = new Point(tabs[5], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                        g.actionbutton.Size     = new Size(80, 24);
                        g.actionbutton.Text     = (di.state == VersioningManager.ItemState.NotPresent) ? "Install" : "Update";
                        g.actionbutton.Click   += Actionbutton_Click;
                        g.actionbutton.Tag      = g;
                        g.panel.Controls.Add(g.actionbutton);
                    }
                }
                else
                {
                    bool loaded = CheckActionLoaded != null?CheckActionLoaded(g.di.itemname) : false;

                    if (loaded)     // may not be loaded IF its got an error.
                    {
                        g.actionbutton          = new ExtendedControls.ButtonExt();
                        g.actionbutton.Location = new Point(tabs[5], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                        g.actionbutton.Size     = new Size(80, 24);
                        g.actionbutton.Text     = "Edit";
                        g.actionbutton.Click   += ActionbuttonEdit_Click;
                        g.actionbutton.Tag      = g;
                        g.panel.Controls.Add(g.actionbutton);
                    }
                }

                if (di.HasLocalCopy)
                {
                    g.deletebutton          = new ExtendedControls.ButtonExt();
                    g.deletebutton.Location = new Point(tabs[6], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                    g.deletebutton.Size     = new Size(24, 24);
                    g.deletebutton.Text     = "X";
                    g.deletebutton.Click   += Deletebutton_Click;
                    g.deletebutton.Tag      = g;
                    g.panel.Controls.Add(g.deletebutton);
                }

                if (di.localenable.HasValue)
                {
                    g.enabled          = new ExtendedControls.CheckBoxCustom();
                    g.enabled.Location = new Point(tabs[7], labelheightmargin);
                    g.enabled.Size     = new Size(100, 20);
                    g.enabled.Text     = "Enabled";
                    g.enabled.Checked  = di.localenable.Value;
                    g.enabled.Click   += Enabled_Click;
                    g.enabled.Tag      = g;
                    g.panel.Controls.Add(g.enabled);
                }

                int panelwidth = Math.Max(panelVScroll.Width - panelVScroll.ScrollBarWidth, 10) - panelleftmargin * 2;

                g.panel.Location = new Point(panelleftmargin, vpos);
                g.panel.Size     = new Size(panelwidth, 32);

                vpos += g.panel.Height + 4;

                panelVScroll.Controls.Add(g.panel);
            }

            buttonMore.Location = new Point(panelleftmargin, vpos);

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            if (theme != null)
            {
                theme.ApplyToControls(panelVScroll, font);
            }

            panelVScroll.ResumeLayout();
        }

        bool infoclicked = false;
Beispiel #29
0
        public void Init(string ptext, string caption, MessageBoxButtons buttons, MessageBoxIcon ic)
        {
            if (buttons == MessageBoxButtons.AbortRetryIgnore)
            {
                buttonExt1.Tag = DialogResult.Ignore; buttonExt1.Text = "Ignore";
                buttonExt2.Tag = DialogResult.Retry; buttonExt2.Text = "Retry";
                buttonExt3.Tag = DialogResult.Abort; buttonExt3.Text = "Abort";
            }
            else if (buttons == MessageBoxButtons.OK)
            {
                buttonExt1.Tag     = DialogResult.OK; buttonExt1.Text = "OK";
                buttonExt2.Visible = false;
                buttonExt3.Visible = false;
                this.AcceptButton  = this.CancelButton = buttonExt1;
            }
            else if (buttons == MessageBoxButtons.OKCancel)
            {
                buttonExt1.Tag     = DialogResult.Cancel; buttonExt1.Text = "Cancel";
                buttonExt2.Tag     = DialogResult.OK; buttonExt2.Text = "OK";
                buttonExt3.Visible = false;
            }
            else if (buttons == MessageBoxButtons.RetryCancel)
            {
                buttonExt1.Tag     = DialogResult.Cancel; buttonExt1.Text = "Cancel";
                buttonExt2.Tag     = DialogResult.OK; buttonExt2.Text = "Retry";
                buttonExt3.Visible = false;
            }
            else if (buttons == MessageBoxButtons.YesNo)
            {
                buttonExt1.Tag     = DialogResult.No; buttonExt1.Text = "No";
                buttonExt2.Tag     = DialogResult.Yes; buttonExt2.Text = "Yes";
                buttonExt3.Visible = false;
            }
            else if (buttons == MessageBoxButtons.YesNoCancel)
            {
                buttonExt1.Tag = DialogResult.Cancel; buttonExt1.Text = "Cancel";
                buttonExt2.Tag = DialogResult.No; buttonExt2.Text = "No";
                buttonExt3.Tag = DialogResult.Yes; buttonExt3.Text = "Yes";
            }

            labelCaption.Text = this.Text = caption;
            text = ptext;

            if (ic == MessageBoxIcon.Asterisk)
            {
                icon = SystemIcons.Asterisk;
            }
            if (ic == MessageBoxIcon.Error)
            {
                icon = SystemIcons.Error;
            }
            if (ic == MessageBoxIcon.Exclamation)
            {
                icon = SystemIcons.Exclamation;
            }
            if (ic == MessageBoxIcon.Information)
            {
                icon = SystemIcons.Information;
            }
            if (ic == MessageBoxIcon.Question)
            {
                icon = SystemIcons.Question;
            }
            if (ic == MessageBoxIcon.Warning)
            {
                icon = SystemIcons.Warning;
            }

            int ystart = 30;

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;
            if (theme != null)  // paranoid
            {
                fnt        = new Font(theme.FontName, 12.0F);
                forecolour = theme.TextBlockColor;
                bool border = theme.ApplyToForm(this, fnt);
                if (!border)
                {
                    labelCaption.Visible = true;
                    ystart += 20;
                }
            }
            else
            {
                fnt        = new Font("MS Sans Serif", 12.0F);
                forecolour = Color.Red;
            }

            int bordery = Bounds.Height - ClientRectangle.Height;
            int borderx = Bounds.Width - ClientRectangle.Width;

            int left = (ic != MessageBoxIcon.None) ? 80 : 20;

            using (Graphics g = CreateGraphics())
            {
                SizeF sizeftext    = g.MeasureString(text, fnt);
                SizeF sizefcaption = g.MeasureString(caption, fnt);

                Height = (int)sizeftext.Height + ystart + 50 + bordery;
                Width  = Math.Min(Math.Max(300, left + (int)Math.Max(sizeftext.Width, sizefcaption.Width) + 20), 1800) + borderx;

                textarea = new Rectangle(left, ystart, (int)(sizeftext.Width + 1), (int)(sizeftext.Height + 1));
            }
        }
Beispiel #30
0
        void ReadyToDisplay()
        {
            this.Cursor = Cursors.Default;
            panelVScroll.RemoveAllControls(new List <Control>()
            {
                buttonMore
            });

            mgr = new VersioningManager();

            int[] edversion = System.Reflection.Assembly.GetExecutingAssembly().GetVersionInts();
            System.Diagnostics.Debug.Assert(edversion != null);

            ReadLocalFiles(mgr, managedownloadmode);

            if (managedownloadmode)
            {
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "ActionFiles/V1", downloadactfolder, EDDOptions.Instance.AppDataDirectory, "*.act", edversion, "Action File");
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "VideoFiles/V1", downloadflightfolder, EDDOptions.Instance.AppDataDirectory, "*.vid", edversion, "Video File");
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "AddonFiles/V1", downloadaddonfolder, EDDOptions.Instance.AppDataDirectory, "*.inf", edversion, "Other File");
#if DEBUG
                mgr.ReadInstallFiles(EDDiscovery.Properties.Resources.URLGithubDataDownload, "ActionFiles/Debug", downloadactdebugfolder, EDDOptions.Instance.AppDataDirectory, "*.act", edversion, "Action File");
#endif
            }

            mgr.Sort();

            panelVScroll.SuspendLayout();

            int[] tabs;
            if (managedownloadmode)
            {
                //               type, n,  ver  des  stat act, del, ena
                tabs = new int[] { 0, 80, 280, 360, 560, 660, 760, 820, 880 }
            }
            ;
            else
            {
                tabs = new int[] { 0, 80, 280, 360, 560, 560, 660, 720, 780 }
            };

            EDDiscovery.EDDTheme theme = EDDiscovery.EDDTheme.Instance;

            int fonth       = (int)theme.GetFont.GetHeight() + 1;
            int headervsize = fonth + panelheightmargin + 2;

            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[0] + panelleftmargin, panelheightmargin), Size = new Size(tabs[1] - tabs[0] - 2, headervsize), Text = "Type".Tx(this)
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[1] + panelleftmargin, panelheightmargin), Size = new Size(tabs[2] - tabs[1] - 2, headervsize), Text = "Name".Tx(this)
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[2] + panelleftmargin, panelheightmargin), Size = new Size(tabs[3] - tabs[2] - 2, headervsize), Text = "Version".Tx(this)
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[3] + panelleftmargin, panelheightmargin), Size = new Size(tabs[4] - tabs[3] - 2, headervsize), Text = "Description".Tx(this)
            });
            if (managedownloadmode)
            {
                panelVScroll.Controls.Add(new Label()
                {
                    Location = new Point(tabs[4] + panelleftmargin, panelheightmargin), Size = new Size(tabs[5] - tabs[4] - 2, headervsize), Text = "Status".Tx(this)
                });
            }
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[5] + panelleftmargin, panelheightmargin), Size = new Size(tabs[6] - tabs[5] - 2, headervsize), Text = "Action".Tx(this)
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[6] + panelleftmargin, panelheightmargin), Size = new Size(tabs[7] - tabs[6] - 2, headervsize), Text = "Delete".Tx(this)
            });
            panelVScroll.Controls.Add(new Label()
            {
                Location = new Point(tabs[7] + panelleftmargin, panelheightmargin), Size = new Size(tabs[8] - tabs[7] - 2, headervsize), Text = "Enabled".Tx(this)
            });

            int vpos = headervsize + 8;

            // draw everything in 8.25 point position then scale

            foreach (VersioningManager.DownloadItem di in mgr.DownloadItems)
            {
                Group g = new Group();
                g.di                = di;
                g.panel             = new Panel();
                g.panel.BorderStyle = BorderStyle.FixedSingle;
                g.panel.Tag         = g;
                g.panel.MouseEnter += MouseEnterControl;

                g.type          = new Label();
                g.type.Location = new Point(tabs[0], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.type.Size     = new Size(tabs[1] - tabs[0], 24);
                g.type.Text     = di.itemtype;
                g.panel.Controls.Add(g.type);

                g.info          = new ExtendedControls.ExtButton();
                g.info.Location = new Point(tabs[1], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                g.info.Size     = new Size(16, 16);
                g.info.Text     = "i";
                g.info.Click   += Info_Click;
                g.info.Tag      = g;
                g.panel.Controls.Add(g.info);

                g.name          = new Label();
                g.name.Location = new Point(tabs[1] + 32, labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.name.Size     = new Size(tabs[2] - tabs[1] - 32, 24);
                g.name.Text     = di.itemname;
                g.panel.Controls.Add(g.name);

                g.version          = new Label();
                g.version.Location = new Point(tabs[2], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.version.Size     = new Size(tabs[3] - tabs[2], 24);
                g.version.Text     = (di.localversion != null) ? di.localversion.ToString(".") : "N/A";
                g.panel.Controls.Add(g.version);

                g.shortdesc          = new Label();
                g.shortdesc.Location = new Point(tabs[3], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                g.shortdesc.Size     = new Size(tabs[4] - tabs[3], 24);
                g.shortdesc.Text     = di.ShortLocalDescription;
                if (g.shortdesc.Text.Length == 0)
                {
                    g.shortdesc.Text = "N/A";
                }
                g.panel.Controls.Add(g.shortdesc);

                if (managedownloadmode)
                {
                    bool   isversion = false;
                    string text;
                    if (di.state == VersioningManager.ItemState.EDOutOfDate)
                    {
                        text = "Newer EDD required".Tx(this, "Newer");
                    }
                    else if (di.state == VersioningManager.ItemState.EDTooOld)
                    {
                        text = "Too old for EDD".Tx(this, "Old");
                    }
                    else if (di.state == VersioningManager.ItemState.UpToDate)
                    {
                        text = (di.localmodified) ? "Locally modified".Tx(this) : "Up to Date".Tx(this);
                    }
                    else if (di.state == VersioningManager.ItemState.LocalOnly)
                    {
                        text = "Local Only".Tx(this, "LocalOnly");
                    }
                    else if (di.state == VersioningManager.ItemState.NotPresent)
                    {
                        isversion = true;
                        text      = "Version".Tx(this) + " " + di.downloadedversion.ToString(".") + ((di.localmodified) ? "*" : "");
                    }
                    else
                    {
                        isversion = true;
                        text      = "New version".Tx(this) + " " + di.downloadedversion.ToString(".") + ((di.localmodified) ? "*" : "");
                    }

                    g.actionlabel          = new Label();
                    g.actionlabel.Location = new Point(tabs[4], labelheightmargin);      // 8 spacing, allow 8*4 to indent
                    g.actionlabel.Size     = new Size(tabs[5] - tabs[4], 24);
                    g.actionlabel.Text     = text;
                    g.panel.Controls.Add(g.actionlabel);

                    if (isversion)
                    {
                        g.actionbutton          = new ExtendedControls.ExtButton();
                        g.actionbutton.Location = new Point(tabs[5], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                        g.actionbutton.Size     = new Size(tabs[6] - tabs[5] - 20, 24);
                        g.actionbutton.Text     = (di.state == VersioningManager.ItemState.NotPresent) ? "Install".Tx(this) : "Update".Tx(this);
                        g.actionbutton.Click   += Actionbutton_Click;
                        g.actionbutton.Tag      = g;
                        g.panel.Controls.Add(g.actionbutton);
                    }
                }
                else
                {
                    bool loaded = CheckActionLoaded != null?CheckActionLoaded(g.di.itemname) : false;

                    if (loaded)     // may not be loaded IF its got an error.
                    {
                        g.actionbutton          = new ExtendedControls.ExtButton();
                        g.actionbutton.Location = new Point(tabs[5], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                        g.actionbutton.Size     = new Size(tabs[6] - tabs[5] - 20, 24);
                        g.actionbutton.Text     = "Edit".Tx(this);
                        g.actionbutton.Click   += ActionbuttonEdit_Click;
                        g.actionbutton.Tag      = g;
                        g.panel.Controls.Add(g.actionbutton);
                    }
                }

                if (di.HasLocalCopy)
                {
                    g.deletebutton          = new ExtendedControls.ExtButton();
                    g.deletebutton.Location = new Point(tabs[6], labelheightmargin - 4);      // 8 spacing, allow 8*4 to indent
                    g.deletebutton.Size     = new Size(24, 24);
                    g.deletebutton.Text     = "X";
                    g.deletebutton.Click   += Deletebutton_Click;
                    g.deletebutton.Tag      = g;
                    g.panel.Controls.Add(g.deletebutton);
                }

                if (di.localenable.HasValue)
                {
                    g.enabled          = new ExtendedControls.ExtCheckBox();
                    g.enabled.Location = new Point(tabs[7], labelheightmargin);
                    g.enabled.Size     = new Size(tabs[8] - tabs[7], 24);
                    g.enabled.Text     = "";// "Enabled".Tx(this);
                    g.enabled.Checked  = di.localenable.Value;
                    g.enabled.Click   += Enabled_Click;
                    g.enabled.Tag      = g;
                    g.panel.Controls.Add(g.enabled);
                }

                g.panel.Location = new Point(panelleftmargin, vpos);
                g.panel.Size     = g.panel.FindMaxSubControlArea(4, 4);

                panelVScroll.Controls.Add(g.panel);
                vpos += g.panel.Height + 4;
            }

            buttonMore.Location = new Point(panelleftmargin, vpos);

            panelVScroll.Scale(this.CurrentAutoScaleFactor());       // scale newly added children to form

            theme.ApplyStd(panelVScroll);

            panelVScroll.ResumeLayout();
        }

        bool infoclicked = false;