当前位置: 首页>>代码示例>>C#>>正文


C# AnchorStyles类代码示例

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


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


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