コード例 #1
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);
     }
 }
コード例 #2
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;
        }
コード例 #3
0
ファイル: PlanetsForm.cs プロジェクト: mwerle/EDDiscovery
 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);
     }
 }
コード例 #4
0
ファイル: PlanetsForm.cs プロジェクト: mwerle/EDDiscovery
        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;
        }