public IWatchNotification GetWatchWindow(string ID, IWatchList Watches) { string ActualID = ID.Remove(0, SourceConstants.ID_PREFIX.Length); //create a watch window return new MFBWatchNotification(mIncidentList.GetIncidentDictionary()[ActualID], Watches, mOptions, this); }
public WatchNotification(IncidentItem inciItem, IWatchList parent, CFAIncidentSourceOptions progOptions, CFAIncidentSource ParentSource) { InitializeComponent(); mIncidentItem = inciItem; mParent = parent; mProgramOptions = progOptions; mParentSource = ParentSource; mfFadeOut = true; if (inciItem.Responsible == "DSE") { //Swap the background image this.BackgroundImage = dseImageDummy.BackgroundImage; } //Check if a stream exists for this region if (String.IsNullOrEmpty(mProgramOptions.GetRegionStream(mIncidentItem.Region)) == true || String.IsNullOrEmpty(mParentSource.GetIncidentWatcher().GetStreamListenerPath()) == true) { btn2.Visible = false; } else { btn2.Visible = true; //If we have it set to open the stream if (mParentSource.GetIncidentWatcher().GetAutoOpenStreamOnWatch() == true) { OpenStream(); } } }
internal SimpleWatcher(SimpleIncident incident, IWatchList parent) { InitializeComponent(); mParent = parent; mIncident = incident; }
public async Task <IWatchList> AddCustomAsync(string userId, IWatchList watchList) { await _customWatchListRepository.UpsertAsync(userId, watchList); await ReLoadCustomWatchListToNoSqlCache(userId); return(watchList); }
public async Task UpsertAsync(IWatchList watchList) { var entity = Mapper.Map <PredefinedWatchListEntity>(watchList); entity.PartitionKey = GetPartitionKey(); entity.RowKey = GetRowKey(watchList.Id); await _predefinedWatchListTable.InsertOrReplaceAsync(entity); }
public async Task <IWatchList> AddPredefinedAsync(IWatchList watchList) { await _predefinedWatchListRepository.UpsertAsync(watchList); await _myNoSqlWriterPredefined.TryInsertOrReplaceAsync(WatchListPredefinedNoSql.Create(watchList)); return(watchList); }
public async Task UpsertAsync(string userId, IWatchList watchList) { var entity = Mapper.Map <CustomWatchListEntity>(watchList); entity.PartitionKey = GetPartitionKey(userId); entity.RowKey = GetRowKey(watchList.Id); await _customWatchListTable.InsertOrReplaceAsync(entity); }
public bool Initialize(IIncidentWatcher IncidentWatcher, IWatchList Watches) { mIncidentWatcher = IncidentWatcher; mWatchList = Watches; mOptions = new MFBIncidentSourceOptions(); //Create a new Incident List mIncidentList = new MFBIncidentItemList(this); return true; }
public static WatchListModel ToApiModel(this IWatchList watchList) { return(new WatchListModel { Id = watchList.Id, Name = watchList.Name, Order = watchList.Order, ReadOnlyProperty = watchList.ReadOnly, AssetPairIds = watchList.AssetIds ?? new List <string>() }); }
public static WatchListPredefinedNoSql Create(IWatchList watchList) { return(new WatchListPredefinedNoSql() { PartitionKey = GeneratePartitionKey(), RowKey = GenerateRowKey(watchList.Id), Id = watchList.Id, Name = watchList.Name, Order = watchList.Order, ReadOnly = watchList.ReadOnly, AssetIds = watchList.AssetIds.ToList() }); }
public static WatchListCustomNoSql Create(string clientId, IWatchList watchList) { return(new WatchListCustomNoSql() { PartitionKey = GeneratePartitionKey(clientId), RowKey = GenerateRowKey(watchList.Id), Id = watchList.Id, Name = watchList.Name, Order = watchList.Order, ClientId = clientId, ReadOnly = watchList.ReadOnly, AssetIds = watchList.AssetIds.ToList() }); }
public ACTFBWatchNotification(ACTFBIncidentItem IncidentItem, IWatchList Parent, ACTFBIncidentSourceOptions Options, ACTFBIncidentSource ParentSource) { InitializeComponent(); mIncidentItem = IncidentItem; mParent = Parent; mOptions = Options; mParentSource = ParentSource; mfFadeOut = true; UpdateDialog(); //Check if a stream exists for this region if (String.IsNullOrEmpty(mOptions.StreamURL) == false && String.IsNullOrEmpty(mParentSource.GetIncidentWatcher().GetStreamListenerPath()) == false) { //If we have it set to open the stream if (mParentSource.GetIncidentWatcher().GetAutoOpenStreamOnWatch() == true) { OpenStream(); } } }
private async Task <IWatchList> FilterAssetPairsAsync(IWatchList watchList, List <string> availableAssetPairIds = null) { availableAssetPairIds = availableAssetPairIds ?? await GetAvailableAssetPairIdsAsync(); var filteredAssetPairIds = watchList.AssetIds .Where(x => availableAssetPairIds.Contains(x)) .ToList(); if (!filteredAssetPairIds.Any()) { return(null); } var result = new WatchListDto() { AssetIds = filteredAssetPairIds, Id = watchList.Id, Name = watchList.Name, Order = watchList.Order, ReadOnly = watchList.ReadOnly }; return(result); }
public async Task UpdatePredefinedAsync(IWatchList watchList) { await _predefinedWatchListRepository.UpsertAsync(watchList); }
public bool Initialize(IIncidentWatcher IncidentWatcher, IWatchList Watches) { mIncidentWatcher = IncidentWatcher; mWatches = Watches; return true; }
public bool Initialize(IIncidentWatcher IncidentWatcher, IWatchList Watches) { return true; }
public IWatchNotification GetWatchWindow(string ID, IWatchList Watches) { string ActualID = ID.Remove(0, SimpleConstants.ID_PREFIX.Length); return new SimpleWatcher(mOptions.GenerateSimpleIncident(this), Watches); }
public IWatchNotification GetWatchWindow(string ID, IWatchList parent) { //Create a new Watch Window //Does the supplied ID match this source if (ID.StartsWith(SourceConstants.ID_PREFIX) == true) { string actualID = ID.Remove(0, SourceConstants.ID_PREFIX.Length); return new WatchNotification(mIncidentList.GetIncidentDictionary()[actualID], parent, mOptions, this); } else { return null; } }
private IWatchList FilterAssetsPairs(IWatchList watchList, List <string> availableAssetPairIds = null) { return(FilterAssetPairsAsync(watchList, availableAssetPairIds).GetAwaiter().GetResult()); }
public async Task UpdateCustomAsync(string userId, IWatchList watchList) { await _customWatchListRepository.UpsertAsync(userId, watchList); }
public async Task <IWatchList> AddPredefinedAsync(IWatchList watchList) { await _predefinedWatchListRepository.UpsertAsync(watchList); return(watchList); }
private static bool IsAllAssetsWatchList(IWatchList watchList) { // Legacy. Probably, we should use settings to detect all assets watch list. return(watchList.Name.Equals(Constants.AllAssetsWatchListName, StringComparison.InvariantCultureIgnoreCase)); }