Ejemplo n.º 1
0
        public CIdlePage()
            : base((int)EPages.P_IDLE)
        {
            _timedate         = new CText("");
            _timedate.PosY    = 0;
            _timedate.Caption = System.DateTime.Now.ToShortDateString() + " " + System.DateTime.Now.ToShortTimeString();
            CTimeoutDecorator timeDecor = new CTimeoutDecorator(_timedate, 1000, true);

            timeDecor.OnTimeout += new VoidDelegate(timeDateHandler);
            this.add(timeDecor);

            CText title = new CText("SIPek", EAlignment.justify_center);

            title.PosY = 3;
            add(title);

            // status indicator
            _statusBar      = new CStatusBar(EAlignment.justify_right);
            _statusBar.PosY = 0;
            add(_statusBar);

            _displayName       = new CText("");
            _displayName.PosY  = 4;
            _displayName.Align = EAlignment.justify_center;
            add(_displayName);

            CLink mlinkPhonebook = new CLink("Buddies", (int)EPages.P_PHONEBOOK);

            mlinkPhonebook.PosY    = 9;
            mlinkPhonebook.LinkKey = mlinkPhonebook.PosY;
            this.add(mlinkPhonebook);

            _linkRinger         = new CLink("Ring Mode", (int)EPages.P_RINGMODE);
            _linkRinger.Align   = EAlignment.justify_right;
            _linkRinger.PosY    = 8;
            _linkRinger.LinkKey = _linkRinger.PosY;
            this.add(_linkRinger);

            CLink mlinkCalls = new CLink("Calls", (int)EPages.P_CALLLOG);

            mlinkCalls.Align   = EAlignment.justify_right;
            mlinkCalls.PosY    = 10;
            mlinkCalls.LinkKey = mlinkCalls.PosY;
            this.add(mlinkCalls);

            _linkAccounts      = new CLink("Accounts", (int)EPages.P_ACCOUNTS);
            _linkAccounts.PosY = 7;
            this.add(_linkAccounts);

            // Initialize handlers
            Digitkey += new BoolIntDelegate(digitkeyHandler);
            Charkey  += new BoolIntDelegate(CIdlePage_Charkey);
            Offhook  += new VoidDelegate(IdlePage_Offhook);
            Menu     += new VoidDelegate(IdlePage_Menu);
            Ok       += new VoidDelegate(IdlePage_Ok);
        }
Ejemplo n.º 2
0
        public CIdlePage()
            : base((int)EPages.P_IDLE)
        {
            _timedate = new CText("");
              _timedate.PosY = 0;
              _timedate.Caption = System.DateTime.Now.ToShortDateString() + " " + System.DateTime.Now.ToShortTimeString();
              CTimeoutDecorator timeDecor = new CTimeoutDecorator(_timedate, 1000, true);
              timeDecor.OnTimeout += new VoidDelegate(timeDateHandler);
              this.add(timeDecor);

              CText title = new CText("SIPek", EAlignment.justify_center);
              title.PosY = 3;
              add(title);

              // status indicator
              _statusBar = new CStatusBar(EAlignment.justify_right);
              _statusBar.PosY = 0;
              add(_statusBar);

              _displayName = new CText("");
              _displayName.PosY = 4;
              _displayName.Align = EAlignment.justify_center;
              add(_displayName);

              CLink mlinkPhonebook = new CLink("Buddies", (int)EPages.P_PHONEBOOK);
              mlinkPhonebook.PosY = 9;
              mlinkPhonebook.LinkKey = mlinkPhonebook.PosY;
              this.add(mlinkPhonebook);

              _linkRinger = new CLink("Ring Mode", (int)EPages.P_RINGMODE);
              _linkRinger.Align = EAlignment.justify_right;
              _linkRinger.PosY = 8;
              _linkRinger.LinkKey = _linkRinger.PosY;
              this.add(_linkRinger);

              CLink mlinkCalls = new CLink("Calls", (int)EPages.P_CALLLOG);
              mlinkCalls.Align = EAlignment.justify_right;
              mlinkCalls.PosY = 10;
              mlinkCalls.LinkKey = mlinkCalls.PosY;
              this.add(mlinkCalls);

              _linkAccounts = new CLink("Accounts", (int)EPages.P_ACCOUNTS);
              _linkAccounts.PosY = 7;
              this.add(_linkAccounts);

              // Initialize handlers
              Digitkey += new BoolIntDelegate(digitkeyHandler);
              Charkey += new BoolIntDelegate(CIdlePage_Charkey);
              Offhook += new VoidDelegate(IdlePage_Offhook);
              Menu += new VoidDelegate(IdlePage_Menu);
              Ok += new VoidDelegate(IdlePage_Ok);
        }