本文整理汇总了C#中FilterMode类的典型用法代码示例。如果您正苦于以下问题:C# FilterMode类的具体用法?C# FilterMode怎么用?C# FilterMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FilterMode类属于命名空间,在下文中一共展示了FilterMode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetEventFilter
/// <summary>
/// Generate an event filter function with the required semantics
/// </summary>
/// <param name="mode">Filter for event visibility</param>
/// <returns>Comparison function</returns>
public static Func<TypeDefinition, EventDefinition, bool> GetEventFilter(FilterMode mode)
{
Func<TypeDefinition, EventDefinition, bool> func = (TypeDefinition typeDef, EventDefinition evDef) =>
{
var lret = false;
if (IsEnabled(mode, FilterMode.Public))
{
lret = evDef.AddMethod.IsPublic;
}
if (!lret && IsEnabled(mode, FilterMode.Protected))
{
if (evDef.AddMethod.IsAssembly && IsEnabled(mode, FilterMode.NotInternalProtected))
{
// skip internal events which could be protected
}
else
{
lret = evDef.AddMethod.IsFamily;
}
}
if (!lret && IsEnabled(mode, FilterMode.Private))
{
lret = evDef.AddMethod.IsPrivate;
}
if (!lret && IsEnabled(mode, FilterMode.Internal))
{
lret = evDef.AddMethod.IsAssembly;
}
return lret;
};
return func;
}
开发者ID:endjin,项目名称:Endjin.Assembly.ChangeDetection,代码行数:40,代码来源:FilterFunctions.cs
示例2: FilterValueControl
/// <summary>
/// Gets the filter value control with the specified FilterMode
/// </summary>
/// <param name="configurationValues">The configuration values.</param>
/// <param name="id">The identifier.</param>
/// <param name="required">if set to <c>true</c> [required].</param>
/// <param name="filterMode">The filter mode.</param>
/// <returns></returns>
public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
{
var control = new RockTextBox { ID = id };
control.ID = string.Format( "{0}_ctlCompareValue", id );
control.AddCssClass( "js-filter-control" );
return control;
}
开发者ID:NewSpring,项目名称:Rock,代码行数:15,代码来源:EmailFieldType.cs
示例3: FilterSource
internal unsafe FilterSource(FilePath path, FilterMode mode, git_filter_source* source)
{
SourceMode = mode;
ObjectId = ObjectId.BuildFromPtr(&source->oid);
Path = path.Native;
Root = Proxy.git_repository_workdir(new IntPtr(source->repository)).Native;
}
开发者ID:PKRoma,项目名称:libgit2sharp,代码行数:7,代码来源:FilterSource.cs
示例4: GetTextureList
/// <summary>
/// Get GIF texture list (This is a possibility of lock up)
/// </summary>
/// <param name="bytes">GIF file byte data</param>
/// <param name="loopCount">out Animation loop count</param>
/// <param name="width">out GIF image width (px)</param>
/// <param name="height">out GIF image height (px)</param>
/// <param name="filterMode">Textures filter mode</param>
/// <param name="wrapMode">Textures wrap mode</param>
/// <param name="debugLog">Debug Log Flag</param>
/// <returns>GIF texture list</returns>
public static List<GifTexture> GetTextureList (byte[] bytes, out int loopCount, out int width, out int height,
FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, bool debugLog = false)
{
loopCount = -1;
width = 0;
height = 0;
// Set GIF data
var gifData = new GifData ();
if (SetGifData (bytes, ref gifData, debugLog) == false) {
Debug.LogError ("GIF file data set error.");
return null;
}
// Decode to textures from GIF data
var gifTexList = new List<GifTexture> ();
if (DecodeTexture (gifData, gifTexList, filterMode, wrapMode) == false) {
Debug.LogError ("GIF texture decode error.");
return null;
}
loopCount = gifData.appEx.loopCount;
width = gifData.logicalScreenWidth;
height = gifData.logicalScreenHeight;
return gifTexList;
}
开发者ID:cuidonghuan,项目名称:MiniWeChat-Client,代码行数:37,代码来源:UniGif.cs
示例5: DeblurBuilder
/// <summary>
/// Builder constructor
/// </summary>
/// <param name="filterSize"></param>
/// <param name="filterPower"></param>
/// <param name="keepOption"></param>
public DeblurBuilder(Size filterSize, double filterPower = 1, KeepOption keepOption = KeepOption.AverageAndDelta)
{
_filterMode = FilterMode.FilterSize;
_filterSize = filterSize;
_filterPower = filterPower;
_keepOption = keepOption;
}
开发者ID:SlimSalamin,项目名称:FFTTools,代码行数:13,代码来源:DeblurBuilder.cs
示例6: ScreenNameQuery
public ScreenNameQuery(string key, string value, FilterMode mode) : base(key, value, mode)
{
if (mode != FilterMode.Regex)
{
this.screenName = new ScreenName(value);
}
}
开发者ID:Grabacr07,项目名称:Mukyutter.Old,代码行数:7,代码来源:ScreenNameQuery.cs
示例7: Upgrade
public void Upgrade()
{
if (this.version != 4)
{
Debug.Log("SpriteCollection '" + base.name + "' - Upgraded from version " + this.version.ToString());
if (this.version == 0)
{
if (this.pixelPerfectPointSampled)
{
this.filterMode = FilterMode.Point;
}
else
{
this.filterMode = FilterMode.Bilinear;
}
this.userDefinedTextureSettings = true;
}
if (((this.version < 3) && (this.textureRefs != null)) && ((this.textureParams != null) && (this.textureRefs.Length == this.textureParams.Length)))
{
for (int i = 0; i < this.textureRefs.Length; i++)
{
this.textureParams[i].texture = this.textureRefs[i];
}
this.textureRefs = null;
}
if (this.version < 4)
{
this.sizeDef.CopyFromLegacy(this.useTk2dCamera, this.targetOrthoSize, (float) this.targetHeight);
}
this.version = 4;
}
}
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:32,代码来源:tk2dSpriteCollection.cs
示例8: FilterValueControl
/// <summary>
/// Gets the filter value control.
/// </summary>
/// <param name="configurationValues">The configuration values.</param>
/// <param name="id">The identifier.</param>
/// <param name="required">if set to <c>true</c> [required].</param>
/// <param name="filterMode">The filter mode.</param>
/// <returns></returns>
public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
{
var control = base.FilterValueControl(configurationValues, id, required, filterMode );
WorkflowTypePicker workflowTypePicker = (WorkflowTypePicker)control;
workflowTypePicker.Required = required;
workflowTypePicker.AllowMultiSelect = false;
return control;
}
开发者ID:azturner,项目名称:Rock,代码行数:16,代码来源:WorkflowTypesFieldType.cs
示例9: ExtensionFilter
/// <summary>
/// Initialize the Extension Filter
/// </summary>
/// <param name="pattern">pattern for the extension filter</param>
/// <param name="mode">The <see cref="FilterMode"/> for Filter</param>
internal ExtensionFilter(string pattern,FilterMode mode):base(mode)
{
if(pattern == null){
pattern = "";
}
this._pattern = pattern;
BuildRegex(_pattern.ToLower());
}
开发者ID:sr3dna,项目名称:big5sync,代码行数:13,代码来源:ExtensionFilter.cs
示例10: FilterBuilder
/// <summary>
/// Builder constructor
/// </summary>
/// <param name="filterKernel"></param>
/// <param name="filterPower"></param>
/// <param name="keepOption"></param>
public FilterBuilder(Complex[,] filterKernel, double filterPower = 1,
KeepOption keepOption = KeepOption.AverageAndDelta)
{
_filterMode = FilterMode.FilterKernel;
_filterKernel = filterKernel;
_filterPower = filterPower;
_keepOption = keepOption;
}
开发者ID:SlimSalamin,项目名称:FFTTools,代码行数:14,代码来源:FilterBuilder.cs
示例11: Apply
public Stream Apply(Stream stream, FilterMode fm)
{
Rijndael des = Rijndael.Create();
des.IV = iv;
des.Key = key;
ICryptoTransform crypt = fm == FilterMode.Write ? des.CreateEncryptor() : des.CreateDecryptor();
CryptoStream cs = new CryptoStream(stream, crypt, fm == FilterMode.Write ? CryptoStreamMode.Write : CryptoStreamMode.Read);
return cs;
}
开发者ID:Ozerich,项目名称:labs,代码行数:9,代码来源:CryptFilter.cs
示例12: Get
public RenderTexture Get(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, RenderTextureReadWrite rw = RenderTextureReadWrite.Default, FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, string name = "FactoryTempTexture")
{
var rt = RenderTexture.GetTemporary(width, height, depthBuffer, format);
rt.filterMode = filterMode;
rt.wrapMode = wrapMode;
rt.name = name;
m_TemporaryRTs.Add(rt);
return rt;
}
开发者ID:Cam582,项目名称:Top-Hats,代码行数:9,代码来源:RenderTextureFactory.cs
示例13: GetTemporaryRenderTexture
public RenderTexture GetTemporaryRenderTexture(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, FilterMode filterMode = FilterMode.Bilinear)
{
RenderTexture temporary = RenderTexture.GetTemporary(width, height, depthBuffer, format);
temporary.filterMode = filterMode;
temporary.wrapMode = TextureWrapMode.Clamp;
temporary.name = "RenderTextureUtilityTempTexture";
this.m_TemporaryRTs.Add(temporary);
return temporary;
}
开发者ID:GameDiffs,项目名称:TheForest,代码行数:9,代码来源:RenderTexureUtility.cs
示例14: DecodeTextureCoroutine
/// <summary>
/// Decode to textures from GIF data
/// </summary>
/// <param name="gifData">GIF data</param>
/// <param name="gifTexList">GIF texture list</param>
/// <param name="filterMode">Textures filter mode</param>
/// <param name="wrapMode">Textures wrap mode</param>
/// <returns>IEnumerator</returns>
static IEnumerator DecodeTextureCoroutine(GifData gifData, List<GifTexture> gifTexList, FilterMode filterMode, TextureWrapMode wrapMode)
{
if (gifData.imageBlockList == null || gifData.imageBlockList.Count < 1) {
yield break;
}
Color32? bgColor = GetGlobalBgColor (gifData);
// Disposal Method
// 0 (No disposal specified)
// 1 (Do not dispose)
// 2 (Restore to background color)
// 3 (Restore to previous)
ushort disposalMethod = 0;
int imgBlockIndex = 0;
foreach (var imgBlock in gifData.imageBlockList) {
var decodedData = GetDecodedData (imgBlock);
var colorTable = GetColorTable (gifData, imgBlock, ref bgColor);
var graphicCtrlEx = GetGraphicCtrlExt (gifData, imgBlockIndex);
int transparentIndex = GetTransparentIndex (graphicCtrlEx);
// avoid lock up
yield return 0;
bool useBeforeTex = false;
var tex = CreateTexture2D (gifData, gifTexList, imgBlockIndex, disposalMethod, filterMode, wrapMode, ref useBeforeTex);
// Set pixel data
int dataIndex = 0;
// Reverse set pixels. because GIF data starts from the top left.
for (int y = tex.height - 1; y >= 0; y--) {
SetTexturePixelRow (tex, y, imgBlock, decodedData, ref dataIndex, colorTable, bgColor, transparentIndex, useBeforeTex);
// avoid lock up
//if (y % 10 == 0) {
// yield return 0;
//}
}
tex.Apply ();
float delaySec = GetDelaySec (graphicCtrlEx);
// Add to GIF texture list
gifTexList.Add (new GifTexture (tex, delaySec));
disposalMethod = GetDisposalMethod (graphicCtrlEx);
imgBlockIndex++;
// avoid lock up
yield return 0;
}
}
开发者ID:cuidonghuan,项目名称:MiniWeChat-Client,代码行数:65,代码来源:UniGifDecoder.cs
示例15: GetTemporaryRenderTexture
public RenderTexture GetTemporaryRenderTexture(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, FilterMode filterMode = FilterMode.Bilinear)
{
var rt = RenderTexture.GetTemporary(width, height, depthBuffer, format);
rt.filterMode = filterMode;
rt.wrapMode = TextureWrapMode.Clamp;
rt.name = "RenderTextureUtilityTempTexture";
m_TemporaryRTs.Add(rt);
return rt;
}
开发者ID:ymfact,项目名称:railgun,代码行数:9,代码来源:RenderTexureUtility.cs
示例16: scale
/// <summary>
/// Scales the texture data of the given texture.
/// </summary>
/// <param name="tex">Texure to scale</param>
/// <param name="width">New width</param>
/// <param name="height">New height</param>
/// <param name="mode">Filtering mode</param>
public static void scale(Texture2D tex, int width, int height, FilterMode mode = FilterMode.Trilinear)
{
Rect texR = new Rect(0, 0, width, height);
_gpu_scale(tex, width, height, mode);
// Update new texture
tex.Resize(width, height);
tex.ReadPixels(texR, 0, 0, true);
tex.Apply(true); //Remove this if you hate us applying textures for you :)
}
开发者ID:Meragon,项目名称:Unity-WinForms,代码行数:17,代码来源:TextureScaler.cs
示例17: FilterValueControl
/// <summary>
/// Gets the filter value control.
/// </summary>
/// <param name="configurationValues">The configuration values.</param>
/// <param name="id">The identifier.</param>
/// <param name="required">if set to <c>true</c> [required].</param>
/// <param name="filterMode">The filter mode.</param>
/// <returns></returns>
public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
{
var control = base.FilterValueControl( configurationValues, id, required, filterMode );
if ( control is AccountPicker )
{
var accountPicker = (AccountPicker)control;
accountPicker.AllowMultiSelect = false;
accountPicker.Required = required;
}
return control;
}
开发者ID:azturner,项目名称:Rock,代码行数:19,代码来源:AccountsFieldType.cs
示例18: scaled
/// <summary>
/// Returns a scaled copy of given texture.
/// </summary>
/// <param name="tex">Source texure to scale</param>
/// <param name="width">Destination texture width</param>
/// <param name="height">Destination texture height</param>
/// <param name="mode">Filtering mode</param>
public static Texture2D scaled(Texture2D src, int width, int height, FilterMode mode = FilterMode.Trilinear)
{
Rect texR = new Rect(0, 0, width, height);
_gpu_scale(src, width, height, mode);
//Get rendered data back to a new texture
Texture2D result = new Texture2D(width, height, TextureFormat.ARGB32, true);
result.Resize(width, height);
result.ReadPixels(texR, 0, 0, true);
return result;
}
开发者ID:Meragon,项目名称:Unity-WinForms,代码行数:18,代码来源:TextureScaler.cs
示例19: FilterCompareControl
/// <summary>
/// Gets the filter compare control.
/// </summary>
/// <param name="configurationValues">The configuration values.</param>
/// <param name="id">The identifier.</param>
/// <param name="required">if set to <c>true</c> [required].</param>
/// <param name="filterMode">The filter mode.</param>
/// <returns></returns>
public override Control FilterCompareControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
{
var lbl = new Label();
lbl.ID = string.Format( "{0}_lIs", id );
lbl.AddCssClass( "data-view-filter-label" );
lbl.Text = "Is";
// hide the compare control when in SimpleFilter mode
lbl.Visible = filterMode != FilterMode.SimpleFilter;
return lbl;
}
开发者ID:azturner,项目名称:Rock,代码行数:20,代码来源:DayOfWeekFieldType.cs
示例20: BooleanQuery
public BooleanQuery(string key, string value, FilterMode mode) : base(key, value, mode)
{
if (mode != FilterMode.Equal)
{
throw new FilterException("クエリ '" + key + "' は '=' 演算子でのみ使用できます。");
}
if (!bool.TryParse(value, out this.b))
{
throw new FilterException("クエリ '" + key + "' の値は、'true' または 'false' で指定してください。");
}
}
开发者ID:Grabacr07,项目名称:Mukyutter.Old,代码行数:12,代码来源:BooleanQuery.cs
注:本文中的FilterMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论