• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Bool类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Bool的典型用法代码示例。如果您正苦于以下问题:C# Bool类的具体用法?C# Bool怎么用?C# Bool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Bool类属于命名空间,在下文中一共展示了Bool类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Create

        /// <summary>
        /// Creates a expression from specified token.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <returns>
        /// The expression.
        /// </returns>
        public virtual IExpression Create(IToken token)
        {
            IExpression result = null;

            if (token is OperationToken)
                result = CreateOperation((OperationToken)token);
            else if (token is NumberToken)
                result = new Number(((NumberToken)token).Number);
            else if (token is BooleanToken)
                result = new Bool(((BooleanToken)token).Value);
            else if (token is ComplexNumberToken)
                result = new ComplexNumber(((ComplexNumberToken)token).Number);
            else if (token is VariableToken)
                result = new Variable(((VariableToken)token).Variable);
            else if (token is UserFunctionToken)
                result = CreateUserFunction((UserFunctionToken)token);
            else if (token is FunctionToken)
                result = CreateFunction((FunctionToken)token);

            if (resolver != null && result != null)
                resolver.Resolve((object)result);

            return result;
        }
开发者ID:sys27,项目名称:xFunc,代码行数:31,代码来源:ExpressionFactory.cs


示例2: SetPowerEnabled

 /// <summary>        
 /// Set PowerEnabled field</summary>
 /// <param name="powerEnabled_">Nullable field value to be set</param>      
 public void SetPowerEnabled(Bool? powerEnabled_)
 {
     SetFieldValue(18, 0, powerEnabled_, Fit.SubfieldIndexMainField);
 }
开发者ID:phleb3,项目名称:ReadFit,代码行数:7,代码来源:BikeProfileMesg.cs


示例3: SetCadEnabled

 /// <summary>        
 /// Set CadEnabled field</summary>
 /// <param name="cadEnabled_">Nullable field value to be set</param>      
 public void SetCadEnabled(Bool? cadEnabled_)
 {
     SetFieldValue(16, 0, cadEnabled_, Fit.SubfieldIndexMainField);
 }
开发者ID:phleb3,项目名称:ReadFit,代码行数:7,代码来源:BikeProfileMesg.cs


示例4: SetAutoWheelCal

 /// <summary>        
 /// Set AutoWheelCal field</summary>
 /// <param name="autoWheelCal_">Nullable field value to be set</param>      
 public void SetAutoWheelCal(Bool? autoWheelCal_)
 {
     SetFieldValue(12, 0, autoWheelCal_, Fit.SubfieldIndexMainField);
 }
开发者ID:phleb3,项目名称:ReadFit,代码行数:7,代码来源:BikeProfileMesg.cs


示例5: SetAutoPowerZero

 /// <summary>        
 /// Set AutoPowerZero field</summary>
 /// <param name="autoPowerZero_">Nullable field value to be set</param>      
 public void SetAutoPowerZero(Bool? autoPowerZero_)
 {
     SetFieldValue(13, 0, autoPowerZero_, Fit.SubfieldIndexMainField);
 }
开发者ID:phleb3,项目名称:ReadFit,代码行数:7,代码来源:BikeProfileMesg.cs


示例6: OnRender

        public virtual void OnRender(Texture2D targetBase, Bool forward)
        {
            lock (lockObject)
            {
                DataStream datastream;

                if (capture == null)
                    return;

                if(nextFrame!=null)
                    nextFrame.Dispose();

                if (!forward)
                {
                    var pos = capture.GetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_POS_FRAMES);
                    pos-=4;
                    if(pos>=0)
                        capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_POS_FRAMES, pos);
                }

                // get the next frame
                nextFrame = capture.QueryFrame();

                if (nextFrame == null)
                {
                    capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_POS_FRAMES, 0);
                    nextFrame = capture.QueryFrame();
                }

                if (nextFrame != null)
                {
                    // lock the data for reading
                    System.Drawing.Bitmap bitmap = nextFrame.ToBitmap();
                    System.Drawing.Imaging.BitmapData bitdata = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, VideoSize.Width, VideoSize.Height),
                                                                                System.Drawing.Imaging.ImageLockMode.ReadOnly,
                                                                                System.Drawing.Imaging.PixelFormat.Format32bppRgb);

                    // update the texture to the next data
                    dev.ImmediateContext.MapSubresource(targetBase, 0, MapMode.WriteDiscard, MapFlags.None, out datastream);

                    datastream.Write(bitdata.Scan0, 0, bitdata.Height * bitdata.Stride);

                    dev.ImmediateContext.UnmapSubresource(targetBase, 0);

                    // unlock the data
                    bitmap.UnlockBits(bitdata);
                    bitmap.Dispose();
                }
                else
                {
                    capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_POS_FRAMES, 0);
                }

                return;

                if (isVideoStopped)
                    return;

                if (!isDirty)
                    return;

                // update the texture

                isDirty = false;

            }
        }
开发者ID:fxbit,项目名称:FxGraphicsEngine,代码行数:67,代码来源:MediaPlayer.cs


示例7: XIGrabDevice

 static extern Status XIGrabDevice(IntPtr display, int deviceid, Window grab_window, Time time,
     Cursor cursor, int grab_mode, int paired_device_mode, Bool owner_events, XIEventMask[] mask);
开发者ID:challal,项目名称:scallion,代码行数:2,代码来源:Functions.cs


示例8: Visit

 public virtual void Visit(Bool node)
 {
 }
开发者ID:einaregilsson,项目名称:While-Language,代码行数:3,代码来源:Visitor.cs


示例9: GetProperties

        public void GetProperties()
        {
            DrawingObjectEnumerator drawingObjectEnum = drawingHandler.GetDrawingObjectSelector().GetSelected();
            if (drawingObjectEnum.GetSize() == 1)
            {
                while (drawingObjectEnum.MoveNext())
                {
                    if (drawingObjectEnum.Current is Tekla.Structures.Drawing.GridLine)
                    {
                        Tekla.Structures.Drawing.GridLine grid = (Tekla.Structures.Drawing.GridLine)drawingObjectEnum.Current;
                        if (grid.Attributes.DrawOnlyTextLabelsNotGridLines) drawOnlyTextLabelsNotGridLines = Bool.True;
                        else drawOnlyTextLabelsNotGridLines = Bool.False;

                        if (grid.Attributes.DrawTextAtEndOfGridLine) drawTextAtEndOfGridLine = Bool.True;
                        else drawTextAtEndOfGridLine = Bool.False;

                        if (grid.Attributes.DrawTextAtStartOfGridLine) drawTextAtStartOfGridLine = Bool.True;
                        else drawTextAtStartOfGridLine = Bool.False;

                        if (grid.Attributes.Font.Bold) fontBold = Bool.True; else fontBold = Bool.False;

                        fontColour = grid.Attributes.Font.Color;
                        fontHeight = grid.Attributes.Font.Height.ToString();

                        if (grid.Attributes.Font.Italic) fontItalic = Bool.True; else fontItalic = Bool.False;

                        fontName = grid.Attributes.Font.Name;
                        frameColour = grid.Attributes.Frame.Color;
                        if (grid.Attributes.Frame.Type == FrameTypes.Circle) frameType = FrameTypeEnum.Circle;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Diamond) frameType = FrameTypeEnum.Diamond;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Hexagon) frameType = FrameTypeEnum.Hexagon;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Line) frameType = FrameTypeEnum.Line;
                        else if (grid.Attributes.Frame.Type == FrameTypes.None) frameType = FrameTypeEnum.None;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Rectangular) frameType = FrameTypeEnum.Rectangular;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Round) frameType = FrameTypeEnum.Round;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Sharpened) frameType = FrameTypeEnum.Sharpened;
                        else if (grid.Attributes.Frame.Type == FrameTypes.Triangle) frameType = FrameTypeEnum.Triangle;
                        lineColour = grid.Attributes.Line.Color;

                        if (grid.Attributes.Line.Type == LineTypes.DashDot) lineType = LineTypeEnum.DashDot;
                        else if (grid.Attributes.Line.Type == LineTypes.DashDoubleDot) lineType = LineTypeEnum.DashDoubleDot;
                        else if (grid.Attributes.Line.Type == LineTypes.DashedLine) lineType = LineTypeEnum.DashedLine;
                        else if (grid.Attributes.Line.Type == LineTypes.DottedLine) lineType = LineTypeEnum.DottedLine;
                        else if (grid.Attributes.Line.Type == LineTypes.SlashDash) lineType = LineTypeEnum.SlashDash;
                        else if (grid.Attributes.Line.Type == LineTypes.SlashedLine) lineType = LineTypeEnum.SlashedLine;
                        else if (grid.Attributes.Line.Type == LineTypes.SolidLine) lineType = LineTypeEnum.SolidLine;
                        else if (grid.Attributes.Line.Type == LineTypes.UndefinedLine) lineType = LineTypeEnum.UndefinedLine;

                        offsetAtEndOfLine = grid.Attributes.OffsetAtEndOfLine.ToString();
                        offsetAtStartOfLine = grid.Attributes.OffsetAtStartOfLine.ToString();
                        gridLabelText = grid.EndLabel.GridLabelText;
                    }
                }
            }
            if (drawingObjectEnum.GetSize() > 1)
            {
                drawOnlyTextLabelsNotGridLines = new Bool();
                drawTextAtEndOfGridLine = new Bool();
                drawTextAtStartOfGridLine = new Bool();
                fontColour = new DrawingColors();
                fontHeight = "";
                fontBold = new Bool();
                fontItalic = new Bool();
                fontName = "";
                frameColour = new DrawingColors();
                frameType = new FrameTypeEnum();
                lineColour = new DrawingColors();
                lineType = new LineTypeEnum();
                offsetAtEndOfLine = "";
                offsetAtStartOfLine = "";
                gridLabelText = "";
            }
        }
开发者ID:jonselfphoto,项目名称:Tekla-Properties,代码行数:73,代码来源:DrawingGrid.cs


示例10: SetShimanoDi2Enabled

 /// <summary>        
 /// Set ShimanoDi2Enabled field</summary>
 /// <param name="shimanoDi2Enabled_">Nullable field value to be set</param>      
 public void SetShimanoDi2Enabled(Bool? shimanoDi2Enabled_)
 {
     SetFieldValue(44, 0, shimanoDi2Enabled_, Fit.SubfieldIndexMainField);
 }
开发者ID:dgaff,项目名称:fitsdk,代码行数:7,代码来源:BikeProfileMesg.cs


示例11: GetProperties

 public void GetProperties()
 {
     DrawingObjectEnumerator drawingObjectEnum = drawingHandler.GetDrawingObjectSelector().GetSelected();
     if (drawingObjectEnum.GetSize() == 1)
     {
         while (drawingObjectEnum.MoveNext())
         {
             if (drawingObjectEnum.Current is Tekla.Structures.Drawing.View)
             {
                 Tekla.Structures.Drawing.View drawingView = (Tekla.Structures.Drawing.View)drawingObjectEnum.Current;
                 scale = drawingView.Attributes.Scale.ToString("F02");
                 sizeXMin = drawingView.RestrictionBox.MinPoint.X.ToString("F02");
                 sizeXMax = drawingView.RestrictionBox.MaxPoint.X.ToString("F02");
                 sizeYMin = drawingView.RestrictionBox.MinPoint.Y.ToString("F02");
                 sizeYMax = drawingView.RestrictionBox.MaxPoint.Y.ToString("F02");
                 sizeDepthDown = Math.Abs(drawingView.RestrictionBox.MinPoint.Z).ToString("F02");
                 sizeDepthUp = drawingView.RestrictionBox.MaxPoint.Z.ToString("F02");
                 viewExtension = drawingView.Attributes.ViewExtensionForNeighbourParts.ToString("F02");
                 if (drawingView.Attributes.FixedViewPlacing) fixedViewPlacing = Bool.True; else fixedViewPlacing = Bool.False;
                 if (drawingView.Attributes.Shortening.CutParts) cutParts = Bool.True; else cutParts = Bool.False;
                 minimumLength = drawingView.Attributes.Shortening.MinimumLength.ToString("F02");
             }
         }
     }
     else if (drawingObjectEnum.GetSize() > 1)
     {
         scale = "";
         sizeXMin = "";
         sizeXMax = "";
         sizeYMin = "";
         sizeYMax = "";
         sizeDepthDown = "";
         sizeDepthUp = "";
         viewExtension = "";
         fixedViewPlacing = new Bool();
         cutParts = new Bool();
         minimumLength = "";
     }
 }
开发者ID:jonselfphoto,项目名称:Tekla-Properties,代码行数:39,代码来源:DrawingView.cs


示例12: XInputEnable_

 private static void XInputEnable_(Bool arg0);
开发者ID:tanis2000,项目名称:FEZ,代码行数:1,代码来源:XInput.cs


示例13: SetSpdEnabled

 /// <summary>        
 /// Set SpdEnabled field</summary>
 /// <param name="spdEnabled_">Nullable field value to be set</param>      
 public void SetSpdEnabled(Bool? spdEnabled_)
 {
     SetFieldValue(15, 0, spdEnabled_, Fit.SubfieldIndexMainField);
 }
开发者ID:phleb3,项目名称:ReadFit,代码行数:7,代码来源:BikeProfileMesg.cs


示例14: PrepareResources

 public abstract void PrepareResources(DateTime presentTargetTime, out Bool isContentDirty);
开发者ID:rbwhitaker,项目名称:SharpDX,代码行数:1,代码来源:IDrawingSurfaceContentProvider.cs


示例15: SetRepeat

 /// <summary>        
 /// Set Repeat field</summary>
 /// <param name="repeat_">Nullable field value to be set</param>      
 public void SetRepeat(Bool? repeat_)
 {
     SetFieldValue(6, 0, repeat_, Fit.SubfieldIndexMainField);
 }
开发者ID:dgaff,项目名称:fitsdk,代码行数:7,代码来源:GoalMesg.cs


示例16: CompBool

 private bool CompBool(bool value, Op op, Bool cvalue)
 {
     if(cvalue != Bool.Nil)
     {
         switch (op)
         {
             case Op.NotSet:
                 return false;
             case Op.Equal:
                 return cvalue.Compare(value);
             case Op.NotEqual:
                 return !cvalue.Compare(value);
             default:
                 return false;
         }
     }
     return false;
 }
开发者ID:ashokgelal,项目名称:inSSIDer-2,代码行数:18,代码来源:Filter.cs


示例17: AssertEqual

 private static void AssertEqual(bool expected, Bool value)
 {
     Assert.AreEqual(expected, (bool)value);
 }
开发者ID:WalkerCodeRanger,项目名称:conceptLab,代码行数:4,代码来源:IntegerTests.cs


示例18: SetEnabled

 /// <summary>        
 /// Set Enabled field</summary>
 /// <param name="enabled_">Nullable field value to be set</param>      
 public void SetEnabled(Bool? enabled_)
 {
     SetFieldValue(10, 0, enabled_, Fit.SubfieldIndexMainField);
 }
开发者ID:dgaff,项目名称:fitsdk,代码行数:7,代码来源:GoalMesg.cs


示例19:

 void IDrawingSurfaceContentProviderNative.PrepareResources(DateTime presentTargetTime, out Bool isContentDirty)
 {
     isContentDirty = true;
 }
开发者ID:QuantumDeveloper,项目名称:SharpDX,代码行数:4,代码来源:GameWindowPhoneXaml.cs


示例20: GetBoolArray

 /// <summary>	
 /// Get an array of boolean variables.	
 /// </summary>	
 /// <param name="offset">Must be set to 0; this is reserved for future use.  </param>
 /// <param name="count">The number of array elements to set. </param>
 /// <returns>Returns one of the following {{Direct3D 10 Return Codes}}. </returns>
 /// <unmanaged>HRESULT ID3D10EffectScalarVariable::GetBoolArray([Out, Buffer] BOOL* pData,[None] int Offset,[None] int Count)</unmanaged>
 public bool[] GetBoolArray(int offset, int count)
 {
     var temp = new Bool[count];
     GetBoolArray(temp, offset, count);
     return Utilities.ConvertToBoolArray(temp);
 }        
开发者ID:QuantumDeveloper,项目名称:SharpDX,代码行数:13,代码来源:EffectScalarVariable.cs



注:本文中的Bool类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BoolExpression类代码示例发布时间:2022-05-24
下一篇:
C# Bookmark类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap