コード例 #1
0
        public void AddExperiment(SEP_ExperimentHandler h)
        {
            if (h == null)
            {
                return;
            }

            if (h.vessel != vessel)
            {
                return;
            }

            SEP_ExperimentSection section = new SEP_ExperimentSection(h, h.vessel);

            if (section == null)
            {
                return;
            }

            experiments.Add(h);
            experimentSections.Add(section);

            if (vesselUISection == null)
            {
                return;
            }

            vesselUISection.AddExperimentSection(section);

            _expcount = getExpCountString();

            vesselUISection.setExpCount(_expcount);
        }
コード例 #2
0
        private void onAddExperiment(Vessel v, SEP_ExperimentHandler h)
        {
            if (v == null)
            {
                return;
            }

            if (v != vessel)
            {
                return;
            }

            if (h == null)
            {
                return;
            }

            if (h.vessel != vessel)
            {
                return;
            }

            SEP_ExperimentSection section = addExperimentSection(h);

            if (section == null)
            {
                return;
            }

            experiments.Add(h);
            experimentSections.Add(section);

            if (vesselUISection == null)
            {
                return;
            }

            vesselUISection.AddExperimentSection(section);

            _expcount = getExpCountString();
        }