コード例 #1
0
        private void MergeCubes(InstallPackage db)
        {
            if (!this.NoDefault)
            {
                string darice = ComponentSearcher.Find(ComponentSearcher.KnownComponent.Darice);
                if (!string.IsNullOrEmpty(darice))
                {
                    this.MergeCube(db, darice);
                }
                else
                {
                    this.WriteWarning(Resources.Error_DefaultCubNotFound);
                }
            }

            if (null != this.AdditionalCube)
            {
                foreach (string cube in this.ResolveFiles(this.AdditionalCube))
                {
                    this.MergeCube(db, cube);
                }

                db.Commit();
            }
        }
コード例 #2
0
ファイル: EditPackageCommand.cs プロジェクト: skyhoshi/psmsi
 /// <summary>
 /// Ges the path to Orca if installed; otherwise, displays a warning.
 /// </summary>
 protected override void BeginProcessing()
 {
     this.orcaPath = ComponentSearcher.Find(ComponentSearcher.KnownComponent.Orca);
     if (string.IsNullOrEmpty(this.orcaPath))
     {
         this.WriteWarning(Resources.Error_OrcaAbsent);
     }
 }
コード例 #3
0
        public EntityMenu(EntityController entityController, ComponentSearcher componentSearcher)
        {
            this.EntityController  = entityController;
            this.ComponentList     = new List <IComponent>();
            this.ComponentSearcher = componentSearcher;

            this.State = new UIState();
        }
コード例 #4
0
ファイル: EntityWindow.cs プロジェクト: 0000duck/MiniRTS
 public EntityWindow(Editors editors, EntityController entityController, ComponentSearcher componentSearcher)
 {
     this.Editors           = editors;
     this.EntityController  = entityController;
     this.ComponentSearcher = componentSearcher;
     this.ComponentCounter  = new Dictionary <Type, int>();
     this.Components        = new List <IComponent>();
 }
コード例 #5
0
        /// <summary>
        /// Create <see cref="ComponentSearcher" /> with initialized event handlers.
        /// </summary>
        /// <returns>Created <see cref="ComponentSearcher" />.</returns>
        private ComponentSearcher createComponentSearcher()
        {
            var searcher = new ComponentSearcher(this, TypeServices);

            searcher.OnNamespaceEntered += reportSearchProgress;
            searcher.OnComponentFound   += ComponentDiscovered;
            return(searcher);
        }
コード例 #6
0
ファイル: CreateMenu.cs プロジェクト: 0000duck/MiniRTS
        public CreateMenu(DebugInfoFactory outLineFactory, WaypointFactory waypointFactory,
                          ProjectorFactory projectorFactory, ContentManager content, LightsController lightsController, ComponentSearcher componentSearcher)
        {
            this.DebugInfoFactory  = outLineFactory;
            this.WaypointFactory   = waypointFactory;
            this.ProjectorFactory  = projectorFactory;
            this.Texture           = content.Load <Texture2D>("Debug");
            this.LightsController  = lightsController;
            this.ComponentSearcher = componentSearcher;

            this.State      = new UIState();
            this.Components = new List <IComponent>();
        }