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


C# FlowLayoutPanel.Focus方法代码示例

本文整理汇总了C#中System.Windows.Forms.FlowLayoutPanel.Focus方法的典型用法代码示例。如果您正苦于以下问题:C# FlowLayoutPanel.Focus方法的具体用法?C# FlowLayoutPanel.Focus怎么用?C# FlowLayoutPanel.Focus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.FlowLayoutPanel的用法示例。


在下文中一共展示了FlowLayoutPanel.Focus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeCompanyFlowPanel

 private void InitializeCompanyFlowPanel(FlowLayoutPanel panel, IEnumerable<ICompanyInfo> companies)
 {
     foreach (ICompanyInfo company in companies)
     {
         Button button = new Button();
         button.FlatStyle = FlatStyle.Flat;
         button.BackColor = Color.GhostWhite;
         button.Text = company.NickName;
         button.Width = 270;
         button.Height = 60;
         button.Font = new Font(button.Font.FontFamily, 20);
         button.Margin = new Padding(5);
         button.Click += new EventHandler((object e, EventArgs e1) =>
         {
             SelectedCompany = company;
             SelectedCompanyButton = button;
         });
         panel.Controls.Add(button);
         panel.MouseEnter += new EventHandler((object e, EventArgs e1) => { panel.Focus();  });
         panel.FlowDirection = FlowDirection.LeftToRight;
         panel.AutoScroll = true;
     }
 }
开发者ID:heiwang,项目名称:StandardTradingDataEntry,代码行数:23,代码来源:DataEntryForm.cs

示例2: UpdateControls

        private void UpdateControls()
        {
            // tosses the character information relevant to each character
        #region Condition Monitor
            ConditionMonitorUserControl uc = 
                this.tabControl.TabPages[(int)DashBoardPages.CM].Controls[0] as ConditionMonitorUserControl;
            uc.MaxPhysical = this.CurrentNPC.PhysicalCM;
            uc.MaxStun = this.CurrentNPC.StunCM;
            uc.Physical = uc.MaxPhysical;
            uc.Stun = uc.MaxStun;
        #endregion

        #region Skill tab
            FlowLayoutPanel panel = new FlowLayoutPanel();
            foreach (Skill skill in this.CurrentNPC.Skills)
            {
                if (skill.KnowledgeSkill)
                    continue;   // improvement for knowledge skills goes here
                // insert new skill control
                SmallSkillControl ucSkill = new SmallSkillControl(this);
                ucSkill.Skill = skill;
                ucSkill.DiceClick += DiceClick_Clicked;
                // add the skill to the collection of skills to show
                panel.Controls.Add(ucSkill);
            }
            panel.Dock = DockStyle.Fill;
            panel.AutoScroll = true;
            panel.MouseEnter += (object sender, EventArgs e) => { panel.Focus(); };
            this.tabControl.TabPages[(int)DashBoardPages.Skills].Controls.Add(panel);
        #endregion

        #region Dice Roller
            DiceRollerControl dice = 
                this.tabControl.TabPages[(int)DashBoardPages.Dice].Controls[0] as DiceRollerControl;
            //dice.NumberOfEdge = this.CurrentNPC.EDG;    // todo figure out number of edge dice
        #endregion
        }
开发者ID:AMDX9,项目名称:chummer5a,代码行数:37,代码来源:frmGMDashboard.cs

示例3: UpdateControls

        private void UpdateControls()
        {
            if (CurrentNPC == null) return;
            // tosses the character information relevant to each character

            #region Condition Monitor

            ConditionMonitorUserControl uc =
                this.tabControl.TabPages[(int) DashBoardPages.CM].Controls[0] as ConditionMonitorUserControl;
            uc.MaxPhysical = this.CurrentNPC.PhysicalCM;
            uc.MaxStun = this.CurrentNPC.StunCM;
            uc.Physical = CurrentNPC.PhysicalCMFilled;
            uc.Stun = CurrentNPC.StunCMFilled;
            uc.Modifier = CurrentNPC.DamageInitModifier;
            uc.MaxOverflow = CurrentNPC.CMOverflow;

            #endregion

            #region Skill tab

            this.tabControl.TabPages[(int) DashBoardPages.Skills].Controls.Clear();
            FlowLayoutPanel panel = new FlowLayoutPanel();
            foreach (ISkill skill in this.CurrentNPC.Skills.Where(s => s.Rating > 0))
            {
                if (skill.KnowledgeSkill)
                    continue; // improvement for knowledge skills goes here
                // insert new skill control
                SmallSkillControl ucSkill = new SmallSkillControl(this);
                ucSkill.Skill = skill;
                ucSkill.DiceClick += DiceClick_Clicked;
                // add the skill to the collection of skills to show
                panel.Controls.Add(ucSkill);
            }
            panel.Dock = DockStyle.Fill;
            panel.AutoScroll = true;
            panel.MouseEnter += (object sender, EventArgs e) => { panel.Focus(); };
            this.tabControl.TabPages[(int) DashBoardPages.Skills].Controls.Add(panel);

            #endregion

            #region Dice Roller
            // todo figure out number of edge dice
            #endregion

            #region Spelltab
            this.tabControl.TabPages[(int)DashBoardPages.Spells].Controls.Clear();
            FlowLayoutPanel spellPanel = new FlowLayoutPanel();
           
            foreach (Spell spell in this.CurrentNPC.Spells.OrderBy(s=>s.Category))
            {
                //get a new spellcontroll
                var ucSpell = GetSmallSpellControl(spell);
                LanguageManager.Instance.Load(GlobalOptions.Instance.Language,ucSpell);
                // add the skill to the collection of skills to show
                spellPanel.Controls.Add(ucSpell);
            }
            spellPanel.Dock = DockStyle.Fill;
            spellPanel.AutoScroll = true;
            spellPanel.MouseEnter += (object sender, EventArgs e) => { panel.Focus(); };
            this.tabControl.TabPages[(int)DashBoardPages.Spells].Controls.Add(spellPanel);

            #endregion
            LanguageManager.Instance.Load(GlobalOptions.Instance.Language,this);
        }
开发者ID:GhostWhoWalksInside,项目名称:chummer5a_Dashboard,代码行数:64,代码来源:frmGMDashboard.cs


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