/// <summary> /// Converts a <see cref="IndexLibrary.FieldOption"/> to the Lucene equivalent object, <c>IndexReader.FieldOption</c> /// </summary> /// <param name="option">The <c>FieldOption</c> to convert into a Lucene object</param> /// <returns>A Lucene <c>IndexReader.FieldOption</c> that is equivalent to the specified <c>FieldOption</c></returns> public static Lucene29.Net.Index.IndexReader.FieldOption ConvertToLuceneFieldOption(FieldOption option) { switch (option) { case FieldOption.All: return Lucene29.Net.Index.IndexReader.FieldOption.ALL; case FieldOption.Indexed: return Lucene29.Net.Index.IndexReader.FieldOption.INDEXED; case FieldOption.IndexedNoTermvectors: return Lucene29.Net.Index.IndexReader.FieldOption.INDEXED_NO_TERMVECTOR; case FieldOption.IndexedWithTermvectors: return Lucene29.Net.Index.IndexReader.FieldOption.INDEXED_WITH_TERMVECTOR; case FieldOption.OmitTermFrequencyAndPositions: return Lucene29.Net.Index.IndexReader.FieldOption.OMIT_TERM_FREQ_AND_POSITIONS; case FieldOption.StoresPayloads: return Lucene29.Net.Index.IndexReader.FieldOption.STORES_PAYLOADS; case FieldOption.Termvector: return Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR; case FieldOption.TermvectorWithOffset: return Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_OFFSET; case FieldOption.TermVectorWithPosition: return Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_POSITION; case FieldOption.TermVectorWithPositionOffset: return Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_POSITION_OFFSET; case FieldOption.Unindexed: return Lucene29.Net.Index.IndexReader.FieldOption.UNINDEXED; default: return Lucene29.Net.Index.IndexReader.FieldOption.ALL; } }
private float[] DrawMultiField(Rect position, GUIContent label, float[] values, FieldOption options) { if (!DrawLabel(ref position, null, options, label)) { position.width -= MightyGUIUtilities.FIELD_SPACING * (Columns - 1); } MightyGUIUtilities.MultiFloatField(position, GetLabelContents(), values, GetLabelWidths(), Orientation); return(values); }
public AreaAttribute(FieldOption option = FieldOption.Nothing) : base(option) { }
public static bool Contains(this FieldOption option, FieldOption flag) => (option & flag) != 0;
private Form GetForm(FieldOption fieldOption) { Field field = this.Storage.GetRepository <IFieldRepository>().WithKey(fieldOption.FieldId); return(this.Storage.GetRepository <IFormRepository>().WithKey(field.FormId)); }
public static FieldOption GetByValue(FieldOption[] options, String value) { return (from o in options where o.value == value select o).SingleOrDefault(); }
/// <summary> /// [experimental] Gets a list of unique field names taht exist in this index and have the specified field option information. /// </summary> /// <param name="options">The options that a field must have applied to it.</param> /// <returns>A string list of field names</returns> public ICollection<string> GetFieldNames(FieldOption options) { if (this.isDisposed) throw new ObjectDisposedException("IndexReader", "You cannot call GetFieldNames(FieldOption) from a disposed IndexReader"); return this.luceneReader.GetFieldNames(TypeConverter.ConvertToLuceneFieldOption(options)); }
static FieldOption() { OMIT_TF = OMIT_TERM_FREQ_AND_POSITIONS; }
protected BaseExplorerAttribute(string defaultPath, bool pathAsCallback, FieldOption options) : base(options) { DefaultPath = defaultPath; PathAsCallback = pathAsCallback; }
/// <summary> /// Displays a Text Area which size fit the text it contains. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public ResizableTextAreaAttribute(FieldOption options = FieldOption.Nothing) : base(options) { }
/// <summary> /// Displays a double slider for a Vector2 or a Vector2Int /// The min value will be saved in the x property, and the max value in the y property /// </summary> /// <param name="minValueCallback">The callback for the minimum value of the slider</param> /// <param name="maxValueCallback">The callback for the maximum value of the slider</param> /// <param name="options">Some drawing options for the field (default: Nothing)</param> public MinMaxSliderAttribute(string minValueCallback, string maxValueCallback, FieldOption options = FieldOption.Nothing) : base(options) { MinValueCallback = minValueCallback; MaxValueCallback = maxValueCallback; }
/// <summary> /// Displays a double slider for a Vector2Int /// The min value will be saved in the x property, and the max value in the y property /// </summary> /// <param name="minValue">The minimum value of the slider</param> /// <param name="maxValue">The maximum value of the slider</param> /// <param name="options">Some drawing options for the field (default: Nothing)</param> public MinMaxSliderAttribute(int minValue, int maxValue, FieldOption options = FieldOption.Nothing) : base(options) { MaxValue = minValue; MaxValue = maxValue; }
/// <summary> /// Displays a dropdown that lets you select a scene. /// Stores the build index of the scene in the field. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public SceneDropdownAttribute(FieldOption options = FieldOption.Nothing) : base(options) { }
public PercentSliderAttribute(FieldOption option = FieldOption.Nothing) : base(option) { }
/// <summary> /// Displays a dropdown that lets you select a tag name. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public TagAttribute(FieldOption options = FieldOption.Nothing) : base(options) { }
/// <summary> Get a list of unique field names that exist in this index and have the specified /// field option information. /// </summary> /// <param name="fldOption">specifies which field option should be available for the returned fields /// </param> /// <returns> Collection of Strings indicating the names of the fields. /// </returns> /// <seealso cref="IndexReader.FieldOption"> /// </seealso> public abstract ICollection<string> GetFieldNames(FieldOption fldOption);
public LayerFieldAttribute(FieldOption option = FieldOption.Nothing) : base(option) { }
public void EditFieldOption(FieldOption fieldOption) { db.Entry(fieldOption).State = EntityState.Modified; db.SaveChanges(); }
/// <summary> /// Draws a button to the right of the field that opens a panel that lets you select a folder. /// </summary> /// <param name="defaultPath">The default path at which the panel will be open. /// If it’s left null, the panel will open at the “Assets” folder.</param> /// <param name="pathAsCallback">Choose whether or not the default path should be consider as a callback (default: false).</param> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public FolderPanelAttribute(string defaultPath, bool pathAsCallback = false, FieldOption options = FieldOption.Nothing) : base(defaultPath, pathAsCallback, options) { }
/// <summary> /// Allows you to select what flags are available for an enum mask. /// The enum targeted has to be marked by the [System.Flags] attribute. /// </summary> /// <param name="availableMaskCallback">The callback for the mask that contains all the available flags.</param> /// <param name="allowEverything">Choose whether or not the "Everything" option should be available (default: true).</param> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public AvailableMaskAttribute(string availableMaskCallback, bool allowEverything = true, FieldOption options = FieldOption.Nothing) : base(options) { AvailableMaskCallback = availableMaskCallback; AllowEverything = allowEverything; }
/// <summary> /// Draws a button to the right of the field that opens a panel that lets you select a file. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public FilePanelAttribute(FieldOption options = FieldOption.Nothing) : base(null, false, options) { }
public CustomDrawerAttribute(string drawerCallback, string elementHeightCallback = null, FieldOption option = FieldOption.Nothing) : base(option) { DrawerCallback = drawerCallback; ElementHeightCallback = elementHeightCallback; }
/// <summary> /// Draws a button to the right of the field that opens a panel that lets you select a file. /// </summary> /// <param name="extension">The extension of the file to select. /// Can hold multiple values if they are separated with a comma (without space). /// Accept any file if left null.</param> /// <param name="defaultPath">The default path at which the panel will be open. /// If it’s left null, the panel will open at the “Assets” folder.</param> /// <param name="extensionAsCallback">Choose whether or not the extension should be consider as a callback (default: false).</param> /// <param name="pathAsCallback">Choose whether or not the default path should be consider as a callback (default: false).</param> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public FilePanelAttribute(string extension, string defaultPath, bool extensionAsCallback = false, bool pathAsCallback = false, FieldOption options = FieldOption.Nothing) : base(defaultPath, pathAsCallback, options) { Extension = extension; ExtensionAsCallback = extensionAsCallback; }
/// <summary> /// Replaces the "X" and "Y" labels of a Vector2 with "Min" and "Max". /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public MinMaxAttribute(FieldOption options = FieldOption.Nothing) : base(options) { }
/// <summary> /// Draws a button to the right of the field that opens a panel that lets you select a file. /// </summary> /// <param name="extension">The extension of the file to select. /// Can hold multiple values if they are separated with a comma (without space). /// Accept any file if left null.</param> /// <param name="extensionAsCallback">Choose whether or not the extension should be consider as a callback (default: false).</param> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public FilePanelAttribute(string extension, bool extensionAsCallback = false, FieldOption options = FieldOption.Nothing) : base(null, false, options) { Extension = extension; ExtensionAsCallback = extensionAsCallback; }
public static bool ContainsExact(this FieldOption option, FieldOption flag) => (option & flag) == flag;
public DropdownAttribute(string valuesFieldName, FieldOption option = FieldOption.Nothing) : base(option) =>
/// <summary> Get a list of unique field names that exist in this index and have the specified /// field option information. /// </summary> /// <param name="fldOption">specifies which field option should be available for the returned fields /// </param> /// <returns> Collection of Strings indicating the names of the fields. /// </returns> /// <seealso cref="IndexReader.FieldOption"> /// </seealso> public abstract System.Collections.ICollection GetFieldNames(FieldOption fldOption);
private void CacheForm(FieldOption fieldOption) { new SerializationManager(this).SerializeForm(this.GetForm(fieldOption)); }
/// <summary> /// Converts a <see cref="IndexLibrary.FieldOption"/> to the Lucene equivalent object, <c>IndexReader.FieldOption</c> /// </summary> /// <param name="option">The <c>FieldOption</c> to convert into a Lucene object</param> /// <returns>A Lucene <c>IndexReader.FieldOption</c> that is equivalent to the specified <c>FieldOption</c></returns> public static Lucene29.Net.Index.IndexReader.FieldOption ConvertToLuceneFieldOption(FieldOption option) { switch (option) { case FieldOption.All: return(Lucene29.Net.Index.IndexReader.FieldOption.ALL); case FieldOption.Indexed: return(Lucene29.Net.Index.IndexReader.FieldOption.INDEXED); case FieldOption.IndexedNoTermvectors: return(Lucene29.Net.Index.IndexReader.FieldOption.INDEXED_NO_TERMVECTOR); case FieldOption.IndexedWithTermvectors: return(Lucene29.Net.Index.IndexReader.FieldOption.INDEXED_WITH_TERMVECTOR); case FieldOption.OmitTermFrequencyAndPositions: return(Lucene29.Net.Index.IndexReader.FieldOption.OMIT_TERM_FREQ_AND_POSITIONS); case FieldOption.StoresPayloads: return(Lucene29.Net.Index.IndexReader.FieldOption.STORES_PAYLOADS); case FieldOption.Termvector: return(Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR); case FieldOption.TermvectorWithOffset: return(Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_OFFSET); case FieldOption.TermVectorWithPosition: return(Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_POSITION); case FieldOption.TermVectorWithPositionOffset: return(Lucene29.Net.Index.IndexReader.FieldOption.TERMVECTOR_WITH_POSITION_OFFSET); case FieldOption.Unindexed: return(Lucene29.Net.Index.IndexReader.FieldOption.UNINDEXED); default: return(Lucene29.Net.Index.IndexReader.FieldOption.ALL); } }
protected BaseDrawerAttribute(FieldOption option) => Option = option;
/// <summary> /// Draws an object field where Scene references aren't allowed. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public AssetOnlyAttribute(FieldOption options = FieldOption.Nothing) : base(options) { }
/// <summary> /// Displays a regular enum dropdown selection for an enum marked by the [System.Flags] attribute. /// </summary> /// <param name="allowNothing">Choose whether or not a "Nothing" option should be available (default: false). /// If you select "Nothing", your field value will be 0.</param> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public NotFlagsAttribute(bool allowNothing = false, FieldOption options = FieldOption.Nothing) : base(options) =>
/// <summary> /// Displays a slider between 0 and 100, followed by a "%" sign, for an int or a float. /// </summary> /// <param name="options">Some drawing options for the field (default: Nothing).</param> public PercentSliderAttribute(FieldOption options = FieldOption.Nothing) : base(options) => Between01 = false;
/// <summary> Get a list of unique field names that exist in this index and have the specified /// field option information. /// </summary> /// <param name="fldOption">specifies which field option should be available for the returned fields /// </param> /// <returns> Collection of Strings indicating the names of the fields. /// </returns> /// <seealso cref="IndexReader.FieldOption"> /// </seealso> public abstract System.Collections.Generic.ICollection<string> GetFieldNames(FieldOption fldOption);
public int CreateFieldOption(FieldOption fieldOption) { db.FieldOptions.Add(fieldOption); db.SaveChanges(); return(fieldOption.FieldOptionID); }