Exemple #1
0
        private void extButtonFilter_Click(object sender, EventArgs e)
        {
            ExtendedControls.CheckedIconListBoxFormGroup bodyfilter = new CheckedIconListBoxFormGroup();
            bodyfilter.AddAllNone();
            foreach (var x in Enum.GetNames(typeof(EDPlanet)))
            {
                bodyfilter.AddStandardOption(x.ToString(), x.ToString().Replace("_", " "));
            }
            foreach (var x in Enum.GetNames(typeof(EDStar)))
            {
                bodyfilter.AddStandardOption(x.ToString(), Bodies.StarName(x.ParseEnum <EDStar>()));
            }

            // these are filter types for items which are either do not have scandata or are not stars/bodies.  Only Belts/Barycentre are displayed.. scans of rings/beltculsters are not displayed
            bodyfilter.AddStandardOption("star", "Star");
            bodyfilter.AddStandardOption("body", "Body");
            bodyfilter.AddStandardOption("barycentre", "Barycentre");
            bodyfilter.AddStandardOption("belt", "Belt");

            bodyfilter.SaveSettings = (s, o) =>
            {
                bodyfilters = s.Split(';');
                SQLiteDBClass.PutSettingString(DbSave + "BodyFilters", string.Join(";", bodyfilters));
                DrawSystem();
            };

            bodyfilter.Show(string.Join(";", bodyfilters), extButtonFilter, this.FindForm());
        }
Exemple #2
0
        private void CLBSF(float size, bool group)
        {
            CheckedIconListBoxFormGroup f = MakeSelForm(size, group);

            f.PositionBelow(extButton5);
            f.Show(this);
        }
        private void extButtonDisplayFilters_Click(object sender, EventArgs e)
        {
            ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();

            displayfilter.AddAllNone();
            displayfilter.AddStandardOption("icons", "Show body status icons".T(EDTx.UserControlScan_StatusIcons), global::EDDiscovery.Icons.Controls.Scan_ShowOverlays);
            displayfilter.AddStandardOption("mats", "Show Materials".T(EDTx.UserControlScan_ShowMaterials), global::EDDiscovery.Icons.Controls.Scan_ShowAllMaterials);
            displayfilter.AddStandardOption("rares", "Show rare materials only".T(EDTx.UserControlScan_ShowRaresOnly), global::EDDiscovery.Icons.Controls.Scan_ShowRareMaterials);
            displayfilter.AddStandardOption("matfull", "Hide materials which have reached their storage limit".T(EDTx.UserControlScan_MatFull), global::EDDiscovery.Icons.Controls.Scan_HideFullMaterials);
            displayfilter.AddStandardOption("moons", "Show Moons".T(EDTx.UserControlScan_ShowMoons), global::EDDiscovery.Icons.Controls.Scan_ShowMoons);
            displayfilter.AddStandardOption("allg", "Show G on all planets".T(EDTx.UserControlScan_AllG), global::EDDiscovery.Icons.Controls.ShowAllG);
            displayfilter.AddStandardOption("habzone", "Show Habitation Zone".T(EDTx.UserControlScan_HabZone), global::EDDiscovery.Icons.Controls.ShowHabZone);
            displayfilter.AddStandardOption("starclass", "Show Classes of Stars".T(EDTx.UserControlScan_StarClass), global::EDDiscovery.Icons.Controls.ShowStarClasses);
            displayfilter.AddStandardOption("planetclass", "Show Classes of Planets".T(EDTx.UserControlScan_PlanetClass), global::EDDiscovery.Icons.Controls.ShowPlanetClasses);
            displayfilter.AddStandardOption("dist", "Show distance of bodies".T(EDTx.UserControlScan_Distance), global::EDDiscovery.Icons.Controls.ShowDistances);
            displayfilter.AddStandardOption("sys", "Show system and value in main display".T(EDTx.UserControlScan_SystemValue), global::EDDiscovery.Icons.Controls.Scan_DisplaySystemAlways);

            displayfilter.SaveSettings = (s, o) =>
            {
                displayfilters = s.Split(';');
                EliteDangerousCore.DB.UserDatabase.Instance.PutSettingString(DbSave + "DisplayFilters", string.Join(";", displayfilters));
                ApplyDisplayFilters();
                DrawSystem();
            };

            displayfilter.Show(string.Join(";", displayfilters), extButtonDisplayFilters, this.FindForm());
        }
Exemple #4
0
        private void extButtonDisplayFilters_Click(object sender, EventArgs e)
        {
            ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();
            displayfilter.AllOrNoneBack = false;

            displayfilter.AddAllNone();
            displayfilter.AddStandardOption("stars", "Show All Stars".TxID(EDTx.UserControlSurveyor_showAllStarsToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Star);
            displayfilter.AddStandardOption("planets", "Show All Planets".TxID(EDTx.UserControlSurveyor_showAllPlanetsToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_ShowMoons);
            displayfilter.AddStandardOption("beltcluster", "Show belt clusters".TxID(EDTx.UserControlSurveyor_showBeltClustersToolStripMenuItem), global::EDDiscovery.Icons.Controls.Belt);
            displayfilter.AddStandardOption("valueables", "Show valuable bodies".T(EDTx.UserControlStarList_valueables), global::EDDiscovery.Icons.Controls.Scan_Bodies_HighValue);
            displayfilter.AddStandardOption("jumponium", "Show/Hide presence of Jumponium Materials".T(EDTx.UserControlStarList_JUMP), global::EDDiscovery.Icons.Controls.Scan_FSD);
            displayfilter.AddStandardOption("signals", "Has Signals".TxID(EDTx.UserControlSurveyor_bodyFeaturesToolStripMenuItem_hasSignalsToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_Signals);
            displayfilter.AddStandardOption("volcanism", "Has Volcanism".TxID(EDTx.UserControlSurveyor_bodyFeaturesToolStripMenuItem_hasVolcanismToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_Volcanism);
            displayfilter.AddStandardOption("values", "Show values".TxID(EDTx.UserControlSurveyor_showValuesToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_HighValue);
            displayfilter.AddStandardOption("shortinfo", "Show More Information".TxID(EDTx.UserControlSurveyor_showMoreInformationToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_Landable);
            displayfilter.AddStandardOption("gravity", "Show gravity of landables".TxID(EDTx.UserControlSurveyor_showGravityToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_Landable);
            displayfilter.AddStandardOption("atmos", "Show atmospheres of landables".TxID(EDTx.UserControlSurveyor_showAtmosToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_Landable);
            displayfilter.AddStandardOption("rings", "Show rings".TxID(EDTx.UserControlSurveyor_bodyFeaturesToolStripMenuItem_hasRingsToolStripMenuItem), global::EDDiscovery.Icons.Controls.Scan_Bodies_RingOnly);
            displayfilter.AddStandardOption("organics", "Show organic scans".T(EDTx.UserControlStarList_scanorganics), global::EDDiscovery.Icons.Controls.Scan_Bodies_NSP);
            displayfilter.AddStandardOption("codex", "Show codex entries".T(EDTx.UserControlStarList_showcodex), global::EDDiscovery.Icons.Controls.Entries);
            displayfilter.ImageSize    = new Size(24, 24);
            displayfilter.SaveSettings = (s, o) =>
            {
                displayfilters = s.Split(';');
                PutSetting(dbDisplayFilters, string.Join(";", displayfilters));
                Display(false);
            };

            displayfilter.Show(string.Join(";", displayfilters), extButtonDisplayFilters, this.FindForm());
        }
        private void CLBSF(float size, bool group)
        {
            Stopwatch sw = new Stopwatch(); sw.Start();
            CheckedIconListBoxFormGroup f = MakeSelForm(size, group);

            f.PositionBelow(extButton5);
            f.Show(this);
            System.Diagnostics.Debug.WriteLine("CLBSF in " + sw.ElapsedMilliseconds);
        }
Exemple #6
0
        private void extButtonShowControl_Click(object sender, EventArgs e)
        {
            ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();

            // not yet until more than one displayfilter.AddAllNone();
            displayfilter.AddStandardOption(CtrlList.autohide.ToString(), "Auto Hide".TxID(EDTx.UserControlSurveyor_autoHideToolStripMenuItem));

            CommonCtrl(displayfilter, extButtonShowControl);
        }
 private void extButtonShowControl_Click(object sender, EventArgs e)
 {
     ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();
     displayfilter.AddAllNone();
     displayfilter.AddStandardOption(CtrlList.showBelts.ToString(), "Show belts".TxID(EDTx.UserControlScanGrid_structuresToolStripMenuItem_beltsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showRings.ToString(), "Show rings".TxID(EDTx.UserControlScanGrid_structuresToolStripMenuItem_ringsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showMaterials.ToString(), "Show materials".TxID(EDTx.UserControlScanGrid_materialsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showValues.ToString(), "Show values".TxID(EDTx.UserControlScanGrid_valuesToolStripMenuItem));
     CommonCtrl(displayfilter, extButtonHabZones);
 }
 private void extButtonHabZones_Click(object sender, EventArgs e)
 {
     ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();
     displayfilter.AddAllNone();
     displayfilter.AddStandardOption(CtrlList.showHabitable.ToString(), "Show Habitation Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showMetalRich.ToString(), "Show Metal Rich Planet Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem_showMetalRichPlanetsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showWaterWorlds.ToString(), "Show Water World Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem_showWaterWorldsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showEarthLike.ToString(), "Show Earth Like Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem_showEarthLikeToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showAmmonia.ToString(), "Show Ammonia Worlds Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem_showAmmoniaWorldsToolStripMenuItem));
     displayfilter.AddStandardOption(CtrlList.showIcyBodies.ToString(), "Show Icy Planets Zone".TxID(EDTx.UserControlSpanel_showCircumstellarZonesToolStripMenuItem_showIcyPlanetsToolStripMenuItem));
     CommonCtrl(displayfilter, extButtonHabZones);
 }
        private void extButton9_Click(object sender, EventArgs e)
        {
            if (showhideselform1 == null)
            {
                showhideselform1 = MakeSelForm(12, true);
                showhideselform1.CloseOnDeactivate = false;
                showhideselform1.HideOnDeactivate  = true;
            }

            showhideselform1.PositionBelow(extButton9);
            showhideselform1.Show(this);
        }
        private void CommonCtrl(CheckedIconListBoxFormGroup displayfilter, Control button)
        {
            displayfilter.AllOrNoneBack = false;
            displayfilter.ScreenMargin  = new Size(0, 0);

            displayfilter.SaveSettings = (s, o) =>
            {
                var ctrllist = displayfilter.SettingsTagList();
                PutBoolSettingsFromString(s, ctrllist);
                PopulateCtrlList();
                DrawSystem(last_he, true);
            };

            displayfilter.Show(CtrlStateAsString(), button, this.FindForm());
        }
        private void extButtonShowControl_Click(object sender, EventArgs e)
        {
            ExtendedControls.CheckedIconListBoxFormGroup displayfilter = new CheckedIconListBoxFormGroup();
            displayfilter.AllOrNoneBack = false;

            // not yet as only one item. displayfilter.AddAllNone();
            displayfilter.AddStandardOption("fullblueprint", "Show full blueprint information".TxID(EDTx.UserControlModules_FullBluePrint));

            displayfilter.ImageSize    = new Size(24, 24);
            displayfilter.SaveSettings = (s, o) =>
            {
                displayfilters = s.Split(';');
                PutSetting(dbDisplayFilters, string.Join(";", displayfilters));
                Display();
            };

            displayfilter.Show(string.Join(";", displayfilters), extButtonShowControl, this.FindForm());
        }
        CheckedIconListBoxFormGroup MakeSelForm(float size, bool group)
        {
            CheckedIconListBoxFormGroup f = new CheckedIconListBoxFormGroup();

            var imglist = new Image[] { Properties.Resources.edlogo24, Properties.Resources.Logo8bpp48, Properties.Resources.galaxy_white, Properties.Resources.Logo8bpp48rot, Properties.Resources.galaxy_red, };

            f.AddAllNone();
            for (int i = 0; i < 250; i++)
            {
                f.AddStandardOption("T" + i.ToString(), "Tx" + i.ToString(), imglist[i % imglist.Length]);
            }

            if (group)
            {
                f.AddGroupOption("T1;T2;T3;T4;", "G1-4");
                f.AddGroupOption("T5;T6;T7;T8;", "G5-8");
            }
            f.CheckedChanged      += F_CheckedChanged;
            f.SaveSettings        += F_SaveSettings;
            Theme.Current.FontSize = size;
            f.Create("", true);

            return(f);
        }