當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。