Esempio n. 1
0
        private static void ExtractVanillaItems(SweetBridgeDog bridge)
        {
            AnankeContext.Current.ItemsRegistry.Reset();
            IEnumerable <Tuple <string, int> > pairs = bridge.CollectBuiltinItemTypes();
            var enumerable = pairs as Tuple <string, int>[] ?? pairs.ToArray();
            IEnumerable <Tuple <int, Type> > typeProbe = bridge.ProbeTypesOfCreatedObjects(enumerable.Select(p => p.Item2));

            foreach (var pair in enumerable)
            {
                var  assoc = typeProbe.FirstOrDefault(p => p.Item1 == pair.Item2);
                Type type  = null;
                if (assoc != null)
                {
                    type = assoc.Item2;
                }
                ItemActivator activator;
                if (type == null)
                {
                    activator = new ItemActivator(() => null);
                }
                else
                {
                    activator = new ItemActivator(
                        () => (InventoryItem)Activator.CreateInstance(type)
                        );
                }
                var definition = new VanillaItemDefinition(pair.Item2, pair.Item1, activator);
                AnankeContext.Current.ItemsRegistry.Add(definition);
            }
        }
Esempio n. 2
0
    // --------------------------------------------------

    void Start()
    {
        itemActivatorObject = GameObject.Find("ItemActivatorObject");
        activationScript    = itemActivatorObject.GetComponent <ItemActivator>();

        StartCoroutine("AddToList");
    }
Esempio n. 3
0
        public override void Activate(PipelineComponent target)
        {
            var ui = new ArgumentCollectionUI();

            ui.Setup(ItemActivator, target, target.GetClassAsSystemType(), ItemActivator.RepositoryLocator.CatalogueRepository);
            ItemActivator.ShowWindow(ui, true);
        }
Esempio n. 4
0
        public void Test_DeletePinnedObject_PinClears()
        {
            var ti = WhenIHaveA <TableInfo>();

            var collection = AndLaunch <TableInfoCollectionUI>();

            //nothing selected to start with
            Assert.IsNull(collection.CommonTreeFunctionality.Tree.SelectedObject);

            //emphasise and pin it (like Ctrl+F to object)
            ItemActivator.RequestItemEmphasis(this, new EmphasiseRequest(ti)
            {
                Pin = true
            });

            //the TableInfo should now be selected
            Assert.AreEqual(ti, collection.CommonTreeFunctionality.Tree.SelectedObject);

            //and pinned
            Assert.AreEqual(ti, collection.CommonTreeFunctionality.CurrentlyPinned);

            //delete the object
            ItemActivator.DeleteWithConfirmation(ti);

            //selection should now be cleared
            Assert.IsNull(collection.CommonTreeFunctionality.Tree.SelectedObject);

            //as should the pin
            Assert.IsNull(collection.CommonTreeFunctionality.CurrentlyPinned);
        }
 public override void Activate(ExtractionConfiguration target)
 {
     if (!target.IsReleased)
     {
         ItemActivator.Activate <ExecuteExtractionUI, ExtractionConfiguration>(target);
     }
 }
 // Start is called before the first frame update
 void Start()
 {
     itemActivatorObject = GameObject.Find("WorldGenerator");
     activationScript    = itemActivatorObject.GetComponent <ItemActivator>();
     item = new ActivatorItem {
         item = this.gameObject, itemPos = transform.position
     };
     StartCoroutine("AddToList");
 }
Esempio n. 7
0
 public override void Activate(PermissionWindowUsedByCacheProgressNode target)
 {
     if (target.DirectionIsCacheToPermissionWindow)
     {
         ItemActivator.Activate <PermissionWindowUI, PermissionWindow>(target.PermissionWindow);
     }
     else
     {
         ItemActivator.Activate <CacheProgressUI, CacheProgress>(target.CacheProgress);
     }
 }
Esempio n. 8
0
 private void Awake()
 {
     //enforce singleton
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 9
0
        public override void Activate(ProcessTask processTask)
        {
            if (processTask.IsPluginType())
            {
                ItemActivator.Activate <PluginProcessTaskUI, ProcessTask>(processTask);
            }

            if (processTask.ProcessTaskType == ProcessTaskType.Executable)
            {
                ItemActivator.Activate <ExeProcessTaskUI, ProcessTask>(processTask);
            }

            if (processTask.ProcessTaskType == ProcessTaskType.SQLFile)
            {
                ItemActivator.Activate <SqlProcessTaskUI, ProcessTask>(processTask);
            }
        }
Esempio n. 10
0
 void Start()
 {
     itemActivatorObj = GameObject.FindGameObjectWithTag("Player");
     activationScript = itemActivatorObj.GetComponent <ItemActivator>();
     StartCoroutine("addToList");
 }
Esempio n. 11
0
 public override void Activate(ConnectionStringKeyword target)
 {
     ItemActivator.Activate <ConnectionStringKeywordUI, ConnectionStringKeyword>(target);
 }
 public override void Activate(ConcreteFilter target)
 {
     ItemActivator.Activate <ExtractionFilterUI, ConcreteFilter>(target);
 }
Esempio n. 13
0
 public override void Activate(Catalogue c)
 {
     ItemActivator.Activate <CatalogueUI, Catalogue>(c);
 }
Esempio n. 14
0
 public override void Activate(TableInfo target)
 {
     ItemActivator.Activate <TableInfoUI, TableInfo>(target);
 }
Esempio n. 15
0
 public override void Activate(AggregateConfiguration target)
 {
     ItemActivator.Activate <AggregateEditorUI, AggregateConfiguration>(target);
 }
Esempio n. 16
0
 public override void Activate(RemoteRDMP target)
 {
     ItemActivator.Activate <RemoteRDMPUI, RemoteRDMP>(target);
 }
Esempio n. 17
0
 public override void Activate(Lookup target)
 {
     ItemActivator.Activate <LookupUI, Lookup>(target);
 }
 public override void Activate(PreLoadDiscardedColumn target)
 {
     ItemActivator.Activate <PreLoadDiscardedColumnUI, PreLoadDiscardedColumn>(target);
 }
Esempio n. 19
0
 public override void Activate(CohortIdentificationConfiguration target)
 {
     ItemActivator.Activate <CohortIdentificationConfigurationUI, CohortIdentificationConfiguration>(target);
 }
 public override void Activate(CacheProgress target)
 {
     ItemActivator.Activate <ExecuteCacheProgressUI, CacheProgress>(target);
 }
Esempio n. 21
0
 public VanillaItemDefinition(long id, string mnemonic, ItemActivator activator) : base(id, mnemonic, activator)
 {
 }
 public override void Activate(GovernancePeriod target)
 {
     ItemActivator.Activate <GovernancePeriodUI, GovernancePeriod>(target);
 }
Esempio n. 23
0
 public override void Activate(GovernanceDocument target)
 {
     ItemActivator.Activate <GovernanceDocumentUI, GovernanceDocument>(target);
 }
 public override void Activate(PermissionWindow target)
 {
     ItemActivator.Activate <PermissionWindowUI, PermissionWindow>(target);
 }
Esempio n. 25
0
 public override void Activate(Project target)
 {
     ItemActivator.Activate <ProjectUI.ProjectUI, Project>(target);
 }
 public override void Activate(SelectedDataSets target)
 {
     ItemActivator.Activate <ConfigureDatasetUI, SelectedDataSets>(target);
 }
Esempio n. 27
0
 public override void Activate(ANOTable target)
 {
     ItemActivator.Activate <ANOTableUI, ANOTable>(target);
 }
Esempio n. 28
0
 public override void Activate(DashboardLayout target)
 {
     ItemActivator.Activate <DashboardLayoutUI, DashboardLayout>(target);
 }
 public override void Activate(DataAccessCredentialUsageNode target)
 {
     ItemActivator.Activate <DataAccessCredentialsUI, DataAccessCredentials>(target.Credentials);
 }
Esempio n. 30
0
 public override void Activate(ExternalDatabaseServer target)
 {
     ItemActivator.Activate <ExternalDatabaseServerUI, ExternalDatabaseServer>(target);
 }