Ejemplo n.º 1
0
        //TODO: If we reintroduce this, I recommend extracting this out to DatasetBuilder where we can unit test it and keep
        // it out of FormMap's hair
        private void GenerateDataSetsGovernment()
        {
            var datadict = new Dictionary <int, Data3DSetClass <PointData> >();

            InitStarLists();

            _datasets = new List <IData3DSet>();

            datadict[(int)EDGovernment.Anarchy] = Data3DSetClass <PointData> .Create(EDGovernment.Anarchy.ToString(), Color.Yellow, 1.0f);

            datadict[(int)EDGovernment.Colony] = Data3DSetClass <PointData> .Create(EDGovernment.Colony.ToString(), Color.YellowGreen, 1.0f);

            datadict[(int)EDGovernment.Democracy] = Data3DSetClass <PointData> .Create(EDGovernment.Democracy.ToString(), Color.Green, 1.0f);

            datadict[(int)EDGovernment.Imperial] = Data3DSetClass <PointData> .Create(EDGovernment.Imperial.ToString(), Color.DarkGreen, 1.0f);

            datadict[(int)EDGovernment.Corporate] = Data3DSetClass <PointData> .Create(EDGovernment.Corporate.ToString(), Color.LawnGreen, 1.0f);

            datadict[(int)EDGovernment.Communism] = Data3DSetClass <PointData> .Create(EDGovernment.Communism.ToString(), Color.DarkOliveGreen, 1.0f);

            datadict[(int)EDGovernment.Feudal] = Data3DSetClass <PointData> .Create(EDGovernment.Feudal.ToString(), Color.LightBlue, 1.0f);

            datadict[(int)EDGovernment.Dictatorship] = Data3DSetClass <PointData> .Create(EDGovernment.Dictatorship.ToString(), Color.Blue, 1.0f);

            datadict[(int)EDGovernment.Theocracy] = Data3DSetClass <PointData> .Create(EDGovernment.Theocracy.ToString(), Color.DarkBlue, 1.0f);

            datadict[(int)EDGovernment.Cooperative] = Data3DSetClass <PointData> .Create(EDGovernment.Cooperative.ToString(), Color.Purple, 1.0f);

            datadict[(int)EDGovernment.Patronage] = Data3DSetClass <PointData> .Create(EDGovernment.Patronage.ToString(), Color.LightCyan, 1.0f);

            datadict[(int)EDGovernment.Confederacy] = Data3DSetClass <PointData> .Create(EDGovernment.Confederacy.ToString(), Color.Red, 1.0f);

            datadict[(int)EDGovernment.Prison_Colony] = Data3DSetClass <PointData> .Create(EDGovernment.Prison_Colony.ToString(), Color.Orange, 1.0f);

            datadict[(int)EDGovernment.None] = Data3DSetClass <PointData> .Create(EDGovernment.None.ToString(), Color.Gray, 1.0f);

            datadict[(int)EDGovernment.Unknown] = Data3DSetClass <PointData> .Create(EDGovernment.Unknown.ToString(), Color.DarkGray, 1.0f);

            foreach (SystemClass si in _starList)
            {
                if (si.HasCoordinate)
                {
                    datadict[(int)si.primary_economy].Add(new PointData(si.x - CenterSystem.x, si.y - CenterSystem.y, CenterSystem.z - si.z));
                }
            }

            foreach (var ds in datadict.Values)
            {
                _datasets.Add(ds);
            }

            datadict[(int)EDGovernment.None].Visible    = false;
            datadict[(int)EDGovernment.Unknown].Visible = false;
        }
Ejemplo n.º 2
0
        //TODO: If we reintroduce this, I recommend extracting this out to DatasetBuilder where we can unit test it and keep
        // it out of FormMap's hair
        private void GenerateDataSetsAllegiance()
        {
            var datadict = new Dictionary <int, Data3DSetClass <PointData> >();

            InitStarLists();

            _datasets = new List <IData3DSet>();

            datadict[(int)EDAllegiance.Alliance] = Data3DSetClass <PointData> .Create(EDAllegiance.Alliance.ToString(), Color.Green, 1.0f);

            datadict[(int)EDAllegiance.Anarchy] = Data3DSetClass <PointData> .Create(EDAllegiance.Anarchy.ToString(), Color.Purple, 1.0f);

            datadict[(int)EDAllegiance.Empire] = Data3DSetClass <PointData> .Create(EDAllegiance.Empire.ToString(), Color.Blue, 1.0f);

            datadict[(int)EDAllegiance.Federation] = Data3DSetClass <PointData> .Create(EDAllegiance.Federation.ToString(), Color.Red, 1.0f);

            datadict[(int)EDAllegiance.Independent] = Data3DSetClass <PointData> .Create(EDAllegiance.Independent.ToString(), Color.Yellow, 1.0f);

            datadict[(int)EDAllegiance.None] = Data3DSetClass <PointData> .Create(EDAllegiance.None.ToString(), Color.LightGray, 1.0f);

            datadict[(int)EDAllegiance.Unknown] = Data3DSetClass <PointData> .Create(EDAllegiance.Unknown.ToString(), Color.DarkGray, 1.0f);

            foreach (SystemClass si in _starList)
            {
                if (si.HasCoordinate)
                {
                    datadict[(int)si.allegiance].Add(new PointData(si.x - CenterSystem.x, si.y - CenterSystem.y, CenterSystem.z - si.z));
                }
            }

            foreach (var ds in datadict.Values)
            {
                _datasets.Add(ds);
            }

            datadict[(int)EDAllegiance.None].Visible    = false;
            datadict[(int)EDAllegiance.Unknown].Visible = false;
        }