當前位置: 首頁>>代碼示例>>C#>>正文


C# BorderType類代碼示例

本文整理匯總了C#中BorderType的典型用法代碼示例。如果您正苦於以下問題:C# BorderType類的具體用法?C# BorderType怎麽用?C# BorderType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BorderType類屬於命名空間,在下文中一共展示了BorderType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: HasBorder

    /// <summary>
    /// Determines whether a particular border exists.
    /// </summary>
    public bool HasBorder(BorderType type)
    {
      if (!Enum.IsDefined(typeof(BorderType), type))
        throw new InvalidEnumArgumentException("type");

      return this.GetBorder(type) != null;
    }
開發者ID:GorelH,項目名稱:PdfSharp,代碼行數:10,代碼來源:Borders.cs

示例2: Border

 public Border(BorderType left, BorderType right, BorderType top, BorderType bottom)
 {
     Left = left;
     Right = right;
     Top = top;
     Bottom = bottom;
 }
開發者ID:bfriesen,項目名稱:BadSnowstorm,代碼行數:7,代碼來源:Border.cs

示例3: GetWidth

    internal XUnit GetWidth(BorderType type)
    {
      if (this.borders == null)
        return 0;

      return borders.GetEffectiveWidth(type);
    }
開發者ID:GorelH,項目名稱:PdfSharp,代碼行數:7,代碼來源:BordersRenderer.cs

示例4: HasBorder

    /// <summary>
    /// Determines whether a particular border exists.
    /// </summary>
    public bool HasBorder(BorderType type)
    {
      if (!Enum.IsDefined(typeof(BorderType), type))
        throw new InvalidEnumArgumentException("type");

      return !(this.IsNull(type.ToString()));
    }
開發者ID:vronikp,項目名稱:EventRegistration,代碼行數:10,代碼來源:Borders.cs

示例5: HasBorder

        /// <summary>
        /// Determines whether a particular border exists.
        /// </summary>
        public bool HasBorder(BorderType type)
        {
            if (!Enum.IsDefined(typeof(BorderType), type))
                throw new /*InvalidEnum*/ArgumentException(DomSR.InvalidEnumValue(type), "type");

            return GetBorderReadOnly(type) != null;
        }
開發者ID:Sl0vi,項目名稱:MigraDoc,代碼行數:10,代碼來源:Borders.cs

示例6: SpeechBubbleShape

        public SpeechBubbleShape(
            Vector2f dimension,
            float radius,
            float outlineThickness,
            Color backgroundColor,
            Color outlineColor,
            Boolean tipMode = false,
            BorderType tipBorderType = DEFAULT_TIP_BORDER_TYPE,
            Boolean shadowMode = false,
            float shadowOffset = DEFAULT_SHADOW_OFFSET,
            float tipPosition = DEFAULT_TIP_POSITION,
            float tipSize = DEFAULT_TIP_SIZE)
        {
            Background = new Shape();
            Background.EnableFill(true);
            Background.EnableOutline(true);
            Tip = new Shape();
            Tip.EnableFill(true);

            Effect = new Shape();
            Effect.EnableFill(true);
            Effect.EnableOutline(true);
            EffectTip = new Shape();

            ShadowEffect = new Shape();
            ShadowEffect.EnableFill(true);
            ShadowEffect.EnableOutline(true);
            ShadowEffectTip = new Shape();
            ShadowEffectTip.EnableFill(true);
            ShadowEffectTip.EnableOutline(false);

            Dimension = dimension;

            ShadowMode = shadowMode;
            ShadowOffset = new Vector2f(shadowOffset, shadowOffset);

            Radius = radius;
            OutlineThickness = outlineThickness;

            AdjustSize();

            TipMode = tipMode;
            TipBorderType = tipBorderType;

            BackgroundColor = backgroundColor;
            BackgroundColor.A = BACKGROUND_COLOR_ALPHA;
            OutlineColor = outlineColor;
            OutlineColor.A = BACKGROUND_COLOR_ALPHA;

            Background.OutlineThickness = OutlineThickness;
            Effect.OutlineThickness = OutlineThickness;
            ShadowEffect.OutlineThickness = OutlineThickness;

            TipPosition = tipPosition;
            TipSize = tipSize;

            Build();
        }
開發者ID:jpx,項目名稱:blazera,代碼行數:58,代碼來源:SpeechBubbleShape.cs

示例7: GetStyle

        private BorderStyle GetStyle(BorderType type)
        {
            BorderStyle style = BorderStyle.Single;

            Border border = GetBorder(type);
            if (border != null && !border._style.IsNull)
                style = border.Style;
            else if (!_borders._style.IsNull)
                style = _borders.Style;
            return style;
        }
開發者ID:Sl0vi,項目名稱:MigraDoc,代碼行數:11,代碼來源:BordersRenderer.cs

示例8: Window

 public Window(WindowManager _WM,State _parentState, int _X,int _Y, int _SizeX, int _SizeY,string _Title,BorderType Btype)
     : base(_X,_Y,_SizeX,_SizeY,_WM)
 {
     bordType = Btype;
     ParentState = _parentState;
     Widgets = new List<Widget>();
     GenerateBorder();
     Title = new Text(_Title, WM.font);
     SetSize(_SizeX, _SizeY);
     SetPosition(_X, _Y);
 }
開發者ID:Tricon2-Elf,項目名稱:SpaceHybridTest,代碼行數:11,代碼來源:Window.cs

示例9: TopBorder

 public static BorderCharacter TopBorder(BorderType borderType, Point location)
 {
     switch (borderType)
     {
         case BorderType.SingleLine:
             return new BorderCharacter(BorderInfo.SingleTop, location);
         case BorderType.DoubleLine:
             return new BorderCharacter(BorderInfo.DoubleTop, location);
         default:
             throw new ArgumentOutOfRangeException("borderType");
     }
 }
開發者ID:bfriesen,項目名稱:BadSnowstorm,代碼行數:12,代碼來源:BorderCharacter.cs

示例10: CopyMakeBorder

 /// <summary>
 /// Forms a border around the image
 /// </summary>
 /// <param name="src">The source image</param>
 /// <param name="dst">The destination image; will have the same type as src and 
 /// the size Size(src.cols+left+right, src.rows+top+bottom)</param>
 /// <param name="top">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
 /// <param name="bottom">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
 /// <param name="left">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
 /// <param name="right">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
 /// <param name="borderType">The border type</param>
 /// <param name="value">The border value if borderType == Constant</param>
 public static void CopyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, BorderType borderType, Scalar? value = null)
 {
     if (src == null)
         throw new ArgumentNullException("src");
     if (dst == null)
         throw new ArgumentNullException("dst");
     src.ThrowIfDisposed();
     dst.ThrowIfNotReady();
     Scalar value0 = value.GetValueOrDefault(new Scalar());
     NativeMethods.imgproc_copyMakeBorder(src.CvPtr, dst.CvPtr, top, bottom, left, right, (int)borderType, value0);
     dst.Fix();
 }
開發者ID:josephgodwinkimani,項目名稱:opencvsharp,代碼行數:24,代碼來源:Cv2_imgproc.cs

示例11: GetStyle

    private BorderStyle GetStyle(BorderType type)
    {
      BorderStyle style = BorderStyle.Single;

      Border border = GetBorder(type);
      if (border != null && !border.IsNull("Style"))
        style = border.Style;
      else if (!this.borders.IsNull("Style"))
        style = this.borders.Style;

      return style;
    }
開發者ID:vronikp,項目名稱:EventRegistration,代碼行數:12,代碼來源:BordersRenderer.cs

示例12: Cell

 public Cell()
 {
     this.m_anchor = AnchorStyles.Left | AnchorStyles.Top;
     this.m_bVisible = true;
     this.m_sName = "";
     this.Changed = null;
     this.m_anchor = AnchorStyles.Left | AnchorStyles.Top;
     this.m_BackColor = Resco.Controls.AdvancedList.AdvancedList.TransparentColor;
     this.m_ForeColor = Resco.Controls.AdvancedList.AdvancedList.TransparentColor;
     this.m_Bounds = new Rectangle(-1, -1, -1, -1);
     this.m_cellSource = new Resco.Controls.AdvancedList.CellSource();
     this.m_cellSource.Parent = this;
     this.m_Border = BorderType.None;
     this.m_IsAutoHeight = false;
     this.m_CustomizeCell = false;
     this.m_scale = new SizeF(1f, 1f);
 }
開發者ID:north0808,項目名稱:haina,代碼行數:17,代碼來源:Cell.cs

示例13: GetColor

        private XColor GetColor(BorderType type)
        {
            Color clr = Colors.Black;

            Border border = GetBorder(type);
            if (border != null && !border.Color.IsEmpty)
                clr = border.Color;
            else if (!_borders.Color.IsEmpty)
                clr = _borders.Color;

#if noCMYK
      return XColor.FromArgb((int)clr.Argb);
#else
            //      bool cmyk = false; // BUG CMYK
            //      if (_borders.Document != null)
            //        cmyk = _borders.Document.UseCmykColor;
            //#if DEBUG
            //      else
            //        GetT ype();
            //#endif
            return ColorHelper.ToXColor(clr, _borders.Document.UseCmykColor);
#endif
        }
開發者ID:Sl0vi,項目名稱:MigraDoc,代碼行數:23,代碼來源:BordersRenderer.cs

示例14: GetWidth

        internal XUnit GetWidth(BorderType type)
        {
            if (this.borders == null)
            return 0;

              Border border = GetBorder(type);

              if (border != null)
              {
            if (!border.IsNull("Visible") && !border.Visible)
              return 0;

            if (border != null && !border.IsNull("Width"))
              return border.Width.Point;

            if (!border.IsNull("Color") || !border.IsNull("Style") || border.Visible)
            {
              if (!this.borders.IsNull("Width"))
            return this.borders.Width.Point;

              return 0.5;
            }
              }
              else if (!(type == BorderType.DiagonalDown || type == BorderType.DiagonalUp))
              {
            if (!this.borders.IsNull("Visible") && !this.borders.Visible)
              return 0;

            if (!this.borders.IsNull("Width"))
              return this.borders.Width.Point;

            if (!this.borders.IsNull("Color") || !this.borders.IsNull("Style") || this.borders.Visible)
              return 0.5;
              }
              return 0;
        }
開發者ID:dankennedy,項目名稱:MigraDoc,代碼行數:36,代碼來源:BordersRenderer.cs

示例15: GetBorderReadOnly

 internal Border GetBorderReadOnly(BorderType type)
 {
     switch (type)
     {
         case BorderType.Bottom:
             return _bottom;
         case BorderType.DiagonalDown:
             return _diagonalDown;
         case BorderType.DiagonalUp:
             return _diagonalUp;
         case BorderType.Horizontal:
         case BorderType.Vertical:
             return (Border)GetValue(type.ToString(), GV.GetNull);
         case BorderType.Left:
             return _left;
         case BorderType.Right:
             return _right;
         case BorderType.Top:
             return _top;
     }
     if (!Enum.IsDefined(typeof(BorderType), type))
         throw new /*InvalidEnum*/ArgumentException(DomSR.InvalidEnumValue(type), "type");
     return null;
 }
開發者ID:Sl0vi,項目名稱:MigraDoc,代碼行數:24,代碼來源:Borders.cs


注:本文中的BorderType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。