Beispiel #1
0
 private void SetButtonText(TabBarButton btn, int index, ConnectionTag tag)
 {
     btn.HeadText = (index+1).ToString();
     string t = tag.FormatTabText();
     btn.Text = (t==null || t.Length==0)? " " : t; //�e�L�X�g�Ȃ�����HeadText��Ȃ��Ȃ��Ă��܂��̂ł�ނȂ����
 }
Beispiel #2
0
        private void AddWindowMenu(ConnectionTag ct)
        {
            GMenuItem mi = new GMenuItem();
            mi.Text = ct.FormatTabText();
            mi.Checked = true;
            //���̃V���[�g�J�b�g�͌Œ�ŁA�J�X�^�}�C�Y�s��
            if(_windowMenuItemMap.Count<=8)
                mi.ShortcutKey = Keys.Alt | (Keys)((int)Keys.D1 + _windowMenuItemMap.Count);
            else if(_windowMenuItemMap.Count==9)
                mi.ShortcutKey = Keys.Alt | Keys.D0;

            foreach(MenuItem m in _windowMenuItemMap.Keys) {
                m.Checked = false;
            }

            _windowMenuItemMap.Add(mi, ct);
            mi.Click += new EventHandler(OnWindowItemMenuClicked);
            _menuWindow.MenuItems.Add(mi);
        }
Beispiel #3
0
 private int GetNecessaryButtonWidth(ConnectionTag ct)
 {
     return (int)ct.Button.CreateGraphics().MeasureString((GEnv.Connections.IndexOf(ct)+1).ToString()+ct.FormatTabText(), _activeTabFont).Width + 37;//37�̓A�C�R���A�C���f�N�X�A���E�}�[�W���̍��v
 }
Beispiel #4
0
        public void RefreshConnection(ConnectionTag ct)
        {
            if(ct!=null) {
                _tabBar.RefreshConnection(ct);
                _tabBar.ArrangeButtons();
            }

            if(GEnv.Connections.Count==0) {
                AdjustTerminalUI(false, null);
                AdjustTitle(null);
            }
            else if(ct==GEnv.Connections.ActiveTag) {
                _tabBar.SetActiveTab(ct);
                AdjustTitle(ct);
            }

            //Window���j���[�̒���
            IDictionaryEnumerator e = _windowMenuItemMap.GetEnumerator();
            while(e.MoveNext()) {
                if(ct==e.Value) {
                    ((GMenuItem)e.Key).Text = ct.FormatTabText();
                    break;
                }
            }
        }