コード例 #1
0
ファイル: PrimaryInterface.cs プロジェクト: seanfuture/Slack
        public PrimaryInterface()
        {
            InitializeComponent();

            this.Icon = Properties.Resources.favicon;
            this.Text = "Slack";
            this.BackgroundImage = Properties.Resources.background;

            email = new EmailLogin((r) =>
            {
                authStart = r;
                BeginInvoke(new Action(ShowTeams));
            });
            email.Dock = DockStyle.Fill;
            email.BackColor = Color.Transparent;

            Controls.Add(email);
        }
コード例 #2
0
ファイル: TeamList.cs プロジェクト: seanfuture/Slack
        public TeamList(AuthStartResponse authStart, Action<UserTeamCombo> onSelectTeam)
        {
            userTeamCombos = authStart.users;
            teamSelected = onSelectTeam;
            buttonFont = new Font(CustomFonts.Fonts.Families[1], 20);
            teamButtons = new List<CustomButton>();

            IEnumerable<CustomButton> buttons = userTeamCombos.Select((c) => CreateTeamButton(c));

            int maxWidth = buttons.Max((c) => c.Width);
            Width = maxWidth;

            int i = 0;
            foreach (CustomButton b in buttons)
            {
                b.Width = maxWidth;
                Controls.Add(b);
                teamButtons.Add(b);
            }
        }