Beispiel #1
0
 public ReElement(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         _Value = info.GetString("_Value");
     }
     catch
     {
         _Value = string.Empty;
     }
     try
     {
         _Frequence = info.GetInt32("_Frequence");
     }
     catch
     {
         _Frequence = 0;
     }
     try
     {
         _FilterType = (Webb.Data.FilterTypes)info.GetValue("_FilterType", typeof(Webb.Data.FilterTypes));
     }
     catch
     {
         _FilterType = FilterTypes.NumGreaterOrEqual;
     }
     try
     {
         _FollowedOperand = (Webb.Data.FilterOperands)info.GetValue("_FollowedOperand", typeof(Webb.Data.FilterOperands));
     }
     catch
     {
         _FollowedOperand = FilterOperands.Or;
     }
 }
 public FilterItem(FilterTypes type, List <string> values, string field, int row)
 {
     this.fiType  = type;
     this.fiValue = values;
     this.fiField = field;
     this.rowID   = row;
 }
Beispiel #3
0
        private static Predicate CreateDelegate(FilterTypes filters)
        {
            //Sort predicates by heaviness

            Expression  resultExpression = null;
            FilterTypes sexStatusFilter  = (filters & FilterTypes.sex_status_all_types);

            if (sexStatusFilter != FilterTypes.empty)
            {
                resultExpression = ExpressionCache[sexStatusFilter];
            }

            filters = filters.ResetFlags(sexStatusFilter);

            foreach (FilterTypes filterType in filters.EnumerateSetFlags())
            {
                var expression = ExpressionCache[filterType];

                if (resultExpression == null)
                {
                    resultExpression = expression;
                }
                else
                {
                    resultExpression = Expression.AndAlso(resultExpression, expression);
                }
            }

            return(Expression
                   .Lambda <Predicate>(resultExpression, AccountParameter, QueryParameter)
                   .Compile(false));
        }
Beispiel #4
0
        /// <summary>
        /// Creates an instance of IIRFilter class
        /// </summary>
        /// <param name="type">Filter type</param>
        /// <param name="order">Filter order</param>
        /// <param name="cutoffFrequency">Filter cutoff frequency in radians per second</param>
        /// <param name="samplingPeriod">Filter sampling period</param>
        public IIRFilter(FilterTypes type, int order, double cutoffFrequency, double samplingPeriod)
        {
            aCoef = new double[2];
            bCoef = new double[2];

            FilterType = type;

            switch (type)
            {
            case FilterTypes.Butterworth:

                ComputeButterworth(
                    Order = order,
                    CutoffFrequencyRadpS = cutoffFrequency,
                    SamplingPeriod_s     = samplingPeriod);
                break;

            default:
                throw new NotImplementedException("Other filter types are not implemented yet.");
            }

            numberCoefficients = aCoef.Length;

            x = new double[numberCoefficients];
            y = new double[numberCoefficients];
        }
Beispiel #5
0
 public FilterData(FilterTypes _ftype, double Fsample, int order1, double F3db1, int order2, double F3db2)
 {
     _DataSeries = new XyDataSeries <double, double>();
     nLastIndex  = 0;
     _filtertype = _ftype;
     if (_filtertype == FilterTypes.FIRLowPass)
     {
         _firLowPass = new LowpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRLP_MA)
     {
         _firLowPass     = new LowpassFilterButterworthImplementation(F3db1, order1, Fsample);
         _OriginalValues = new List <double>();
     }
     else if (_filtertype == FilterTypes.FIRHighPass)
     {
         _firHighPass = new HighpassFilterButterworthImplementation(F3db1, order1, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRBandPass)
     {
         _firBandPass = new BandpassFilterButterworthImplementation(F3db1, order1, F3db2, order2, Fsample);
     }
     else if (_filtertype == FilterTypes.FIRBP_MA)
     {
         _firBandPass    = new BandpassFilterButterworthImplementation(F3db1, order1, F3db2, order2, Fsample);
         _OriginalValues = new List <double>();
     }
 }
Beispiel #6
0
        /// <summary>
        /// Закрытый метод создания объекта поиска по аттрибуту в определнной группе объектов
        /// </summary>
        /// <param name="objecteId">Id объекта для фильтра значения</param>
        /// <param name="attributeId">значение для поиска</param>
        /// <param name="filterTypes">Фильтр типа(по родительскому каталогу или по Id класса объекта)</param>
        /// <param name="searchConditionType">Параметр условия поиска, значение Enum указывает по какому критерию будет поиск</param>
        /// <param name="searchOperatorType">Оператор операции поиска</param>
        /// <returns>Список объектов FindObject</returns>
        private FindObject MakeFindObject(string objectId, string attributeId, FilterTypes filterTypes, SearchConditionType searchConditionType, SearchOperatorType searchOperatorType)
        {
            var newFindObject = new FindObject();

            var findObject = new FindObject
            {
                Filters = new Filter[]
                {
                    new Filter()
                    {
                        Type  = (int)filterTypes,
                        Value = objectId
                    }
                },

                Conditions = new Condition[]
                {
                    new Condition {
                        Type      = (int?)searchConditionType,
                        Operator  = (int?)searchOperatorType,
                        Attribute = attributeId
                    }
                }
            };

            return(findObject);
        }
        public List <Marker> GetFilterMarkersByFilterType(FilterTypes filterType, int min, int max)
        {
            CreateMarkersList();

            switch (filterType)
            {
            case FilterTypes.FilterByMagnitude: {
                return(GetFilterMarkersByMagnitude(min, max));
            }

            case FilterTypes.FilterByTsunamiOccured: {
                return(GetFilterMarkersByTsunamiOccured());
            }

            case FilterTypes.FilterByYear: {
                return(GetFilterMarkersByYearOccurred(min, max));
            }

            case FilterTypes.FilterByNumInjured: {
                return(GetFilterMarkersByNumOfInjured(min, max));
            }

            case FilterTypes.FilterByNumDeaths: {
                return(GetFilterMarkersByNumOfDeath(min, max));
            }

            default: {
                return(null);
            }
            }
        }
        /// <summary>
        /// The get WIN-USB Devices Attached.
        /// </summary>
        /// <param name="filter">
        /// The filter.
        /// </param>
        /// <param name="filterType">
        /// The type of Filter
        /// </param>
        /// <returns>
        /// The <see cref="Enumerable"/>.
        /// </returns>
        public static IList <UsbDeviceFound> GetWinUsbAddresses(object filter, FilterTypes filterType)
        {
            var devices = NativeMethods.GetWinUsbObjects();

            switch (filterType)
            {
            case FilterTypes.ProductId:
                var pid = Convert.ToUInt16(filter);
                if (pid > 0)
                {
                    return(devices.Where(x => x.ProductId == pid)
                           .Select(x => new UsbDeviceFound(x)).ToList());
                }

                break;

            case FilterTypes.VendorId:
                var vid = Convert.ToUInt16(filter);
                if (vid > 0)
                {
                    return(devices.Where(x => x.VendorId == vid)
                           .Select(x => new UsbDeviceFound(x)).ToList());
                }

                break;

            case FilterTypes.DeviceName:
                return(devices.Where(x => x.DevicePath.ToLower().Contains(filter.ToString().ToLower()))
                       .Select(x => new UsbDeviceFound(x)).ToList());
            }

            return(new UsbDeviceFound[0]);
        }
 public FuzzerFilter()
 {
     Name = string.Empty;
     FilterType = FilterTypes.Include;
     ConditionType = ConditionTypes.ResponseHTML;
     ConditionValue = string.Empty;
 }
Beispiel #10
0
        public static FilterTypes GetDateTimeFilterType(string strFilterType)
        {
            FilterTypes filterType = FilterTypes.NumLess;

            switch (strFilterType)
            {
            case  "=":
                filterType = FilterTypes.NumEqual;
                break;

            case ">":
                filterType = FilterTypes.NumGreater;
                break;

            case ">=":
                filterType = FilterTypes.NumGreaterOrEqual;
                break;

            case "<":
                filterType = FilterTypes.NumLess;
                break;

            case "<=":
            default:
                filterType = FilterTypes.NumLessOrEqual;
                break;
            }

            return(filterType);
        }
Beispiel #11
0
        /* create a new filter specification record */
        public static OneFilterRec NewSingleFilterSpec(FilterTypes FilterType)
        {
            OneFilterRec Spec = new OneFilterRec();

            Spec.CutoffEnvelope           = NewEnvelope();
            Spec.BandwidthOrSlopeEnvelope = NewEnvelope();
            Spec.OutputEnvelope           = NewEnvelope();
            Spec.CutoffLFO           = NewLFOListSpecifier();
            Spec.BandwidthOrSlopeLFO = NewLFOListSpecifier();
            Spec.OutputLFO           = NewLFOListSpecifier();
            Spec.GainEnvelope        = NewEnvelope();
            Spec.GainLFO             = NewLFOListSpecifier();
            //InitializeAccentZero(out Spec.CutoffAccent);
            //InitializeAccentZero(out Spec.BandwidthOrSlopeAccent);
            //InitializeAccentZero(out Spec.GainAccent);
            //InitializeAccentZero(out Spec.OutputMultiplierAccent);
            Spec.FilterType    = FilterType;
            Spec.FilterScaling = FilterScalings.eFilterDefaultScaling;
            Spec.Channel       = FilterChannels.eFilterBoth;
            Spec.LowpassOrder  = 2;
            Spec.BandpassOrder = 2;
            //Spec.Cutoff = 0;
            //Spec.BandwidthOrSlope = 0;
            //Spec.Gain = 0;
            Spec.OutputMultiplier = 1;
            //Spec.CutoffFormula = null;
            //Spec.BandwidthOrSlopeFormula = null;
            //Spec.GainFormula = null;
            //Spec.OutputMultiplierFormula = null;

            return(Spec);
        }
Beispiel #12
0
        public FilterNodeParser(IDocumentRequestor documentRequester, FilterTypes filterType) : base(documentRequester)
        {
            switch (filterType)
            {
            case FilterTypes.Air:
                filterNodeSelector = $"div[@class='partRow parts_airfilter']";
                break;

            case FilterTypes.Oil:
                filterNodeSelector = $"div[@class='partRow parts_oilFilter']";
                break;

            case FilterTypes.Fuel:
                filterNodeSelector = $"div[@class='partRow parts_fuelFilter']";
                break;

            case FilterTypes.Interior:
                filterNodeSelector = $"div[@class='partRow parts_cabinAisFilter']";
                break;

            case FilterTypes.Other:
                filterNodeSelector = $"div[@class='partRow parts_otherFilter']";
                break;
            }
        }
Beispiel #13
0
        void DrawTopBar()
        {
            EditorGUILayout.BeginHorizontal("box");

            if (GUILayout.Button("Get Data By Count") && filterTypes != FilterTypes.limit)
            {
                filterTypes = FilterTypes.limit;  //Change the active filter so we know to draw the correct buttons and fields
                DisplayMethods.sessionId.Clear(); //Clear the static sessions we have stored from the last filter set
                DisplayMethods.sessionsMovmentData.Clear();
            }

            if (GUILayout.Button("Get Data By Date") && filterTypes != FilterTypes.date)
            {
                filterTypes = FilterTypes.date;
                DisplayMethods.sessionId.Clear();
                DisplayMethods.sessionsMovmentData.Clear();
            }

            if (GUILayout.Button("Get Data By Tag") && filterTypes != FilterTypes.sessionTag)
            {
                filterTypes = FilterTypes.sessionTag;
                DisplayMethods.sessionId.Clear();
                DisplayMethods.sessionsMovmentData.Clear();
            }

            EditorGUILayout.EndHorizontal();
        }
Beispiel #14
0
        public void RegisterFilter(FilterTypes type, ThingItemFilter filter)
        {
            ThingItemFilterCategory result = _filters.FirstOrDefault(f => f.FilterType == type);

            if (result == null)
            {
                var category = new ThingItemFilterCategory {
                    FilterType = type
                };
                category.Filters.Add(filter);
                filter.Category = category;

                _filters.Add(category);

                return;
            }

            ThingItemFilter storedFilter = result.Filters.FirstOrDefault(f => f.Id.Equals(filter.Id));

            if (storedFilter != null)
            {
                storedFilter.Active = true;

                return;
            }

            filter.Category = result;
            result.Filters.Add(filter);
        }
Beispiel #15
0
 public FilterData(FilterTypes _ftype)
 {
     _DataSeries     = new XyDataSeries <double, double>();
     _OriginalValues = new List <double>();
     nLastIndex      = 0;
     _filtertype     = _ftype;
 }
 public FuzzerFilter()
 {
     Name           = string.Empty;
     FilterType     = FilterTypes.Include;
     ConditionType  = ConditionTypes.ResponseHTML;
     ConditionValue = string.Empty;
 }
        public void Filter(OperationType[] filter)
        {
            FilterTypes.Clear();
            FilterTypes.AddRange(filter);

            Control_Loaded(this, null);
        }
        public OperationsControl()
        {
            InitializeComponent();

            OperationsView.Source = OperationsList;

            OperationsView.View.Filter = (o) =>
            {
                var op = o as Operation;

                if (op.ForcedType != null)
                {
                    return(FilterTypes.Contains(op.ForcedType));
                }
                else if (op.ForcedEntity != null)
                {
                    return(FilterTypes.Contains(op.ForcedEntity.Type));
                }
                else if (op.AutoEntity != null)
                {
                    return(FilterTypes.Contains(op.AutoEntity.Type));
                }
                else
                {
                    return(FilterTypes.Contains(OperationType.Empty));
                }
            };

            operationsDataGrid.ItemsSource = OperationsView.View;
        }
Beispiel #19
0
        //Returns the filter to be set depending on the filters that are already set
        //From filter [2,5]
        public int GetLowestFilterIndex(FilterTypes desired, int filter)
        {
            string[] filterArr = new string[4];
            int[] filtIndex = { 0, 0, 0, 0 };
            if (desired == FilterTypes.FIR_Comb_Filter) filtIndex = new int[] { 13089, 13090, 13091, 13092 };
            else if (desired == FilterTypes.FIR_Moving_Average) filtIndex = new int[] { 13105, 13106, 13107, 13108 };
            else if (desired == FilterTypes.No_Filter) return 0;

            int returnIndex = 0;
            
            filterArr[0] = _connection.ReadIntegerFromBuffer(JetBusCommands.DSEFilterModeStage2).ToString();
            filterArr[1] = _connection.ReadIntegerFromBuffer(JetBusCommands.DSEFilterModeStage3).ToString();
            filterArr[2] = _connection.ReadIntegerFromBuffer(JetBusCommands.DSEFilterModeStage4).ToString();
            filterArr[3] = _connection.ReadIntegerFromBuffer(JetBusCommands.DSEFilterModeStage5).ToString();

            for(int i = 0; i < 4; i++)
            {
                if (!filterArr.Contains(filtIndex[i].ToString()))
                {
                    returnIndex = filtIndex[i];
                    break;
                }
            }     
            
            return returnIndex;
        }
Beispiel #20
0
        public FilterCommand(Sprite sprite) : base("filter", "filters")
        {
            const float Gamma = 2.2f;

            this.sprite = sprite;

            currentType = FilterTypes.None;

            // See https://github.com/nvkelso/color-oracle-java/blob/master/src/ika/colororacle/Simulator.java.
            var gammaToLinear = new int[256];
            var linearToGamma = new int[256];

            for (int i = 0; i < gammaToLinear.Length; i++)
            {
                var f = 0.992052f * (float)Math.Pow(i / 255f, Gamma) + 0.003974f;

                gammaToLinear[i] = (int)(f * 32767);
                linearToGamma[i] = (int)(255 * Math.Pow(i / 255f, 1 / Gamma));
            }

            shader = new Shader();
            shader.Attach(ShaderTypes.Vertex, "Sprite.vert");
            shader.Attach(ShaderTypes.Fragment, "Accessibility/Colorblind.frag");
            shader.AddAttribute <float>(2, GL_FLOAT);
            shader.AddAttribute <float>(2, GL_FLOAT);
            shader.AddAttribute <byte>(4, GL_UNSIGNED_BYTE, true);
            shader.Initialize();
            shader.Use();
            shader.SetUniform("gammaToLinear", gammaToLinear);
            shader.SetUniform("linearToGamma", linearToGamma);
        }
        public static double[,] GetFilterMatrix(FilterTypes type)
        {
            double[,] result = null;
            switch (type)
            {
            case FilterTypes.Laplacian3:
                result = Laplacian_3;
                break;

            case FilterTypes.Laplacian5:
                result = Laplacian_5;
                break;

            case FilterTypes.Gaussian3:
                result = Gaussian_3;
                break;

            case FilterTypes.Gaussian5:
                result = Gaussian_5;
                break;

            case FilterTypes.GaussianLaplacian:
                result = GaussianLaplacian;
                break;
            }
            return(result);
        }
        private async void LoadInit()
        {
            var listDepartamnets = GetQueryableDepartament().Result;

            //var listEstados = GetQueryableElementos().Result;
            Departamentos   = listDepartamnets.ToList();
            Departamento_Id = -1;



            //Tipo Filtros
            FilterTypes.Add(new ViewModelFilterType {
                Id     = 1,
                Nombre = "Buscar por numero apoyo"
            });

            FilterTypes.Add(new ViewModelFilterType {
                Id     = 2,
                Nombre = "Buscar por codigo apoyo"
            });

            FilterTypes.Add(new ViewModelFilterType {
                Id     = 3,
                Nombre = "Buscar por ciudad"
            });

            await InitLoadElementos();
        }
Beispiel #23
0
        public void Filter(OperationType[] filter)
        {
            FilterTypes.Clear();
            FilterTypes.AddRange(filter);

            TotalsView.View.Refresh();
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="inFilter"></param>
 /// <param name="activeType"></param>
 /// <param name="isReadOnly"></param>
 public FilterCollection(IDrawingFilter inFilter, FilterTypes activeType, bool isReadOnly)
 {
     _filter = inFilter;
     _activeType = activeType;
     _isReadOnly = isReadOnly;
     Configure();
 }
Beispiel #25
0
        public static string FilterTypeToString(FilterTypes type)
        {
            switch (type)
            {
            case FilterTypes.Ingredients:
                return(Strings.Filter_Ingredient);

            case FilterTypes.PrepTime:
                return(Strings.Filter_PrepTime);

            case FilterTypes.CookTime:
                return(Strings.Filter_CookTime);

            case FilterTypes.Cuisine:
                return(Strings.Filter_Cuisine);

            case FilterTypes.PrepStyle:
                return(Strings.Filter_PrepStyle);

            case FilterTypes.MealType:
                return(Strings.Filter_MealType);

            default:
                return(type.ToString());
            }
        }
Beispiel #26
0
        /// <summary>
        /// Finds the matchmaking information
        /// </summary>
        /// <param name="ignoreBots">Should bots be ignored?</param>
        /// <param name="steamInfo">Should steam info be shown?</param>
        /// <returns>Formatted string with information</returns>
        private string getMatchmakingInfoAsString(bool ignoreBots, bool steamInfo, FilterTypes filter)
        {
            offsets.RenewOffsets();
            if (!offsets.IsIngame())
            {
                return("Not ingame");
            }

            List <Offsets.Player> playerList = offsets.GetPlayers(ignoreBots, filter);

            if (playerList == null)
            {
                return("No valid player was found");
            }

            string temp = "";

            for (int i = 0; i < playerList.Count; i++)
            {
                if (playerList[i].name.Length <= 0)
                    continue; }

                temp += "[" + (i + 1) + "]        " + (i + 1 < 10 ? " " : "") + playerList[i].name + " \n";
                temp += "Rank:       " + Offsets.RANKS[playerList[i].rank] + "\n";
                temp += "Wins:       " + playerList[i].winCount + "\n";
                if (steamInfo)
                {
                    temp += "SteamID:    " + playerList[i].steamID + "\n";
                    temp += "SteamID3:   " + playerList[i].steamID3 + "\n";
                    temp += "SteamID64:  " + playerList[i].steamID64 + "\n";
                    temp += "Profile:    " + playerList[i].profileLink + "\n";
                }
                if (i + 1 < playerList.Count)
                    temp += "\n\n"; }
        private FilterNodeModel addFilterInfo(ModelDetailDocumentRequestor mdDR, FilterTypes filterType)
        {
            FilterNodeParser fnParser = new FilterNodeParser(mdDR, filterType);
            FilterNodeModel  fnModel  = fnParser.Parse();

            return(fnModel);
        }
        private FilterTypes filterType;     //тип фильтрации

        public FilterNode(string fieldName, FilterTypes filterType, string fieldValue, string secondFieldValue = "")
        {
            this.fieldName        = fieldName;
            this.fieldValue       = fieldValue;
            this.secondFieldValue = secondFieldValue;
            this.filterType       = filterType;
        }
Beispiel #29
0
        /// <summary>
        /// Creates an instance of IIRFilter class
        /// </summary>
        /// <param name="type">Filter type</param>
        /// <param name="order">Filter order</param>
        /// <param name="cutoffFrequency">Filter cutoff frequency in radians per second</param>
        /// <param name="samplingPeriod">Filter sampling period</param>
        public IIRFilter(FilterTypes type, int order, float cutoffFrequency, float samplingPeriod)
        {
            NCoef = order;
            A     = new ArrayList();
            B     = new ArrayList();

            FilterType = type;

            switch (type)
            {
            case FilterTypes.Butterworth:
                ComputeButterworth(
                    Order = order,
                    CutoffFrequencyRadpS = cutoffFrequency,
                    SamplingPeriod_s     = samplingPeriod);
                break;

            default:
                throw new NotImplementedException("Other filter types are not implemented yet.");
            }

            NCoef = A.Count - 1;
            ACoef = A;
            BCoef = B;
            x     = new ArrayList();
            y     = new ArrayList();
            for (int i = 0; i <= NCoef; i++)
            {
                x.Add(0.0);
                y.Add(0.0);
            }
        }
		public ToolBarFilters (FilterTypes filter)
		{
			BindingContext = new FilterViewModel(filter);
			Title = ViewModel.Title;
		

			listView = new ListView () {
				ItemsSource = ViewModel.Items,
				BackgroundColor = Color.Transparent,
				ItemTemplate = new DataTemplate (() => {
					Label titleLabel = new Label ();
					titleLabel.VerticalOptions = LayoutOptions.Center;
					titleLabel.SetBinding (Label.TextProperty, "Name");

					Image blueCheck = new Image ();
					blueCheck.Source = "corningimages/selected.png";
					blueCheck.WidthRequest = 18;
					blueCheck.HeightRequest = 18;
					blueCheck.HorizontalOptions = LayoutOptions.EndAndExpand;
					blueCheck.SetBinding (Image.IsVisibleProperty, "IsSelected");

					return new ViewCell {
						View = new StackLayout {
							Orientation = StackOrientation.Horizontal,
							HorizontalOptions = LayoutOptions.StartAndExpand,
							Padding = new Thickness(20,0,10,0),
							Children = { titleLabel, blueCheck }
						}
					};
				})
			};
					

			listView.ItemSelected += (sender, e) =>
			{
				if (e.SelectedItem == null)
					return;

				var item =(MultiSelectSource)e.SelectedItem;
				if(filter == FilterTypes.Categories){
					GlobalVariables.SelectedCategory = item.Name;
					GlobalVariables.SelectedCategoryCode = item.Code;
				} else {
					GlobalVariables.SelectedLanguage = item.Code;
				}
				Navigation.PopModalAsync (true);
			};


			Content = new StackLayout { 
				Children = {
					listView
				}
			};

			this.ToolbarItems.Add (new ToolbarItem (Translation.Localize("DoneLabel"), null, () => {
				Navigation.PopModalAsync (true);
			}));
		}
 /// <summary>
 /// Creates a new instance of FilterCollection, where the current state of the filter is
 /// recorded as the kind of "collection" that this item belongs to.  The filter can be
 /// altered later, and this will retain the original state.
 /// </summary>
 public FeatureSelection(IFeatureSet featureSet, IDrawingFilter inFilter, FilterTypes activeType)
 {
     _filter = inFilter;
     _activeType = activeType;
     _selectionState = true;
     _featureSet = featureSet;
     Configure();
 }
 public FilterDefinition(FilterKinds kind, FilterTypes type, FilterActions action, string param)
 {
     Id = Guid.NewGuid();
     Kind = kind;
     Type = type;
     Action = action;
     Parameter = param;
 }
Beispiel #33
0
 public GeoFilter(string fieldName, FilterTypes filterType, params GeoTerm[] terms) : base(fieldName, filterType)
 {
     if (string.IsNullOrEmpty(fieldName))
     {
         throw new InvalidOperationException("The field name cannot be empty in geoqueries");
     }
     Terms = terms;
 }
Beispiel #34
0
 internal void AddFilesFilterPatterns(
     FilterTypes type,
     FilterActions action,
     FilterOperationType operation)
 {
     ((IAssetFilesFilterPatternsMenuOperations)mAssetOperations)
     .AddFilesFilterPatterns(type, action, operation);
 }
Beispiel #35
0
        /// <summary>
        ///  Метод поиска по классу объекта
        /// </summary>
        /// <param name="objectId">Id класса объекта для поиска</param>
        /// <param name="filterTypes">Фильтр типа(по родительскому каталогу или по Id класса объекта)</param>
        /// <param name="address">Относительный адрес API сервиса (опциональное значение)</param>
        /// <returns></returns>
        public async Task <List <Result> > SearchObjectAsync(string objectId, FilterTypes filterTypes, string address = @"api/objects/search")
        {
            var findObject = MakeFindObject(objectId, filterTypes);

            var results = await Request(findObject, address);

            return(results);
        }
		public FilterViewModel (FilterTypes filter)
		{
			CurrentFilter = filter;
			if (filter == FilterTypes.Categories) {
				Title = Translation.Localize("CategoriesTitle");

			} else {
				Title = Translation.Localize("LanguagesTitle");
			}
		}
        // Constructor
        public MathMorphologyForm(FilterTypes filterType)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // filter type
            this.filterType = filterType;

            if (filterType == FilterTypes.Simple)
            {
                legendLabel.Text = "1 - foreground, -1 - don't care";

                this.operatorCombo.Items.AddRange(new object[] {
                                                                   "Errosion",
                                                                   "Dilatation",
                                                                   "Opening",
                                                                   "Closing"});
            }
            else
            {
                legendLabel.Text = "1 - foreground, 0 - background, -1 - don't care";

                this.operatorCombo.Items.AddRange(new object[] {
                                                                   "Hit And Miss",
                                                                   "Thickening",
                                                                   "Thinning"});
            }

            // default kernel
            se = new short[3, 3] {
                                             {1, 1, 1},
                                             {1, 1, 1},
                                             {1, 1, 1}};
            grid.LoadData(se);

            // add kernel sizes
            foreach (int size in sizes)
            {
                string	item = size.ToString() + " x " + size.ToString();
                this.sizeCombo.Items.Add((object) item);
            }

            // default size
            this.sizeCombo.SelectedIndex = 0;

            // default kernel
            this.operatorCombo.SelectedIndex = 0;
        }
Beispiel #38
0
        public static IEnumerable<IChemicalFormula> Validate(this IEnumerable<IChemicalFormula> formulas, FilterTypes filters = FilterTypes.All)
        {
            bool useValence = filters.HasFlag(FilterTypes.Valence);
            bool useHydrogenCarbonRatio = filters.HasFlag(FilterTypes.HydrogenCarbonRatio);

            foreach (IChemicalFormula formula in formulas)
            {
                if (useHydrogenCarbonRatio)
                {
                    double ratio = formula.ChemicalFormula.GetCarbonHydrogenRatio();

                    if (ratio < 0.5 || ratio > 2.0)
                        continue;
                }

                if (useValence)
                {
                    int totalValence = 0;
                    int maxValence = 0;
                    int oddValences = 0;
                    int atomCount = 0;
                    int[] isotopes = formula.ChemicalFormula.GetIsotopes();
                    for (int i = 0; i < isotopes.Length; i++)
                    {
                        int numAtoms = isotopes[i];
                        if (numAtoms != 0)
                            continue;
                        Isotope isotope = PeriodicTable.GetIsotope(i);

                        int numValenceElectrons = isotope.ValenceElectrons;
                        totalValence += numValenceElectrons*numAtoms;
                        atomCount += numAtoms;
                        if (numValenceElectrons > maxValence)
                        {
                            maxValence = numValenceElectrons;
                        }
                        if (numValenceElectrons%2 != 0)
                        {
                            oddValences += numAtoms;
                        }
                    }
                    if (!((totalValence%2 == 0 || oddValences%2 == 0) && (totalValence >= 2*maxValence) && (totalValence >= ((2*atomCount) - 1))))
                    {
                        continue;
                    }
                }

                yield return formula;
            }
        }
Beispiel #39
0
        public SyncFolder(string pFolderPath)
        {
            FolderPath = pFolderPath;
            LastSync = new DateTime(2000, 1, 1);

            SetId = "";
            SetTitle = "";
            SetDescription = "";
            SyncMethod = StringToMethod(Properties.Settings.Default.Method);
            FilterType = FilterTypes.FilterNone;
            FilterTags = "";
            FilterStarRating = 0;
            Permission = FlickrSync.Permissions.PermDefault;
            NoDelete = Properties.Settings.Default.NoDelete;
            NoDeleteTags = Properties.Settings.Default.NoDeleteTags;
            OrderType = OrderTypes.OrderDefault;
            NoInitialReplace = false;
        }
Beispiel #40
0
        private void Initializer()
        {
            _Filter = new FilterCollection();

            _FilterType = FilterTypes.NoFilter;
            _Errors = new ErrorCollection();

            _TextFrames = new FramesCollection<TextFrame>();
            _UserTextFrames = new FramesCollection<UserTextFrame>();
            _PrivateFrames = new FramesCollection<PrivateFrame>();
            _TermOfUseFrames = new FramesCollection<TermOfUseFrame>();
            _TextWithLangFrames = new FramesCollection<TextWithLanguageFrame>();
            _SynchronisedTextFrames = new FramesCollection<SynchronisedText>();
            _AttachedPictureFrames = new FramesCollection<AttachedPictureFrame>();
            _EncapsulatedObjectFrames = new FramesCollection<GeneralFileFrame>();
            _PopularimeterFrames = new FramesCollection<PopularimeterFrame>();
            _AudioEncryptionFrames = new FramesCollection<AudioEncryptionFrame>();
            _LinkFrames = new FramesCollection<LinkFrame>();
            _DataWithSymbolFrames = new FramesCollection<DataWithSymbolFrame>();
            _UnknownFrames = new FramesCollection<BinaryFrame>();
        }
 public DynamicFilteredTextBoxXml(string text, string name, bool isRequired, string errorMessage, string validationGroup, double width, double height, int maxLength,
     FilterTypes filterType, FilterModes filterMode, int filterInterval, string validChars, string invalidChars,
     DynamicLabel label, string css, string style, bool visible)
 {
     _text = text;
     Name = name;
     _isRequired = isRequired;
     _errorMessage = errorMessage;
     _validationGroup = validationGroup;
     _width = width;
     _height = height;
     _maxLength = maxLength;
     _filterType = filterType;
     _filterMode = filterMode;
     _filterInterval = filterInterval;
     _validChars = validChars;
     _invalidChars = invalidChars;
     Label = label;
     Css = css;
     Style = style;
     Visible = visible;
 }
 public bool set_filters(FilterTypes filters)
 {
     try
     {
         lock (syncroot)
         {
             if (clientInitialized)
             {
                 iaxc_set_filters(filters);
                 return true;
             }
             else
             {
                 return false;
             }
         }
     }
     catch (Exception ex)
     {
         System.Console.WriteLine("Error in function call: " + ex.Message + " -- " + ex.StackTrace);
     }
     return false;
 }
 public static extern int MagickResizeImage(IntPtr magick_wand, uint columns, uint rows, FilterTypes filter, double blur);
Beispiel #44
0
 public LayoutField(string name, FilterTypes type, object[] values)
 {
     Name = name;
     Type = type;
     Values = values;
 }
Beispiel #45
0
        public void LoadFromXPath(XPathNavigator nav)
        {
            nav.MoveToFirstChild();

            do
            {
                if (nav.Name == "FolderPath") FolderPath = XmlDecode(nav.Value);
                else if (nav.Name == "LastSync")
                {
                    try
                    {
                        LastSync = DateTime.ParseExact(nav.Value, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
                    }
                    catch (Exception)
                    {
                        LastSync = DateTime.Parse(nav.Value); //old method
                    }
                }
                else if (nav.Name == "SetId") SetId = nav.Value;
                else if (nav.Name == "SetTitle") SetTitle = XmlDecode(nav.Value);
                else if (nav.Name == "SetDescription") SetDescription = XmlDecode(nav.Value);
                else if (nav.Name == "SyncMethod")
                {
                    if (nav.Value == "SyncFilename") SyncMethod = SyncFolder.Methods.SyncFilename;
                    else if (nav.Value == "SyncDateTaken") SyncMethod = SyncFolder.Methods.SyncDateTaken;
                    else if (nav.Value == "SyncTitleOrFilename") SyncMethod = SyncFolder.Methods.SyncTitleOrFilename;
                }
                else if (nav.Name == "FilterType")
                {
                    if (nav.Value == "FilterNone") FilterType = SyncFolder.FilterTypes.FilterNone;
                    else if (nav.Value == "FilterIncludeTags") FilterType = SyncFolder.FilterTypes.FilterIncludeTags;
                    else if (nav.Value == "FilterStarRating") FilterType = SyncFolder.FilterTypes.FilterStarRating;
                }
                else if (nav.Name == "FilterTags") FilterTags = nav.Value;
                else if (nav.Name == "FilterStarRating") FilterStarRating = nav.ValueAsInt;
                else if (nav.Name == "Permissions")
                {
                    if (nav.Value == "PermDefault") Permission = FlickrSync.Permissions.PermDefault;
                    else if (nav.Value == "PermPublic") Permission = FlickrSync.Permissions.PermPublic;
                    else if (nav.Value == "PermFamilyFriends") Permission = FlickrSync.Permissions.PermFamilyFriends;
                    else if (nav.Value == "PermFriends") Permission = FlickrSync.Permissions.PermFriends;
                    else if (nav.Value == "PermFamily") Permission = FlickrSync.Permissions.PermFamily;
                    else if (nav.Value == "PermPrivate") Permission = FlickrSync.Permissions.PermPrivate;
                }
                else if (nav.Name == "NoDelete") NoDelete = nav.ValueAsBoolean;
                else if (nav.Name == "Children") Children = nav.ValueAsBoolean;
                else if (nav.Name == "NoDeleteTags") NoDeleteTags = nav.ValueAsBoolean;
                else if (nav.Name == "OrderType")
                {
                    if (nav.Value == "OrderDefault") OrderType = OrderTypes.OrderDefault;
                    else if (nav.Value == "OrderDateTaken") OrderType = OrderTypes.OrderDateTaken;
                    else if (nav.Value == "OrderTitle") OrderType = OrderTypes.OrderTitle;
                    else if (nav.Value == "OrderTag") OrderType = OrderTypes.OrderTag;
                }
                else if (nav.Name == "NoInitialReplace") NoInitialReplace = nav.ValueAsBoolean;
            } while (nav.MoveToNext());
        }
 /// <summary>
 /// Creates a new instance of FilterCollection, where the current state of the filter is
 /// recorded as the kind of "collection" that this item belongs to.  The filter can be
 /// altered later, and this will retain the original state.
 /// </summary>
 public FilterCollection(IDrawingFilter inFilter, FilterTypes activeType)
 {
     _filter = inFilter;
     _activeType = activeType;
     Configure();
 }
 private static extern void iaxc_set_filters(FilterTypes filters);
 /// <summary>
 /// 
 /// </summary>
 /// <param name="featureSet"></param>
 /// <param name="inFilter"></param>
 /// <param name="activeType"></param>
 /// <param name="isReadOnly"></param>
 public FeatureSelection(IFeatureSet featureSet, IDrawingFilter inFilter, FilterTypes activeType, bool isReadOnly)
 {
     _filter = inFilter;
     _activeType = activeType;
     _isReadOnly = isReadOnly;
     _featureSet = featureSet;
     Configure();
 }