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()); } } } }
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; }
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); }
private void TlvDatasets_ItemActivate(object sender, EventArgs e) { if (tlvDatasets.SelectedObject is SelectedDataSets sds) { Activator.Activate(sds); } }
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)); } }
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); } }
/// <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)); }
public virtual IPageViewModel <PageData> CreatePageViewModel(PageData pageData) { var activator = new Activator <IPageViewModel <PageData> >(); var model = activator.Activate(typeof(PageViewModel <>), pageData); InitializePageViewModel(model); return(model); }
public IProductViewModel <ProductContent> CreateProductViewModel(ProductContent productContent) { var activator = new Activator <IProductViewModel <ProductContent> >(); var model = activator.Activate(typeof(ProductViewModel <>), productContent); InitializeCatalogViewModel(model); return(model); }
/// <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); }
protected ICatalogViewModel <CatalogContentBase> CreateFashionCatalogViewModel(CatalogContentBase catalogContent) { var activator = new Activator <ICatalogViewModel <CatalogContentBase> >(); var model = activator.Activate(typeof(CatalogContentViewModel <>), catalogContent); InitializeCatalogViewModel(model); return(model); }
public override void Execute() { base.Execute(); var graph = Activator.Activate <AggregateGraphUI, AggregateConfiguration>(_aggregate); graph.LoadGraphAsync(); }
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); }
/// <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); }
public ISparkView CreateInstance() { var view = Activator.Activate(Compiler.CompiledType); if (LanguageFactory != null) { LanguageFactory.InstanceCreated(Compiler, view); } return(view); }
public override void Execute() { base.Execute(); var server = SelectOne(_loggingServers, null, true); LoggingTabUI loggingTabUI = Activator.Activate <LoggingTabUI, ExternalDatabaseServer>(server); loggingTabUI.SetFilter(_filter); }
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); }
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); } }
public override void Execute() { base.Execute(); var jc = Activator.Activate <JoinConfigurationUI, TableInfo>(_tableInfo); if (_otherTableInfo != null) { jc.SetOtherTableInfo(_otherTableInfo); } }
protected override DateTime GetMigrationDateTime(Type migrationType) { IMigration migration = Activator.Activate(migrationType); if (migration is IDateTimeMigration) { return(((IDateTimeMigration)migration).Timestamp); } return(base.GetMigrationDateTime(migrationType)); }
private void OnTriggerEnter2D(Collider2D collision) { if (!activated) { activated = true; activator.Activate(); if (mode == ZoneActivationMode.Timed) { StartCoroutine(DeactivateAfterTimeLimit()); } } }
public override void Execute() { base.Execute(); var c = _catalogue ?? SelectOne <Catalogue>(BasicActivator.RepositoryLocator.CatalogueRepository); if (c == null) { return; } Activator.Activate <DQEExecutionControlUI, Catalogue>(c); }
public Vec Activate(Vec inputActivations) { _errors = null; ZValues = Weights.Multiply(inputActivations) + Biases; if (Activator == null) { Activations = ZValues; } else { Activations = Activator.Activate(ZValues); } return(Activations); }
public override void Execute() { if (_catalogue == null) { SetTarget(SelectOne <Catalogue>(Activator.CoreChildProvider.AllCatalogues)); } if (_catalogue == null) { return; } base.Execute(); Activator.Activate <ForwardEngineerANOCatalogueUI, Catalogue>(_catalogue); }
public override void Execute() { base.Execute(); if (_catalogue == null) { _catalogue = SelectOne <Catalogue>(Activator.RepositoryLocator.CatalogueRepository); } if (_catalogue == null) { return; } Activator.Activate <ValidationSetupUI, Catalogue>(_catalogue); }
public override void Execute() { base.Execute(); if (_cp == null) { _cp = SelectOne <CacheProgress>(Activator.RepositoryLocator.CatalogueRepository); } if (_cp == null) { return; } Activator.Activate <ExecuteCacheProgressUI, CacheProgress>(_cp); }
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)); }
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); }
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 }); } }
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 }); } }