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

C# AnchorStyles类代码示例

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

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



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

示例1: hide_LocationChanged

 private void hide_LocationChanged(object sender, EventArgs e)
 {
     if (this.Top <= 0 && this.Left <= 0)
     {
         StopAanhor = AnchorStyles.None;
     }
     else if (this.Top <= 0)
     {
         StopAanhor = AnchorStyles.Top;
     }
     else if (this.Left <= 0)
     {
         StopAanhor = AnchorStyles.Left;
     }
     else if (this.Left >= Screen.PrimaryScreen.Bounds.Width - this.Width)
     {
         StopAanhor = AnchorStyles.Right;
     }
     else if (this.Top >= Screen.PrimaryScreen.Bounds.Height - this.Height)
     {
         StopAanhor = AnchorStyles.Bottom;
     }
     else
     {
         StopAanhor = AnchorStyles.None;
     }
 }
开发者ID:piaolingzxh,项目名称:Justin,代码行数:27,代码来源:AutoAnchorForm.cs


示例2: CreateAI

        public static IAIPlayer CreateAI(
            IAILogicProvider logicProvider,
            string name,
            int chips,
            Label statusLabel,
            TextBox chipsTextBox,
            AnchorStyles cardHoldersPictureBoxesAnchorStyles,
            int cardHoldersPictureBoxesX,
            int cardHoldersPictureBoxesY)
        {
            IList<PictureBox> cardHolders = GetCardHoldersPictureBoxes(cardHoldersPictureBoxesAnchorStyles,
                cardHoldersPictureBoxesX, cardHoldersPictureBoxesY);

            Panel panel = GetPlayerPanel(cardHolders);

            chipsTextBox.Enabled = false;

            return new AI(
                currentPlayerId,
                name,
                statusLabel,
                chipsTextBox,
                chips,
                cardHolders,
                panel,
                logicProvider);
        }
开发者ID:Team-Damson,项目名称:Poker,代码行数:27,代码来源:PlayerFactory.cs


示例3: CreateTutorialArrowWindow

 public static void CreateTutorialArrowWindow(bool upArrow, Point offset, AnchorStyles anchor, Form parentWindow)
 {
     bool doShow = false;
     TutorialArrowWindow window = InterfaceMgr.Instance.getTutorialArrowWindow();
     if (window == null)
     {
         window = new TutorialArrowWindow();
         doShow = true;
     }
     else
     {
         if (parentWindow != lastParent)
         {
             window.Close();
             window = new TutorialArrowWindow();
             doShow = true;
         }
         if (!window.Created || !window.Visible)
         {
             doShow = true;
         }
     }
     if ((window != null) && ((doShow || (offset != window.m_offset)) || (anchor != window.m_anchor)))
     {
         lastParent = parentWindow;
         window.show(upArrow, offset, anchor);
         window.updateLocation(parentWindow);
         window.showTutorialArrowWindow(doShow, parentWindow);
     }
 }
开发者ID:Riketta,项目名称:Stronghold-Kingdoms,代码行数:30,代码来源:TutorialArrowWindow.cs


示例4: ToolTab

        public ToolTab(Tool tool, AnchorStyles anchor, Orientation orientation)
        {
            if(tool == null) throw new ArgumentNullException("tool");

            _tool = tool;
            _anchor = anchor;
            _orientation = orientation;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:8,代码来源:ToolTab.cs


示例5: AttachTo

 public void AttachTo(Rectangle r, int padding, AnchorStyles defaultArrowAnchor)
 {
     attachedRect = r;
     attachedTo = null;
     attachedBoundary = null;
     attachedPadding = padding;
     this.defaultArrowAnchor = defaultArrowAnchor;
     OnAttachedLocationChanged();
 }
开发者ID:Healix,项目名称:Gw2Launcher,代码行数:9,代码来源:formAccountTooltip.cs


示例6: IUILayoutParam

 public IUILayoutParam(AnchorStyles anchorStyle, Padding padding, System.Drawing.Size size,
     int zNear = -1000, int zFar = 1000)
 {
     // TODO: Complete member initialization
     this.Anchor = anchorStyle;
     this.Margin = padding;
     this.Size = size;
     this.zNear = zNear;
     this.zFar = zFar;
 }
开发者ID:Mofangbao,项目名称:CSharpGL,代码行数:10,代码来源:IUILayoutParam.cs


示例7: DoIt

 public static void DoIt(QuickGrid grid, 
     PictureBox picture,Control parent,
     AnchorStyles anchor)
 {
     picture.Visible = false;
     grid.Location = picture.Location;
     grid.Visible = true;
     grid.Size = picture.Size;
     grid.Dock = picture.Dock;
     grid.Parent = parent;
     grid.Anchor = anchor;
 }
开发者ID:johanericsson,项目名称:code,代码行数:12,代码来源:SetupQuickGrid.cs


示例8: CustomWitIconButton

        public CustomWitIconButton(Image iconImage, AnchorStyles style, Color color,String toolTipText) {

            Size = new System.Drawing.Size(25, 28);
            Anchor = style;
            FlatStyle = FlatStyle.Flat;
            BackColor = color;
            FlatAppearance.BorderColor = color;
            Image = iconImage;
            ToolTip textMailToolTip = new ToolTip();
            textMailToolTip.SetToolTip(this, toolTipText);

        }
开发者ID:soumyaansh,项目名称:Outlook-Widget,代码行数:12,代码来源:CustomWitIconButton.cs


示例9: GetCardHoldersPictureBoxes

        private static IList<PictureBox> GetCardHoldersPictureBoxes(
            AnchorStyles cardHoldersPictureBoxesAnchorStyles,
            int cardHoldersPictureBoxesX,
            int cardHoldersPictureBoxesY)
        {
            IList<PictureBox> cardHolders = new List<PictureBox>();
            cardHolders.Add(CreatePictureBox(cardHoldersPictureBoxesAnchorStyles, cardHoldersPictureBoxesX, cardHoldersPictureBoxesY));
            cardHoldersPictureBoxesX += cardHolders.First().Width;
            cardHolders.Add(CreatePictureBox(cardHoldersPictureBoxesAnchorStyles, cardHoldersPictureBoxesX, cardHoldersPictureBoxesY));

            return cardHolders;
        }
开发者ID:Team-Damson,项目名称:Poker,代码行数:12,代码来源:PlayerFactory.cs


示例10: Control

        private int gnzIndex;//对象的Z轴深度

        public Control() {
            //gMouseOn = false;
            base.RefreshAllow = false;

            gVisible = true;
            gbAbsolute = false;
            gAnchor = AnchorStyles.Left | AnchorStyles.Top;
            gnRight = 0;
            gnBottom = 0;
            gbAnchorCache = false;
            gnzIndex = 0;

            base.RefreshAllow = true;
        }
开发者ID:inmount,项目名称:dyk.dll,代码行数:16,代码来源:Control.cs


示例11: add_DataGridView

 public static DataGridView add_DataGridView(Control cTargetControl,
                                            int iLeft, int iTop, int iWidth, int iHeight,
                                            AnchorStyles asAnchorStyles)
 {
     var dgvDataGridView = new DataGridView();
     dgvDataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     dgvDataGridView.Anchor = asAnchorStyles;
     dgvDataGridView.Height = iHeight;
     dgvDataGridView.Width = iWidth;
     dgvDataGridView.Left = iLeft;
     dgvDataGridView.Top = iTop;
     //	dgvDataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     cTargetControl.Controls.Add(dgvDataGridView);
     return dgvDataGridView;
 }
开发者ID:njmube,项目名称:FluentSharp,代码行数:15,代码来源:Controls.cs


示例12: CreateCharacter

        public Character CreateCharacter(
            string characterType,
            string name,
            int chips,
            Label status,
            TextBox textBox,
            AnchorStyles cardHolderAnchorStyles,
            int pictureBoxX,
            int pictureBoxY)
        {
            IList<PictureBox> cardHolders = new List<PictureBox>();
            cardHolders.Add(CreatePictureBox(cardHolderAnchorStyles, pictureBoxX, pictureBoxY));
            pictureBoxX += cardHolders.First().Width;
            cardHolders.Add(CreatePictureBox(cardHolderAnchorStyles, pictureBoxX, pictureBoxY));

            Panel panel = new Panel();
            panel.Location = new Point(cardHolders.First().Left - 10, cardHolders.Last().Top - 10);
            panel.BackColor = Color.DarkBlue;
            panel.Height = 150;
            panel.Width = 180;
            panel.Visible = false;

            textBox.Enabled = false;
            switch (characterType)
            {
                    
                case "Player":
                    return new Player(
                        characterId,
                        name,
                        status,
                        textBox,
                        chips,
                        cardHolders,
                        panel);
                case "Bot":
                    return new Bot(
                        characterId,
                        name,
                        status,
                        textBox,
                        chips,
                        cardHolders,
                        panel);
                default:
                    throw new PlayerTypeNotImplementedException("");
            }
        }
开发者ID:TeamAvocadoUni,项目名称:PokerStars,代码行数:48,代码来源:CharacterFactory.cs


示例13: Mirror

		static AnchorStyles Mirror(AnchorStyles anchor)
		{
			bool right = (anchor & AnchorStyles.Right) == AnchorStyles.Right;
			bool left  = (anchor & AnchorStyles.Left ) == AnchorStyles.Left ;
			if (right) {
				anchor = anchor | AnchorStyles.Left;
			} else {
				anchor = anchor & ~AnchorStyles.Left;
			}
			if (left) {
				anchor = anchor | AnchorStyles.Right;
			} else {
				anchor = anchor & ~AnchorStyles.Right;
			}
			return anchor;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:16,代码来源:RightToLeftConverter.cs


示例14: formAccountTooltip

        public formAccountTooltip()
        {
            InitializeComponent();

            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.UserPaint, true);

            brush = new SolidBrush(Color.Black);
            pen = new Pen(brush);

            this.BackColor = Color.White;
            this.TransparencyKey = Color.Red;

            arrowAnchor = AnchorStyles.Left;
        }
开发者ID:Healix,项目名称:Gw2Launcher,代码行数:16,代码来源:formAccountTooltip.cs


示例15: CreatePictureBox

        private static PictureBox CreatePictureBox(
            AnchorStyles cardHoldersPictureBoxesAnchorStyles,
            int cardHoldersPictureBoxesX,
            int cardHoldersPictureBoxesY)
        {
            PictureBox cardHolder = new PictureBox();
            cardHolder.SizeMode = PictureBoxSizeMode.StretchImage;
            cardHolder.Height = 130;
            cardHolder.Width = 80;
            cardHolder.Visible = false;
            cardHolder.Name = "pb" + charactersCount++;
            cardHolder.Anchor = cardHoldersPictureBoxesAnchorStyles;
            cardHolder.Location = new Point(cardHoldersPictureBoxesX, cardHoldersPictureBoxesY);

            return cardHolder;
        }
开发者ID:TeamAvocadoUni,项目名称:PokerStars,代码行数:16,代码来源:CharacterFactory.cs


示例16: Bot

 public Bot(
     string name,
     int startCard,
     int verticalLocationCoordinate,
     int horizontalLocationCoordinate,
     AnchorStyles verticalLocation = 0,
     AnchorStyles horizontalLocation = 0)
     : base(name)
 {
     this.StartCard = startCard;
     this.VerticalLocationCoordinate = verticalLocationCoordinate;
     this.HorizontalLocationCoordinate = horizontalLocationCoordinate;
     this.HorizontalLocation = horizontalLocation;
     this.VerticalLocation = verticalLocation;
     this.Status = new Label();
     this.TextBoxBotChips = new TextBox();
 }
开发者ID:Banana-Team,项目名称:Poker,代码行数:17,代码来源:Bot.cs


示例17: 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


示例18: GetButton

 private static DockMarkerButton GetButton(AnchorStyles side)
 {
     var bounds = new Rectangle(4, 4, 32, 32);
     switch(side)
     {
         case AnchorStyles.Left:
             return new DockMarkerButton(bounds, DockResult.Left);
         case AnchorStyles.Top:
             return new DockMarkerButton(bounds, DockResult.Top);
         case AnchorStyles.Right:
             return new DockMarkerButton(bounds, DockResult.Right);
         case AnchorStyles.Bottom:
             return new DockMarkerButton(bounds, DockResult.Bottom);
         default:
             throw new ArgumentException(
                 "Unknown AnchorStyles value: {0}".UseAsFormat(side),
                 "side");
     }
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:19,代码来源:GridDockMarker.cs


示例19: Attach

        public void Attach(Form form, AnchorStyles anchorStyle)
        {
            if (form != null)
            {
                form.Move -= new EventHandler(AttachedFormMove);
                form.Resize -= new EventHandler(AttachedFormResize);
            }

            AttachedToForm = form;
            AttachedStyle = anchorStyle;

            if (form != null)
            {
                form.Move += new EventHandler(AttachedFormMove);
                form.Resize += new EventHandler(AttachedFormResize);

                SyncPosition();
                SyncSize();
            }
        }
开发者ID:qistoph,项目名称:ASN1-Editor,代码行数:20,代码来源:AttachedForm.cs


示例20: ViewTabBase

        /// <summary>Initializes a new instance of the <see cref="ViewTabBase"/> class.</summary>
        /// <param name="view">Represented <see cref="ViewBase"/>.</param>
        /// <param name="anchor">Tab anchor.</param>
        protected ViewTabBase(ViewBase view, AnchorStyles anchor)
        {
            Verify.Argument.IsNotNull(view, "view");

            switch(anchor)
            {
                case AnchorStyles.Left:
                case AnchorStyles.Right:
                    _orientation = Orientation.Vertical;
                    break;
                case AnchorStyles.Top:
                case AnchorStyles.Bottom:
                    _orientation = Orientation.Horizontal;
                    break;
                default:
                    throw new ArgumentException("Invalid anchor value.", "anchor");
            }
            _anchor = anchor;
            _view = view;
        }
开发者ID:Kuzq,项目名称:gitter,代码行数:23,代码来源:ViewTabBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# AnchorType类代码示例发布时间:2022-05-24
下一篇:
C# AnchorPoint类代码示例发布时间: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