Example #1
0
 // Obtain a world object using the world-id
 public EDWorld GetWorld()
 {
     if (worldId > 0)
     {
         Repositories.World worldRepo = new Repositories.World();
         return(worldRepo.GetForId(worldId));
     }
     else
     {
         return(null);
     }
 }
Example #2
0
 // Obtain a world object using the world-id
 public EDWorld GetWorld()
 {
     if (worldId > 0)
     {
         Repositories.World worldRepo = new Repositories.World();
         return worldRepo.GetForId(worldId);
     }
     else
     {
         return null;
     }
 }
Example #3
0
 private void toolStripButtonSave_Click(object sender, EventArgs e)
 {
     UpdateEDObject(currentObj);
     if (currentObj is EDWorld)
     {
         Repositories.World world    = new Repositories.World();
         ResponseData       response = world.Store((EDWorld)currentObj);
         OutputErrors(response);
     }
     if (currentObj is EDStar)
     {
         Repositories.Star star     = new Repositories.Star();
         ResponseData      response = star.Store((EDStar)currentObj);
         OutputErrors(response);
     }
 }
Example #4
0
        private void SetSystem(string systemname)
        {
            List <EDWorld> planets;
            List <EDStar>  stars;

            if (systemname == null)
            {
                return;
            }

            textBoxSystemName.Text = systemname;

            edObjects.Clear();

            Repositories.World world = new Repositories.World();
            planets = world.GetAllForSystem(textBoxSystemName.Text);

            Repositories.Star star = new Repositories.Star();
            stars = star.GetAllForSystem(textBoxSystemName.Text);

            // Proof of concept tests. Assumes the 2nd planet has surveys and world surveys
            // Uncomment to see in action!

            //if (planets != null && planets.Count > 1)
            //{
            //    //pulling a world_survey from a world
            //    var worldSurvey = planets[1].GetWorldSurvey();

            //    if (worldSurvey != null)
            //        System.Diagnostics.Trace.WriteLine($"WorldSurvey id = {worldSurvey.id}");

            //    var surveys = planets[1].GetSurveys();
            //    if (surveys != null && surveys.Count > 0 )
            //        System.Diagnostics.Trace.WriteLine($"Survey[0] id = {surveys[0].id}");
            //}

            edObjects.AddRange(planets);
            edObjects.AddRange(stars);
            UpDateListView();
            //addMaterialNodeControl1.CurrentSystem = currentSystem.name;
        }
 private void GetData()
 {
     World world = new World();
     List<EDWorld> objs = world.GetAllForSystem(currentSystem);
 }
Example #6
0
 private void toolStripButtonSave_Click(object sender, EventArgs e)
 {
     UpdateEDObject(currentObj);
     if (currentObj is EDWorld)
     {
         Repositories.World world = new Repositories.World();
         ResponseData response = world.Store((EDWorld)currentObj);
         OutputErrors(response);
     }
     if (currentObj is EDStar)
     {
         Repositories.Star star = new Repositories.Star();
         ResponseData response = star.Store((EDStar)currentObj);
         OutputErrors(response);
     }
 }
Example #7
0
        private void SetSystem(string systemname)
        {
            List<EDWorld> planets;
            List<EDStar> stars;
            if (systemname == null)
                return;

            textBoxSystemName.Text = systemname;

            edObjects.Clear();

            Repositories.World world = new Repositories.World();
            planets = world.GetAllForSystem(textBoxSystemName.Text);

            Repositories.Star star = new Repositories.Star();
            stars = star.GetAllForSystem(textBoxSystemName.Text);

            // Proof of concept tests. Assumes the 2nd planet has surveys and world surveys
            // Uncomment to see in action!

            //if (planets != null && planets.Count > 1)
            //{
            //    //pulling a world_survey from a world
            //    var worldSurvey = planets[1].GetWorldSurvey();

            //    if (worldSurvey != null)
            //        System.Diagnostics.Trace.WriteLine($"WorldSurvey id = {worldSurvey.id}");

            //    var surveys = planets[1].GetSurveys();
            //    if (surveys != null && surveys.Count > 0 )
            //        System.Diagnostics.Trace.WriteLine($"Survey[0] id = {surveys[0].id}");
            //}

            edObjects.AddRange(planets);
            edObjects.AddRange(stars);
            UpDateListView();
            //addMaterialNodeControl1.CurrentSystem = currentSystem.name;
        }