public IQueryable <ServiceProvidedDto> ServicesFiltered(FilterTypeEnum filterType, string filter) { switch (filterType) { case FilterTypeEnum.CLIENT: return(_supplierRepository.GetAll().Where(x => x.ServiceProvidedClient.Name.Contains(filter)).ProjectTo <ServiceProvidedDto>()); break; case FilterTypeEnum.STATE: var resultState = Enum.GetValues(typeof(StatesEnum)) .Cast <StatesEnum>() .FirstOrDefault(v => v.ToString().Contains(filter)); return(_supplierRepository.GetAll().Where(x => x.ServiceProvidedClient.State == resultState).ProjectTo <ServiceProvidedDto>()); break; case FilterTypeEnum.CITY: return(_supplierRepository.GetAll().Where(x => x.ServiceProvidedClient.City.Contains(filter)).ProjectTo <ServiceProvidedDto>()); break; case FilterTypeEnum.NEIGHBORHOOD: return(_supplierRepository.GetAll().Where(x => x.ServiceProvidedClient.Neighborhood.Contains(filter)).ProjectTo <ServiceProvidedDto>()); break; case FilterTypeEnum.SERVICE: ServiceEnum result = Enum.GetValues(typeof(ServiceEnum)) .Cast <ServiceEnum>() .FirstOrDefault(v => v.ToString().Contains(filter)); return(_supplierRepository.GetAll().Where(x => x.Service == result).ProjectTo <ServiceProvidedDto>()); break; case FilterTypeEnum.MIN_VALUE: var resultTryParseMin = decimal.TryParse(filter, out decimal @decimalMin); if (resultTryParseMin) { return(_supplierRepository.GetAll().Where(x => x.Value > @decimalMin) .ProjectTo <ServiceProvidedDto>()); } break; case FilterTypeEnum.MAX_VALUE: var resultTryParseMax = decimal.TryParse(filter, out decimal @decimalMax); if (resultTryParseMax) { return(_supplierRepository.GetAll().Where(x => x.Value < @decimalMax) .ProjectTo <ServiceProvidedDto>()); } break; default: throw new ArgumentOutOfRangeException(nameof(filterType), filterType, null); } return(_supplierRepository.GetAll().ProjectTo <ServiceProvidedDto>()); }
public void Read(string[] description) { ApplyDefault(); for (int x = 0; x < description.Length; x++) { int index = description[x].IndexOf('='); if (index >= 0 && index < description[x].Length) { string paramName = description[x].Substring(0, index).Trim().ToLower(); string paramValue = description[x].Substring(index + 1).Trim(); switch (paramName) { case "type": FilterMethod = GetFilterType(paramValue.ToLower()); break; case "cutoff": CutOff = float.Parse(paramValue); break; case "resonance": Resonance = float.Parse(paramValue); break; case "keycenter": RootKey = short.Parse(paramValue); break; case "keytrack": KeyTrack = short.Parse(paramValue); break; case "velocitytrack": VelTrack = short.Parse(paramValue); break; } } } CheckValidParameters(); }
private LiteFilter(LiteVariable leftVar, CompareTypeEnum _compareType, LiteVariable rightVar) { this.filterType = FilterTypeEnum.AND; this.filterType = FilterTypeEnum.CONDITION; this.LeftVar = leftVar; this.compareType = _compareType; this.RightVar = rightVar; }
private void ApplyDefault() { FilterMethod = FilterTypeEnum.None; CutOff = -1; Resonance = 1; RootKey = 60; KeyTrack = 0; VelTrack = 0; }
private LiteFilter(FilterTypeEnum _filterType) { this.filterType = FilterTypeEnum.AND; if (_filterType == FilterTypeEnum.CONDITION) { throw new ApplicationException(); } this.filterType = _filterType; this.ChildFilters = new List <LiteFilter>(); }
public int Read(BinaryReader reader) { FilterMethod = (FilterTypeEnum)reader.ReadInt16(); CutOff = reader.ReadSingle(); Resonance = reader.ReadSingle(); RootKey = reader.ReadInt16(); KeyTrack = reader.ReadInt16(); VelTrack = reader.ReadInt16(); CheckValidParameters(); return(SIZE); }
public int Read(BinaryReader reader) { FilterMethod = (FilterTypeEnum)reader.ReadInt16(); CutOff = reader.ReadSingle(); Resonance = reader.ReadSingle(); RootKey = reader.ReadInt16(); KeyTrack = reader.ReadInt16(); VelTrack = reader.ReadInt16(); CheckValidParameters(); return SIZE; }
public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader) { System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader)); this.FilterType = ((FilterTypeEnum)(binaryReader.ReadInt32())); this.FilterWidth = binaryReader.ReadInt32(); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.LeftFilterFrequency.ReadFields(binaryReader))); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.LeftFilterGain.ReadFields(binaryReader))); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.RightFilterFrequency.ReadFields(binaryReader))); pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.RightFilterGain.ReadFields(binaryReader))); return(pointerQueue); }
public static ToolbarFilter New(string name, int orderNum, FilterTypeEnum type, string labelText = "", List <FilterOption> items = null) { ToolbarFilter filter = new ToolbarFilter(); filter.Name = name; filter.OrderNum = orderNum; filter.Type = type; filter.LabelText = labelText; filter.Items = items; return(filter); }
private void CheckValidParameters() { //limit cutoff if (CutOff <= 0) { FilterMethod = FilterTypeEnum.None; } if (RootKey < 0 || RootKey > 127) { RootKey = 60; } KeyTrack = SynthHelper.Clamp(KeyTrack, (short)0, (short)1200); VelTrack = SynthHelper.Clamp(VelTrack, (short)-9600, (short)9600); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { FilterTypeEnum v = (FilterTypeEnum)value; FilterTypeEnum p = (FilterTypeEnum)(int.Parse(parameter.ToString())); if (v == p) { return(null); } else { return(Brushes.Black); } }
public void QuickSetup(int sampleRate, int note, float velocity, FilterDescriptor filterInfo) { coeffUpdateRequired = false; cutOff = filterInfo.CutOff; resonance = filterInfo.Resonance; filterType = filterInfo.FilterMethod; a1 = 0; a2 = 0; b1 = 0; b2 = 0; m1 = 0f; m2 = 0f; m3 = 0f; if (cutOff <= 0 || resonance <= 0) { filterType = FilterTypeEnum.None; } if (filterType != FilterTypeEnum.None) { cutOff *= SynthHelper.CentsToPitch((note - filterInfo.RootKey) * filterInfo.KeyTrack + (int)(velocity * filterInfo.VelTrack)); UpdateCoeff(sampleRate); } }
public void QuickSetup(int sampleRate, int note, float velocity, FilterDescriptor filterInfo) { cutOff = filterInfo.CutOff; resonance = filterInfo.Resonance; filterType = filterInfo.FilterMethod; lastFc = -1000; m1 = 0f; m2 = 0f; m3 = 0f; if (filterType == FilterTypeEnum.None || cutOff <= 0.0 || resonance <= 0.0) { filterType = FilterTypeEnum.None; } else { double fc = cutOff * SynthHelper.CentsToPitch((note - filterInfo.RootKey) * filterInfo.KeyTrack + (int)(velocity * filterInfo.VelTrack)); UpdateCoefficients(SynthHelper.Clamp(fc / sampleRate, 0, .5), resonance); } }
public Control CreateControl(FilterTypeEnum filter) { switch (filter) { case FilterTypeEnum.GroupOrSubgroup: return(new GroupsControl()); case FilterTypeEnum.ProductOrBarcode: return(new ProductsControl()); case FilterTypeEnum.AnyProducts: return(new AnyProductsControl()); case FilterTypeEnum.AnySubgroups: return(new AnySubGroupsControl()); default: throw new ArgumentOutOfRangeException("filter", filter, null); } }
/// <summary> /// Extracts properties from the configuration file key name. /// </summary> /// <param name="key"></param> private void ExtractInfo(string key) { key = key.Replace("Template_", ""); Tag = key.Substring(0, key.IndexOf("_")).ToLower(); key = key.Substring(key.IndexOf("_") + 1); Multiple = (Tag != "body" && Tag != "head" && Tag != "html"); switch (key.ToLower()) { case "start": FilterType = FilterTypeEnum.Start; break; case "end": FilterType = FilterTypeEnum.End; IsBackup = (Tag == "body" || Tag == "html"); Tag = "/" + Tag; break; case "replace": FilterType = FilterTypeEnum.Replace; break; default: FilterType = FilterTypeEnum.Attribute; Attribute = key; break; } }
public static async Task AddFilterAsync(string name, string pattern, FilterTypeEnum type) { try { using (FilterContext db = new FilterContext()) { await db.AddAsync(new FilterTable() { FilterName = name, FilterPattern = pattern, FilterType = type }); await db.SaveChangesAsync(); } } catch (Exception ex) { ExceptionManager.HandleException(ErrMessages.StorageException, ex); throw; } }
public static async Task RemoveFilterAsync(string name, FilterTypeEnum type) { try { using (FilterContext db = new FilterContext()) { var itemToRemove = await db.filterTables.AsQueryable().FirstOrDefaultAsync(x => x.FilterPattern.ToLower() == name.ToLower() & x.FilterType == type); if (itemToRemove != null) { db.filterTables.Remove(itemToRemove); await db.SaveChangesAsync(); } } } catch (Exception ex) { ExceptionManager.HandleException(ErrMessages.StorageException, ex); throw; } }
public FilterCondition(FilterTypeEnum filterType, FilterDefinition definition) : base(filterType) { Definition = definition; }
public Filter(FilterTypeEnum filterType) { FilterType = filterType; }
public void Disable() { filterType = FilterTypeEnum.None; }
public void ApplyGlobal(SfzRegion globalRegion) { if (globalRegion.sample != null) { this.sample = globalRegion.sample; } if (globalRegion.loChan != 255) { this.loChan = globalRegion.loChan; } if (globalRegion.hiChan != 255) { this.hiChan = globalRegion.hiChan; } if (globalRegion.loKey != 255) { this.loKey = globalRegion.loKey; } if (globalRegion.hiKey != 255) { this.hiKey = globalRegion.hiKey; } if (globalRegion.loVel != 255) { this.loVel = globalRegion.loVel; } if (globalRegion.hiVel != 255) { this.hiVel = globalRegion.hiVel; } if (globalRegion.loBend != short.MaxValue) { this.loBend = globalRegion.loBend; } if (globalRegion.hiBend != short.MaxValue) { this.hiBend = globalRegion.hiBend; } if (globalRegion.loChanAft != 255) { this.loChanAft = globalRegion.loChanAft; } if (globalRegion.hiChanAft != 255) { this.hiChanAft = globalRegion.hiChanAft; } if (globalRegion.loPolyAft != 255) { this.loPolyAft = globalRegion.loPolyAft; } if (globalRegion.hiPolyAft != 255) { this.hiPolyAft = globalRegion.hiPolyAft; } if (globalRegion.group != int.MaxValue) { this.group = globalRegion.group; } if (globalRegion.offBy != int.MaxValue) { this.offBy = globalRegion.offBy; } if ((int)globalRegion.offMode != int.MaxValue) { this.offMode = globalRegion.offMode; } if (globalRegion.delay != float.MaxValue) { this.delay = globalRegion.delay; } if (globalRegion.offset != int.MaxValue) { this.offset = globalRegion.offset; } if (globalRegion.end != int.MaxValue) { this.end = globalRegion.end; } if (globalRegion.count != int.MaxValue) { this.count = globalRegion.count; } if ((int)globalRegion.loopMode != int.MaxValue) { this.loopMode = globalRegion.loopMode; } if (globalRegion.loopStart != int.MaxValue) { this.loopStart = globalRegion.loopStart; } if (globalRegion.loopEnd != int.MaxValue) { this.loopEnd = globalRegion.loopEnd; } if (globalRegion.transpose != short.MaxValue) { this.transpose = globalRegion.transpose; } if (globalRegion.tune != short.MaxValue) { this.tune = globalRegion.tune; } if (globalRegion.pitchKeyCenter != short.MaxValue) { this.pitchKeyCenter = globalRegion.pitchKeyCenter; } if (globalRegion.pitchKeyTrack != short.MaxValue) { this.pitchKeyTrack = globalRegion.pitchKeyTrack; } if (globalRegion.pitchVelTrack != short.MaxValue) { this.pitchVelTrack = globalRegion.pitchVelTrack; } if (globalRegion.pitchEGDelay != float.MaxValue) { this.pitchEGDelay = globalRegion.pitchEGDelay; } if (globalRegion.pitchEGStart != float.MaxValue) { this.pitchEGStart = globalRegion.pitchEGStart; } if (globalRegion.pitchEGAttack != float.MaxValue) { this.pitchEGAttack = globalRegion.pitchEGAttack; } if (globalRegion.pitchEGHold != float.MaxValue) { this.pitchEGHold = globalRegion.pitchEGHold; } if (globalRegion.pitchEGDecay != float.MaxValue) { this.pitchEGDecay = globalRegion.pitchEGDecay; } if (globalRegion.pitchEGSustain != float.MaxValue) { this.pitchEGSustain = globalRegion.pitchEGSustain; } if (globalRegion.pitchEGRelease != float.MaxValue) { this.pitchEGRelease = globalRegion.pitchEGRelease; } if (globalRegion.pitchEGDepth != short.MaxValue) { this.pitchEGDepth = globalRegion.pitchEGDepth; } if (globalRegion.pitchEGVel2Delay != float.MaxValue) { this.pitchEGVel2Delay = globalRegion.pitchEGVel2Delay; } if (globalRegion.pitchEGVel2Attack != float.MaxValue) { this.pitchEGVel2Attack = globalRegion.pitchEGVel2Attack; } if (globalRegion.pitchEGVel2Hold != float.MaxValue) { this.pitchEGVel2Hold = globalRegion.pitchEGVel2Hold; } if (globalRegion.pitchEGVel2Decay != float.MaxValue) { this.pitchEGVel2Decay = globalRegion.pitchEGVel2Decay; } if (globalRegion.pitchEGVel2Sustain != float.MaxValue) { this.pitchEGVel2Sustain = globalRegion.pitchEGVel2Sustain; } if (globalRegion.pitchEGVel2Release != float.MaxValue) { this.pitchEGVel2Release = globalRegion.pitchEGVel2Release; } if (globalRegion.pitchEGVel2Depth != short.MaxValue) { this.pitchEGVel2Depth = globalRegion.pitchEGVel2Depth; } if (globalRegion.pitchLfoDelay != float.MaxValue) { this.pitchLfoDelay = globalRegion.pitchLfoDelay; } if (globalRegion.pitchLfoFrequency != float.MaxValue) { this.pitchLfoFrequency = globalRegion.pitchLfoFrequency; } if (globalRegion.pitchLfoDepth != short.MaxValue) { this.pitchLfoDepth = globalRegion.pitchLfoDepth; } if (globalRegion.filterType != FilterTypeEnum.None) { this.filterType = globalRegion.filterType; } if (globalRegion.cutOff != float.MaxValue) { this.cutOff = globalRegion.cutOff; } if (globalRegion.resonance != float.MaxValue) { this.resonance = globalRegion.resonance; } if (globalRegion.filterKeyTrack != short.MaxValue) { this.filterKeyTrack = globalRegion.filterKeyTrack; } if (globalRegion.filterKeyCenter != 255) { this.filterKeyCenter = globalRegion.filterKeyCenter; } if (globalRegion.filterVelTrack != short.MaxValue) { this.filterVelTrack = globalRegion.filterVelTrack; } if (globalRegion.filterEGDelay != float.MaxValue) { this.filterEGDelay = globalRegion.filterEGDelay; } if (globalRegion.filterEGStart != float.MaxValue) { this.filterEGStart = globalRegion.filterEGStart; } if (globalRegion.filterEGAttack != float.MaxValue) { this.filterEGAttack = globalRegion.filterEGAttack; } if (globalRegion.filterEGHold != float.MaxValue) { this.filterEGHold = globalRegion.filterEGHold; } if (globalRegion.filterEGDecay != float.MaxValue) { this.filterEGDecay = globalRegion.filterEGDecay; } if (globalRegion.filterEGSustain != float.MaxValue) { this.filterEGSustain = globalRegion.filterEGSustain; } if (globalRegion.filterEGRelease != float.MaxValue) { this.filterEGRelease = globalRegion.filterEGRelease; } if (globalRegion.filterEGDepth != short.MaxValue) { this.filterEGDepth = globalRegion.filterEGDepth; } if (globalRegion.filterEGVel2Delay != float.MaxValue) { this.filterEGVel2Delay = globalRegion.filterEGVel2Delay; } if (globalRegion.filterEGVel2Attack != float.MaxValue) { this.filterEGVel2Attack = globalRegion.filterEGVel2Attack; } if (globalRegion.filterEGVel2Hold != float.MaxValue) { this.filterEGVel2Hold = globalRegion.filterEGVel2Hold; } if (globalRegion.filterEGVel2Decay != float.MaxValue) { this.filterEGVel2Decay = globalRegion.filterEGVel2Decay; } if (globalRegion.filterEGVel2Sustain != float.MaxValue) { this.filterEGVel2Sustain = globalRegion.filterEGVel2Sustain; } if (globalRegion.filterEGVel2Release != float.MaxValue) { this.filterEGVel2Release = globalRegion.filterEGVel2Release; } if (globalRegion.filterEGVel2Depth != short.MaxValue) { this.filterEGVel2Depth = globalRegion.filterEGVel2Depth; } if (globalRegion.filterLfoDelay != float.MaxValue) { this.filterLfoDelay = globalRegion.filterLfoDelay; } if (globalRegion.filterLfoFrequency != float.MaxValue) { this.filterLfoFrequency = globalRegion.filterLfoFrequency; } if (globalRegion.filterLfoDepth != float.MaxValue) { this.filterLfoDepth = globalRegion.filterLfoDepth; } if (globalRegion.volume != float.MaxValue) { this.volume = globalRegion.volume; } if (globalRegion.pan != float.MaxValue) { this.pan = globalRegion.pan; } if (globalRegion.ampKeyTrack != float.MaxValue) { this.ampKeyTrack = globalRegion.ampKeyTrack; } if (globalRegion.ampKeyCenter != 255) { this.ampKeyCenter = globalRegion.ampKeyCenter; } if (globalRegion.ampVelTrack != float.MaxValue) { this.ampVelTrack = globalRegion.ampVelTrack; } if (globalRegion.ampEGDelay != float.MaxValue) { this.ampEGDelay = globalRegion.ampEGDelay; } if (globalRegion.ampEGStart != float.MaxValue) { this.ampEGStart = globalRegion.ampEGStart; } if (globalRegion.ampEGAttack != float.MaxValue) { this.ampEGAttack = globalRegion.ampEGAttack; } if (globalRegion.ampEGHold != float.MaxValue) { this.ampEGHold = globalRegion.ampEGHold; } if (globalRegion.ampEGDecay != float.MaxValue) { this.ampEGDecay = globalRegion.ampEGDecay; } if (globalRegion.ampEGSustain != float.MaxValue) { this.ampEGSustain = globalRegion.ampEGSustain; } if (globalRegion.ampEGRelease != float.MaxValue) { this.ampEGRelease = globalRegion.ampEGRelease; } if (globalRegion.ampEGVel2Delay != float.MaxValue) { this.ampEGVel2Delay = globalRegion.ampEGVel2Delay; } if (globalRegion.ampEGVel2Attack != float.MaxValue) { this.ampEGVel2Attack = globalRegion.ampEGVel2Attack; } if (globalRegion.ampEGVel2Hold != float.MaxValue) { this.ampEGVel2Hold = globalRegion.ampEGVel2Hold; } if (globalRegion.ampEGVel2Decay != float.MaxValue) { this.ampEGVel2Decay = globalRegion.ampEGVel2Decay; } if (globalRegion.ampEGVel2Sustain != float.MaxValue) { this.ampEGVel2Sustain = globalRegion.ampEGVel2Sustain; } if (globalRegion.ampEGVel2Release != float.MaxValue) { this.ampEGVel2Release = globalRegion.ampEGVel2Release; } if (globalRegion.ampLfoDelay != float.MaxValue) { this.ampLfoDelay = globalRegion.ampLfoDelay; } if (globalRegion.ampLfoFrequency != float.MaxValue) { this.ampLfoFrequency = globalRegion.ampLfoFrequency; } if (globalRegion.ampLfoDepth != float.MaxValue) { this.ampLfoDepth = globalRegion.ampLfoDepth; } }
public IEnumerable <string> GetFilterColumns(FilterTypeEnum filterType) { return(Columns != null?Columns.Where(x => !string.IsNullOrEmpty(x.Name) && x.FilterType == filterType).Select(x => x.Name) : null); }
public static ChartDataType[] GetChartData(StatSalesType[] modelData, StatTypeEnum statType, ViewTypeEnum viewType, ChartTypeEnum chartType, FilterTypeEnum filterType, bool isCount, bool isUseCodeInName) { switch (statType) { case StatTypeEnum.StatSales: return(GetViewData(modelData.Select(row => new ChartDataType { DateTime = row.Date, DateName = row.Date.ToString(), Name = isUseCodeInName ? string.Format("{0} ({1})", row.Name, row.Number) : row.FullName, CodeBar = isCount ? row.Qty.ToString() : string.Format("{0} €", GetTotal(row)), Price = GetTotal(row), Count = isCount ? row.Qty : GetTotal(row) }), viewType, chartType, filterType)); case StatTypeEnum.StatSalesWithReceipts: return(GetViewData(modelData.Select(row => new ChartDataType { DateTime = row.Date, DateName = row.Date.ToString(), Name = isUseCodeInName ? string.Format("{0} ({1})", row.Name, row.Number) : row.FullName, CodeBar = isCount ? row.Qty.ToString() : string.Format("{0} €", GetPrix(row)), Price = GetPrix(row), Count = isCount ? row.Qty : GetPrix(row) }), viewType, chartType, filterType)); } return(null); }
private static ChartDataType[] GetViewData(IEnumerable <ChartDataType> datas, ViewTypeEnum viewType, ChartTypeEnum chartType, FilterTypeEnum filterType) { switch (chartType) { case ChartTypeEnum.HistogramChart: case ChartTypeEnum.ColumnarChart: case ChartTypeEnum.LineChart: return(GetChartedData(datas, viewType, filterType != FilterTypeEnum.ProductOrBarcode)); case ChartTypeEnum.ThreeDimensionalChart: return(filterType == FilterTypeEnum.ProductOrBarcode ? GetChartedData(datas, viewType, false, true) : GetChartedData(datas, viewType, true)); default: return(datas.OrderBy(d => d.DateTime).ToArray()); } }
public void ApplyGlobal(SfzRegion globalRegion) { if (globalRegion.sample != null) this.sample = globalRegion.sample; if (globalRegion.loChan != 255) this.loChan = globalRegion.loChan; if (globalRegion.hiChan != 255) this.hiChan = globalRegion.hiChan; if (globalRegion.loKey != 255) this.loKey = globalRegion.loKey; if (globalRegion.hiKey != 255) this.hiKey = globalRegion.hiKey; if (globalRegion.loVel != 255) this.loVel = globalRegion.loVel; if (globalRegion.hiVel != 255) this.hiVel = globalRegion.hiVel; if (globalRegion.loBend != short.MaxValue) this.loBend = globalRegion.loBend; if (globalRegion.hiBend != short.MaxValue) this.hiBend = globalRegion.hiBend; if (globalRegion.loChanAft != 255) this.loChanAft = globalRegion.loChanAft; if (globalRegion.hiChanAft != 255) this.hiChanAft = globalRegion.hiChanAft; if (globalRegion.loPolyAft != 255) this.loPolyAft = globalRegion.loPolyAft; if (globalRegion.hiPolyAft != 255) this.hiPolyAft = globalRegion.hiPolyAft; if (globalRegion.group != int.MaxValue) this.group = globalRegion.group; if (globalRegion.offBy != int.MaxValue) this.offBy = globalRegion.offBy; if ((int)globalRegion.offMode != int.MaxValue) this.offMode = globalRegion.offMode; if (globalRegion.delay != float.MaxValue) this.delay = globalRegion.delay; if (globalRegion.offset != int.MaxValue) this.offset = globalRegion.offset; if (globalRegion.end != int.MaxValue) this.end = globalRegion.end; if (globalRegion.count != int.MaxValue) this.count = globalRegion.count; if ((int)globalRegion.loopMode != int.MaxValue) this.loopMode = globalRegion.loopMode; if (globalRegion.loopStart != int.MaxValue) this.loopStart = globalRegion.loopStart; if (globalRegion.loopEnd != int.MaxValue) this.loopEnd = globalRegion.loopEnd; if (globalRegion.transpose != short.MaxValue) this.transpose = globalRegion.transpose; if (globalRegion.tune != short.MaxValue) this.tune = globalRegion.tune; if (globalRegion.pitchKeyCenter != short.MaxValue) this.pitchKeyCenter = globalRegion.pitchKeyCenter; if (globalRegion.pitchKeyTrack != short.MaxValue) this.pitchKeyTrack = globalRegion.pitchKeyTrack; if (globalRegion.pitchVelTrack != short.MaxValue) this.pitchVelTrack = globalRegion.pitchVelTrack; if (globalRegion.pitchEGDelay != float.MaxValue) this.pitchEGDelay = globalRegion.pitchEGDelay; if(globalRegion.pitchEGStart != float.MaxValue) this.pitchEGStart = globalRegion.pitchEGStart; if(globalRegion.pitchEGAttack != float.MaxValue) this.pitchEGAttack = globalRegion.pitchEGAttack; if(globalRegion.pitchEGHold != float.MaxValue) this.pitchEGHold = globalRegion.pitchEGHold; if(globalRegion.pitchEGDecay != float.MaxValue) this.pitchEGDecay = globalRegion.pitchEGDecay; if(globalRegion.pitchEGSustain != float.MaxValue) this.pitchEGSustain = globalRegion.pitchEGSustain; if(globalRegion.pitchEGRelease != float.MaxValue) this.pitchEGRelease = globalRegion.pitchEGRelease; if(globalRegion.pitchEGDepth != short.MaxValue) this.pitchEGDepth = globalRegion.pitchEGDepth; if(globalRegion.pitchEGVel2Delay != float.MaxValue) this.pitchEGVel2Delay = globalRegion.pitchEGVel2Delay; if(globalRegion.pitchEGVel2Attack != float.MaxValue) this.pitchEGVel2Attack = globalRegion.pitchEGVel2Attack; if(globalRegion.pitchEGVel2Hold != float.MaxValue) this.pitchEGVel2Hold = globalRegion.pitchEGVel2Hold; if(globalRegion.pitchEGVel2Decay != float.MaxValue) this.pitchEGVel2Decay = globalRegion.pitchEGVel2Decay; if(globalRegion.pitchEGVel2Sustain != float.MaxValue) this.pitchEGVel2Sustain = globalRegion.pitchEGVel2Sustain; if(globalRegion.pitchEGVel2Release != float.MaxValue) this.pitchEGVel2Release = globalRegion.pitchEGVel2Release; if(globalRegion.pitchEGVel2Depth != short.MaxValue) this.pitchEGVel2Depth = globalRegion.pitchEGVel2Depth; if(globalRegion.pitchLfoDelay != float.MaxValue) this.pitchLfoDelay = globalRegion.pitchLfoDelay; if(globalRegion.pitchLfoFrequency != float.MaxValue) this.pitchLfoFrequency = globalRegion.pitchLfoFrequency; if(globalRegion.pitchLfoDepth != short.MaxValue) this.pitchLfoDepth = globalRegion.pitchLfoDepth; if(globalRegion.filterType != FilterTypeEnum.None) this.filterType = globalRegion.filterType; if(globalRegion.cutOff != float.MaxValue) this.cutOff = globalRegion.cutOff; if(globalRegion.resonance != float.MaxValue) this.resonance = globalRegion.resonance; if (globalRegion.filterKeyTrack != short.MaxValue) this.filterKeyTrack = globalRegion.filterKeyTrack; if (globalRegion.filterKeyCenter != 255) this.filterKeyCenter = globalRegion.filterKeyCenter; if (globalRegion.filterVelTrack != short.MaxValue) this.filterVelTrack = globalRegion.filterVelTrack; if (globalRegion.filterEGDelay != float.MaxValue) this.filterEGDelay = globalRegion.filterEGDelay; if (globalRegion.filterEGStart != float.MaxValue) this.filterEGStart = globalRegion.filterEGStart; if (globalRegion.filterEGAttack != float.MaxValue) this.filterEGAttack = globalRegion.filterEGAttack; if (globalRegion.filterEGHold != float.MaxValue) this.filterEGHold = globalRegion.filterEGHold; if (globalRegion.filterEGDecay != float.MaxValue) this.filterEGDecay = globalRegion.filterEGDecay; if (globalRegion.filterEGSustain != float.MaxValue) this.filterEGSustain = globalRegion.filterEGSustain; if (globalRegion.filterEGRelease != float.MaxValue) this.filterEGRelease = globalRegion.filterEGRelease; if (globalRegion.filterEGDepth != short.MaxValue) this.filterEGDepth = globalRegion.filterEGDepth; if (globalRegion.filterEGVel2Delay != float.MaxValue) this.filterEGVel2Delay = globalRegion.filterEGVel2Delay; if (globalRegion.filterEGVel2Attack != float.MaxValue) this.filterEGVel2Attack = globalRegion.filterEGVel2Attack; if (globalRegion.filterEGVel2Hold != float.MaxValue) this.filterEGVel2Hold = globalRegion.filterEGVel2Hold; if (globalRegion.filterEGVel2Decay != float.MaxValue) this.filterEGVel2Decay = globalRegion.filterEGVel2Decay; if (globalRegion.filterEGVel2Sustain != float.MaxValue) this.filterEGVel2Sustain = globalRegion.filterEGVel2Sustain; if (globalRegion.filterEGVel2Release != float.MaxValue) this.filterEGVel2Release = globalRegion.filterEGVel2Release; if (globalRegion.filterEGVel2Depth != short.MaxValue) this.filterEGVel2Depth = globalRegion.filterEGVel2Depth; if (globalRegion.filterLfoDelay != float.MaxValue) this.filterLfoDelay = globalRegion.filterLfoDelay; if (globalRegion.filterLfoFrequency != float.MaxValue) this.filterLfoFrequency = globalRegion.filterLfoFrequency; if (globalRegion.filterLfoDepth != float.MaxValue) this.filterLfoDepth = globalRegion.filterLfoDepth; if (globalRegion.volume != float.MaxValue) this.volume = globalRegion.volume; if (globalRegion.pan != float.MaxValue) this.pan = globalRegion.pan; if (globalRegion.ampKeyTrack != float.MaxValue) this.ampKeyTrack = globalRegion.ampKeyTrack; if (globalRegion.ampKeyCenter != 255) this.ampKeyCenter = globalRegion.ampKeyCenter; if (globalRegion.ampVelTrack != float.MaxValue) this.ampVelTrack = globalRegion.ampVelTrack; if(globalRegion.ampEGDelay != float.MaxValue) this.ampEGDelay = globalRegion.ampEGDelay; if(globalRegion.ampEGStart != float.MaxValue) this.ampEGStart = globalRegion.ampEGStart; if(globalRegion.ampEGAttack != float.MaxValue) this.ampEGAttack = globalRegion.ampEGAttack; if(globalRegion.ampEGHold != float.MaxValue) this.ampEGHold = globalRegion.ampEGHold; if(globalRegion.ampEGDecay != float.MaxValue) this.ampEGDecay = globalRegion.ampEGDecay; if(globalRegion.ampEGSustain != float.MaxValue) this.ampEGSustain = globalRegion.ampEGSustain; if(globalRegion.ampEGRelease != float.MaxValue) this.ampEGRelease = globalRegion.ampEGRelease; if(globalRegion.ampEGVel2Delay != float.MaxValue) this.ampEGVel2Delay = globalRegion.ampEGVel2Delay; if(globalRegion.ampEGVel2Attack != float.MaxValue) this.ampEGVel2Attack = globalRegion.ampEGVel2Attack; if(globalRegion.ampEGVel2Hold != float.MaxValue) this.ampEGVel2Hold = globalRegion.ampEGVel2Hold; if(globalRegion.ampEGVel2Decay != float.MaxValue) this.ampEGVel2Decay = globalRegion.ampEGVel2Decay; if(globalRegion.ampEGVel2Sustain != float.MaxValue) this.ampEGVel2Sustain = globalRegion.ampEGVel2Sustain; if(globalRegion.ampEGVel2Release != float.MaxValue) this.ampEGVel2Release = globalRegion.ampEGVel2Release; if(globalRegion.ampLfoDelay != float.MaxValue) this.ampLfoDelay = globalRegion.ampLfoDelay; if(globalRegion.ampLfoFrequency != float.MaxValue) this.ampLfoFrequency = globalRegion.ampLfoFrequency; if(globalRegion.ampLfoDepth != float.MaxValue) this.ampLfoDepth = globalRegion.ampLfoDepth; }
public bool LoadTableAndChart(StatSalesType[] modelData, StatTypeEnum statType, ChartTypeEnum chartType, ViewTypeEnum viewType, FilterTypeEnum filterType, bool isCount, bool isUseCodeInName) { try { var parameters = new List <ReportParameter> { new ReportParameter("ChartType", chartType.ToString()), new ReportParameter("Symbol", isCount?" ":"€") }; var reportDataSource = new ReportDataSource { Name = "ChartDataSet", Value = ModelToChartDataService.GetChartData(modelData, statType, viewType, chartType, filterType, isCount, isUseCodeInName) }; _report.Reset(); _report.ProcessingMode = ProcessingMode.Local; _report.LocalReport.ReportEmbeddedResource = "ChartStat.ChartUI.Reports.ReportWithTable.rdlc"; _report.LocalReport.SetParameters(parameters); _report.LocalReport.DataSources.Add(reportDataSource); _report.RefreshReport(); return(true); } catch (Exception) { return(false); } }
public FilterGroup(FilterTypeEnum filterType) : base(filterType) { FilterItems = new List <Filter>(); }
private IQueryable <Statistic> AddFiltersQuery(FilterTypeEnum filter, IQueryable <Statistic> statsQ) { Func <Statistic, bool> f = statistic => true; bool n = false; if (filter.HasFlag(FilterTypeEnum.AW)) { var f1 = f; n = true; f = s => f1(s) && s.Ftr == "A"; //statsQ = statsQ.Where(x => x.Ftr == "A"); } if (filter.HasFlag(FilterTypeEnum.HW)) { var f1 = f; if (n) { f = s => f1(s) || s.Ftr == "H"; } else { f = s => f1(s) && s.Ftr == "H"; } n = true; } if (filter.HasFlag(FilterTypeEnum.AW1)) { var f1 = f; if (n) { f = s => f1(s) || s.Ftag == s.Fthg + 1; } else { f = s => f1(s) && s.Ftag == s.Fthg + 1; } n = true; } if (filter.HasFlag(FilterTypeEnum.HW1)) { var f1 = f; if (n) { f = s => f1(s) || s.Fthg == s.Ftag + 1; } else { f = s => f1(s) && s.Fthg == s.Ftag + 1; } n = true; } if (filter.HasFlag(FilterTypeEnum.AW2)) { var f1 = f; if (n) { f = s => f1(s) || s.Ftag == s.Fthg + 2; } else { f = s => f1(s) && s.Ftag == s.Fthg + 2; } n = true; } if (filter.HasFlag(FilterTypeEnum.HW2)) { var f1 = f; if (n) { f = s => f1(s) || s.Fthg == s.Ftag + 2; } else { f = s => f1(s) && s.Fthg == s.Ftag + 2; } } return(statsQ.Where(x => f(x))); }
public SfzRegion(bool isGlobal) { if (isGlobal) { //Sample Definition sample = null; //Input Controls loChan = 255; hiChan = 255; loKey = 255; hiKey = 255; loVel = 255; hiVel = 255; loBend = short.MaxValue; hiBend = short.MaxValue; loChanAft = 255; hiChanAft = 255; loPolyAft = 255; hiPolyAft = 255; group = int.MaxValue; offBy = int.MaxValue; offMode = (OffModeEnum)int.MaxValue; //Sample Player delay = float.MaxValue; offset = int.MaxValue; end = int.MaxValue; count = int.MaxValue; loopMode = (LoopModeEnum)int.MaxValue; loopStart = int.MaxValue; loopEnd = int.MaxValue; //Pitch transpose = short.MaxValue; tune = short.MaxValue; pitchKeyCenter = short.MaxValue; pitchKeyTrack = short.MaxValue; pitchVelTrack = short.MaxValue; //Pitch EG pitchEGDelay = float.MaxValue; pitchEGStart = float.MaxValue; pitchEGAttack = float.MaxValue; pitchEGHold = float.MaxValue; pitchEGDecay = float.MaxValue; pitchEGSustain = float.MaxValue; pitchEGRelease = float.MaxValue; pitchEGDepth = short.MaxValue; pitchEGVel2Delay = float.MaxValue; pitchEGVel2Attack = float.MaxValue; pitchEGVel2Hold = float.MaxValue; pitchEGVel2Decay = float.MaxValue; pitchEGVel2Sustain = float.MaxValue; pitchEGVel2Release = float.MaxValue; pitchEGVel2Depth = short.MaxValue; //Pitch Lfo pitchLfoDelay = float.MaxValue; pitchLfoFrequency = float.MaxValue; pitchLfoDepth = short.MaxValue; //Filter filterType = FilterTypeEnum.None; cutOff = float.MaxValue; resonance = float.MaxValue; filterKeyTrack = short.MaxValue; filterKeyCenter = 255; filterVelTrack = short.MaxValue; //Filter EG filterEGDelay = float.MaxValue; filterEGStart = float.MaxValue; filterEGAttack = float.MaxValue; filterEGHold = float.MaxValue; filterEGDecay = float.MaxValue; filterEGSustain = float.MaxValue; filterEGRelease = float.MaxValue; filterEGDepth = short.MaxValue; filterEGVel2Delay = float.MaxValue; filterEGVel2Attack = float.MaxValue; filterEGVel2Hold = float.MaxValue; filterEGVel2Decay = float.MaxValue; filterEGVel2Sustain = float.MaxValue; filterEGVel2Release = float.MaxValue; filterEGVel2Depth = short.MaxValue; //Filter Lfo filterLfoDelay = float.MaxValue; filterLfoFrequency = float.MaxValue; filterLfoDepth = float.MaxValue; //Amplifier volume = float.MaxValue; pan = float.MaxValue; ampKeyTrack = float.MaxValue; ampKeyCenter = 255; ampVelTrack = float.MaxValue; //Amplifier EG ampEGDelay = float.MaxValue; ampEGStart = float.MaxValue; ampEGAttack = float.MaxValue; ampEGHold = float.MaxValue; ampEGDecay = float.MaxValue; ampEGSustain = float.MaxValue; ampEGRelease = float.MaxValue; ampEGVel2Delay = float.MaxValue; ampEGVel2Attack = float.MaxValue; ampEGVel2Hold = float.MaxValue; ampEGVel2Decay = float.MaxValue; ampEGVel2Sustain = float.MaxValue; ampEGVel2Release = float.MaxValue; //Amplifier Lfo ampLfoDelay = float.MaxValue; ampLfoFrequency = float.MaxValue; ampLfoDepth = float.MaxValue; } }
private void CheckValidParameters() { //limit cutoff if (CutOff <= 0) FilterMethod = FilterTypeEnum.None; if (RootKey < 0 || RootKey > 127) RootKey = 60; KeyTrack = SynthHelper.Clamp(KeyTrack, (short)0, (short)1200); VelTrack = SynthHelper.Clamp(VelTrack, (short)-9600, (short)9600); }
public SfzRegion(bool isGlobal) { if(isGlobal) { //Sample Definition sample = null; //Input Controls loChan = 255; hiChan = 255; loKey = 255; hiKey = 255; loVel = 255; hiVel = 255; loBend = short.MaxValue; hiBend = short.MaxValue; loChanAft = 255; hiChanAft = 255; loPolyAft = 255; hiPolyAft = 255; group = int.MaxValue; offBy = int.MaxValue; offMode = (OffModeEnum)int.MaxValue; //Sample Player delay = float.MaxValue; offset = int.MaxValue; end = int.MaxValue; count = int.MaxValue; loopMode = (LoopModeEnum)int.MaxValue; loopStart = int.MaxValue; loopEnd = int.MaxValue; //Pitch transpose = short.MaxValue; tune = short.MaxValue; pitchKeyCenter = short.MaxValue; pitchKeyTrack = short.MaxValue; pitchVelTrack = short.MaxValue; //Pitch EG pitchEGDelay = float.MaxValue; pitchEGStart = float.MaxValue; pitchEGAttack = float.MaxValue; pitchEGHold = float.MaxValue; pitchEGDecay = float.MaxValue; pitchEGSustain = float.MaxValue; pitchEGRelease = float.MaxValue; pitchEGDepth = short.MaxValue; pitchEGVel2Delay = float.MaxValue; pitchEGVel2Attack = float.MaxValue; pitchEGVel2Hold = float.MaxValue; pitchEGVel2Decay = float.MaxValue; pitchEGVel2Sustain = float.MaxValue; pitchEGVel2Release = float.MaxValue; pitchEGVel2Depth = short.MaxValue; //Pitch Lfo pitchLfoDelay = float.MaxValue; pitchLfoFrequency = float.MaxValue; pitchLfoDepth = short.MaxValue; //Filter filterType = FilterTypeEnum.None; cutOff = float.MaxValue; resonance = float.MaxValue; filterKeyTrack = short.MaxValue; filterKeyCenter = 255; filterVelTrack = short.MaxValue; //Filter EG filterEGDelay = float.MaxValue; filterEGStart = float.MaxValue; filterEGAttack = float.MaxValue; filterEGHold = float.MaxValue; filterEGDecay = float.MaxValue; filterEGSustain = float.MaxValue; filterEGRelease = float.MaxValue; filterEGDepth = short.MaxValue; filterEGVel2Delay = float.MaxValue; filterEGVel2Attack = float.MaxValue; filterEGVel2Hold = float.MaxValue; filterEGVel2Decay = float.MaxValue; filterEGVel2Sustain = float.MaxValue; filterEGVel2Release = float.MaxValue; filterEGVel2Depth = short.MaxValue; //Filter Lfo filterLfoDelay = float.MaxValue; filterLfoFrequency = float.MaxValue; filterLfoDepth = float.MaxValue; //Amplifier volume = float.MaxValue; pan = float.MaxValue; ampKeyTrack = float.MaxValue; ampKeyCenter = 255; ampVelTrack = float.MaxValue; //Amplifier EG ampEGDelay = float.MaxValue; ampEGStart = float.MaxValue; ampEGAttack = float.MaxValue; ampEGHold = float.MaxValue; ampEGDecay = float.MaxValue; ampEGSustain = float.MaxValue; ampEGRelease = float.MaxValue; ampEGVel2Delay = float.MaxValue; ampEGVel2Attack = float.MaxValue; ampEGVel2Hold = float.MaxValue; ampEGVel2Decay = float.MaxValue; ampEGVel2Sustain = float.MaxValue; ampEGVel2Release = float.MaxValue; //Amplifier Lfo ampLfoDelay = float.MaxValue; ampLfoFrequency = float.MaxValue; ampLfoDepth = float.MaxValue; } }
public FilterItem(FilterTypeEnum filterType, FilterValueOperatorEnum valueOperator, string displayText = null) { FilterType = filterType; ValueOperator = valueOperator; DisplayText = displayText; }