コード例 #1
0
 public override void TakeDamage(float damage, Vector3 damagerPosition, float force)
 {
     if (damage >= minDamage && force >= minForce)
     {
         if (mode == DamageActivationMode.Toggle)
         {
             if (activated)
             {
                 activated = false;
                 activator.Deactivate();
             }
             else
             {
                 activated = true;
                 activator.Activate();
             }
         }
         else if (!activated)
         {
             activator.Activate();
             activated = true;
             if (mode == DamageActivationMode.Timed)
             {
                 StartCoroutine(DeactivateAfterTimeLimit());
             }
         }
     }
 }
コード例 #2
0
        public override void Execute()
        {
            base.Execute();

            if (_project == null)
            {
                _project = SelectOne(Activator.RepositoryLocator.DataExportRepository.GetAllObjects <Project>());
            }

            var releaseUI = Activator.Activate <DataReleaseUI, Project>(_project);

            if (_configuration != null)
            {
                if (_selectedDataSet == null)
                {
                    releaseUI.TickAllFor(_configuration);
                }
                else
                {
                    releaseUI.Tick(_selectedDataSet);
                }
            }


            _project = null;
        }
コード例 #3
0
ファイル: ExecuteCommandViewSample.cs プロジェクト: rkm/RDMP
        public override void Execute()
        {
            base.Execute();

            var cic = _aggregate.GetCohortIdentificationConfigurationIfAny();

            var collection = new ViewAggregateExtractUICollection(_aggregate);

            //if it has a cic with a query cache AND it uses joinables.  Since this is a TOP 100 select * from dataset the cache on CHI is useless only patient index tables used by this query are useful if cached
            if (cic != null && cic.QueryCachingServer_ID != null && _aggregate.PatientIndexJoinablesUsed.Any())
            {
                switch (MessageBox.Show("Use Query Cache when building query?", "Use Configured Cache", MessageBoxButtons.YesNoCancel))
                {
                case DialogResult.Cancel:
                    return;

                case DialogResult.Yes:
                    collection.UseQueryCache = true;
                    break;

                case DialogResult.No:
                    collection.UseQueryCache = false;
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            Activator.Activate <ViewSQLAndResultsWithDataGridUI>(collection);
        }
コード例 #4
0
 private void TlvDatasets_ItemActivate(object sender, EventArgs e)
 {
     if (tlvDatasets.SelectedObject is SelectedDataSets sds)
     {
         Activator.Activate(sds);
     }
 }
コード例 #5
0
ファイル: LoadDiagramUI.cs プロジェクト: 24418863/rdm
        void tlvLoadedTables_ItemActivate(object sender, EventArgs e)
        {
            var tableNode      = tlvLoadedTables.SelectedObject as LoadDiagramTableNode;
            var table          = tlvLoadedTables.SelectedObject as DiscoveredTable;
            var unplannedTable = tlvLoadedTables.SelectedObject as UnplannedTable;

            if (unplannedTable != null)
            {
                table = unplannedTable.Table;
            }

            if (tableNode != null)
            {
                if (tableNode.Bubble == LoadBubble.Live)
                {
                    //for live just use the TableInfo!
                    Activator.Activate <ViewSQLAndResultsWithDataGridUI>(new ViewTableInfoExtractUICollection(tableNode.TableInfo, ViewType.TOP_100));
                    return;
                }
                else
                {
                    table = tableNode.Table; //otherwise it's a non Live bubble table or an unplanned table somewhere so use Arbitrary table Data Viewing
                }
            }
            if (table != null)
            {
                Activator.Activate <ViewSQLAndResultsWithDataGridUI>(new ArbitraryTableExtractionUICollection(table));
            }
        }
コード例 #6
0
        public override void Execute()
        {
            base.Execute();

            if (_project != null && _extractionConfiguration == null)
            {
                var available = _project.ExtractionConfigurations.Where(c => c.IsExtractable(out _)).Cast <ExtractionConfiguration>().ToArray();

                if (available.Any())
                {
                    _extractionConfiguration = SelectOne(available);
                }

                if (_extractionConfiguration == null)
                {
                    return;
                }
            }

            var ui = Activator.Activate <ExecuteExtractionUI, ExtractionConfiguration>(_extractionConfiguration);

            if (_selectedDataSet != null)
            {
                ui.TickAllFor(_selectedDataSet);
            }
        }
コード例 #7
0
 /// <summary>
 /// Activates the given mod.
 /// </summary>
 /// <param name="p_modMod">The mod to activate.</param>
 /// <param name="p_dlgUpgradeConfirmationDelegate">The delegate that is called to confirm whether an upgrade install should be performed.</param>
 /// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param>
 /// <param name="p_rolActiveMods">The list or Active mods.</param>
 /// <returns>A background task set allowing the caller to track the progress of the operation.</returns>
 public IBackgroundTaskSet ActivateMod(IMod p_modMod, ConfirmModUpgradeDelegate p_dlgUpgradeConfirmationDelegate, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList <IMod> p_rolActiveMods)
 {
     if (InstallationLog.ActiveMods.Contains(p_modMod))
     {
         return(null);
     }
     return(Activator.Activate(p_modMod, p_dlgUpgradeConfirmationDelegate, p_dlgOverwriteConfirmationDelegate, p_rolActiveMods));
 }
コード例 #8
0
        public virtual IPageViewModel <PageData> CreatePageViewModel(PageData pageData)
        {
            var activator = new Activator <IPageViewModel <PageData> >();
            var model     = activator.Activate(typeof(PageViewModel <>), pageData);

            InitializePageViewModel(model);
            return(model);
        }
コード例 #9
0
        public IProductViewModel <ProductContent> CreateProductViewModel(ProductContent productContent)
        {
            var activator = new Activator <IProductViewModel <ProductContent> >();
            var model     = activator.Activate(typeof(ProductViewModel <>), productContent);

            InitializeCatalogViewModel(model);
            return(model);
        }
コード例 #10
0
        /// <summary>
        /// Creates a catalog view model instance.
        /// </summary>
        /// <param name="catalogContent">The catalog content.</param>
        /// <param name="pageData">The page data.</param>
        /// <returns>A catalog content view model instance.</returns>
        public ICatalogViewModel <CatalogContentBase> CreateCatalogViewModel(CatalogContentBase catalogContent, PageData pageData)
        {
            var activator = new Activator <ICatalogViewModel <CatalogContentBase> >();
            var model     = activator.Activate(typeof(CatalogContentViewModel <>), catalogContent);

            InitializeCatalogViewModel(model);
            return(model);
        }
コード例 #11
0
        protected ICatalogViewModel <CatalogContentBase> CreateFashionCatalogViewModel(CatalogContentBase catalogContent)
        {
            var activator = new Activator <ICatalogViewModel <CatalogContentBase> >();
            var model     = activator.Activate(typeof(CatalogContentViewModel <>), catalogContent);

            InitializeCatalogViewModel(model);
            return(model);
        }
コード例 #12
0
        public override void Execute()
        {
            base.Execute();

            var graph = Activator.Activate <AggregateGraphUI, AggregateConfiguration>(_aggregate);

            graph.LoadGraphAsync();
        }
コード例 #13
0
        public IVariationViewModel <TContent> CreateVariationViewModel <TContent>(TContent variationContent)
            where TContent : VariationContent
        {
            var activator = new Activator <IVariationViewModel <TContent> >();
            var model     = activator.Activate(typeof(VariationViewModel <TContent>), variationContent);

            InitializeVariationViewModel(model);
            return(model);
        }
コード例 #14
0
        /// <summary>
        /// Activates the entity by loading all referenced entities to the relevant properties.
        /// </summary>
        public virtual void Activate()
        {
            if (Activator == null)
            {
                throw new InvalidOperationException("Cannot activate.  No activator has been assigned to the Activator property.");
            }

            Activator.Activate(this);
        }
コード例 #15
0
ファイル: CompiledViewEntry.cs プロジェクト: yhtsnda/spark
        public ISparkView CreateInstance()
        {
            var view = Activator.Activate(Compiler.CompiledType);

            if (LanguageFactory != null)
            {
                LanguageFactory.InstanceCreated(Compiler, view);
            }
            return(view);
        }
コード例 #16
0
        public override void Execute()
        {
            base.Execute();

            var server = SelectOne(_loggingServers, null, true);

            LoggingTabUI loggingTabUI = Activator.Activate <LoggingTabUI, ExternalDatabaseServer>(server);

            loggingTabUI.SetFilter(_filter);
        }
コード例 #17
0
    public virtual void DashWASD(bool D, bool A, bool W, bool S)
    {
        Dictionary <object, object> argumentDictionary = new Dictionary <object, object>();

        argumentDictionary['D'] = D;
        argumentDictionary['A'] = A;
        argumentDictionary['W'] = W;
        argumentDictionary['S'] = S;
        Activator.Activate(this, dash, argumentDictionary);
    }
コード例 #18
0
 protected virtual void SafeFire(int eeiHand, bool MB, bool MBD)
 {
     if (completeBody.GetEquipmentEquipableArray()[eeiHand] != null)
     {
         IActivatable activatable = completeBody.GetEquipmentEquipableArray()[eeiHand] as IActivatable;
         Dictionary <object, object> argumentDictionary = new Dictionary <object, object>();
         argumentDictionary["MB"]  = MB;
         argumentDictionary["MBD"] = MBD;
         Activator.Activate(completeBody, activatable, argumentDictionary);
     }
 }
コード例 #19
0
ファイル: ExecuteCommandAddJoinInfo.cs プロジェクト: rkm/RDMP
        public override void Execute()
        {
            base.Execute();

            var jc = Activator.Activate <JoinConfigurationUI, TableInfo>(_tableInfo);

            if (_otherTableInfo != null)
            {
                jc.SetOtherTableInfo(_otherTableInfo);
            }
        }
コード例 #20
0
        protected override DateTime GetMigrationDateTime(Type migrationType)
        {
            IMigration migration = Activator.Activate(migrationType);

            if (migration is IDateTimeMigration)
            {
                return(((IDateTimeMigration)migration).Timestamp);
            }

            return(base.GetMigrationDateTime(migrationType));
        }
コード例 #21
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (!activated)
     {
         activated = true;
         activator.Activate();
         if (mode == ZoneActivationMode.Timed)
         {
             StartCoroutine(DeactivateAfterTimeLimit());
         }
     }
 }
コード例 #22
0
        public override void Execute()
        {
            base.Execute();

            var c = _catalogue ?? SelectOne <Catalogue>(BasicActivator.RepositoryLocator.CatalogueRepository);

            if (c == null)
            {
                return;
            }

            Activator.Activate <DQEExecutionControlUI, Catalogue>(c);
        }
コード例 #23
0
ファイル: Layer.cs プロジェクト: andrewprogers/neural-net
 public Vec Activate(Vec inputActivations)
 {
     _errors = null;
     ZValues = Weights.Multiply(inputActivations) + Biases;
     if (Activator == null)
     {
         Activations = ZValues;
     }
     else
     {
         Activations = Activator.Activate(ZValues);
     }
     return(Activations);
 }
コード例 #24
0
        public override void Execute()
        {
            if (_catalogue == null)
            {
                SetTarget(SelectOne <Catalogue>(Activator.CoreChildProvider.AllCatalogues));
            }

            if (_catalogue == null)
            {
                return;
            }

            base.Execute();

            Activator.Activate <ForwardEngineerANOCatalogueUI, Catalogue>(_catalogue);
        }
コード例 #25
0
        public override void Execute()
        {
            base.Execute();

            if (_catalogue == null)
            {
                _catalogue = SelectOne <Catalogue>(Activator.RepositoryLocator.CatalogueRepository);
            }

            if (_catalogue == null)
            {
                return;
            }

            Activator.Activate <ValidationSetupUI, Catalogue>(_catalogue);
        }
コード例 #26
0
        public override void Execute()
        {
            base.Execute();

            if (_cp == null)
            {
                _cp = SelectOne <CacheProgress>(Activator.RepositoryLocator.CatalogueRepository);
            }

            if (_cp == null)
            {
                return;
            }

            Activator.Activate <ExecuteCacheProgressUI, CacheProgress>(_cp);
        }
コード例 #27
0
        public override void Execute()
        {
            base.Execute();

            if (_columnInfo == null)
            {
                _columnInfo = SelectOne(_candidates, _columnInfo != null ? _columnInfo.Name : "");
            }

            if (_columnInfo == null)
            {
                return;
            }

            Activator.Activate <ViewSQLAndResultsWithDataGridUI>(new ViewColumnInfoExtractUICollection(_columnInfo, _viewType, _filter));
        }
コード例 #28
0
        public override void Execute()
        {
            base.Execute();

            if (_selectedDataSet == null && _extractionConfiguration != null)
            {
                _selectedDataSet = SelectOne(Activator.RepositoryLocator.DataExportRepository.GetAllObjectsWithParent <SelectedDataSets>(_extractionConfiguration));
            }

            if (_selectedDataSet == null)
            {
                return;
            }

            Activator.Activate <ViewExtractionConfigurationSQLUI, SelectedDataSets>(_selectedDataSet);
        }
コード例 #29
0
        private void BtnRun_Click(object sender, EventArgs e)
        {
            var t = _request?.QueryBuilder?.TablesUsedInQuery?.FirstOrDefault();

            if (t == null)
            {
                Activator.Show("Could not determine what table underlies the ExtractionConfiguration");
            }
            else
            {
                Activator.Activate <ViewSQLAndResultsWithDataGridUI>(
                    new ArbitraryTableExtractionUICollection(t.Discover(DataAccessContext.InternalDataProcessing))
                {
                    OverrideSql = QueryEditor.Text
                });
            }
        }
コード例 #30
0
ファイル: ViewExtractionSqlUI.cs プロジェクト: HDRUK/RDMP
        private void BtnRun_Click(object sender, EventArgs e)
        {
            var t = _catalogue.GetTableInfoList(false).FirstOrDefault();

            if (t == null)
            {
                Activator.Show("Could not determine what table underlies the Catalogue");
            }
            else
            {
                Activator.Activate <ViewSQLAndResultsWithDataGridUI>(
                    new ArbitraryTableExtractionUICollection(t.Discover(DataAccessContext.InternalDataProcessing))
                {
                    OverrideSql = QueryPreview.Text
                });
            }
        }