示例#1
0
        void mtimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            mtimer.Stop();
            // check if page is not actual anymore
            if (_pageId != CComponentController.getInstance().Page.Id)
            {
                return;
            }

            if (mdeleg != null)
            {
                mdeleg();
            }
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        public PhoneForm()
        {
            _form = this;
            InitializeComponent();

            ///////////////////////////////////////////////////////////////
            // sasacoh coding
            ///////////////////////////////////////////////////////////////
            string str = new string(' ', 255);

            richTextBox1.Lines = new string[] { str, str, str, str, str, str, str, str, str, str, str };
            //_buttons = new System.Collections.Generic.List<Button>();

            control = CComponentController.getInstance();

            Renderer     renderer = new Renderer(this);
            CFactoryImpl factory  = new CFactoryImpl();

            control.attach(renderer);
            control.Factory  = factory;
            control.Language = _langEN;

            // Create menu pages...
            new CInitPage();
            new CIdlePage();
            new CPhonebookPage();
            new CPhonebookEditPage();
            new CMenuPage();
            new CSIPSettings();
            new CSIPProxySettings();
            new CSIPProxySettings2nd();
            new CSIPProxySettings3rd();
            new CRingModePage();
            new CCalllogPage();
            new CAccountsPage();
            new CServicesPage();
            new CRedirectPage();
            new CMessageBoxPage();
            new CMessageReceivedPage();

            control.initialize();

            // register callback
            Telephony.CCallManager.getInstance().CallStateChanged += onTelephonyRefresh;

            // set active page...
            control.showPage((int)EPages.P_INIT);
        }
示例#3
0
        /// <summary>
        /// 
        /// </summary>
        public PhoneForm()
        {
            _form = this;
              InitializeComponent();

              ///////////////////////////////////////////////////////////////
              // sasacoh coding
              ///////////////////////////////////////////////////////////////
              string str = new string(' ', 255);
              richTextBox1.Lines = new string[] { str, str, str, str, str, str, str, str, str, str, str };
              //_buttons = new System.Collections.Generic.List<Button>();

              control = CComponentController.getInstance();

              Renderer renderer = new Renderer(this);
              CFactoryImpl factory = new CFactoryImpl();

              control.attach(renderer);
              control.Factory = factory;
              control.Language = _langEN;

              // Create menu pages...
              new CInitPage();
              new CIdlePage();
              new CPhonebookPage();
              new CPhonebookEditPage();
              new CMenuPage();
              new CSIPSettings();
              new CSIPProxySettings();
              new CSIPProxySettings2nd();
              new CSIPProxySettings3rd();
              new CRingModePage();
              new CCalllogPage();
              new CAccountsPage();
              new CServicesPage();
              new CRedirectPage();
              new CMessageBoxPage();
              new CMessageReceivedPage();

              control.initialize();

              // register callback
              Telephony.CCallManager.getInstance().CallStateChanged += onTelephonyRefresh;

              // set active page...
              control.showPage((int)EPages.P_INIT);
        }
示例#4
0
        public void RefreshForm()
        {
            int currentSession = CCallManager.getInstance().getCurrentCallIndex();

            // get current session
            if (currentSession < 0)
            {
                // todo::: showHomePage
                CComponentController.getInstance().showPage(CComponentController.getInstance().HomePageId);
                return;
            }

            Dictionary <int, CStateMachine> calls = CCallManager.getInstance().CallList;
            CStateMachine call = CCallManager.getInstance().getCurrentCall();

            if (call != null)
            {
                int stateId = (int)call.getStateId();
                if (stateId == (int)EStateId.IDLE)
                {
                    if (CCallManager.getInstance().Count == 0)
                    {
                        CComponentController.getInstance().showPage(stateId);
                    }
                    else
                    {
                        calls.GetEnumerator().MoveNext();
                        currentSession = calls.GetEnumerator().Current.Key;

                        CStateMachine nextcall = CCallManager.getInstance().getCall(currentSession);
                        if (nextcall != null)
                        {
                            CComponentController.getInstance().showPage((int)nextcall.getStateId());
                        }
                    }
                }
                else
                {
                    CComponentController.getInstance().showPage(stateId);
                }
            }
        }
示例#5
0
 public override void startMillis(int timeout)
 {
     _pageId         = CComponentController.getInstance().Page.Id;
     mtimer.Interval = timeout;
     mtimer.Start();
 }
示例#6
0
 private void PhoneForm_Shown(object sender, EventArgs e)
 {
     CComponentController.getInstance().HomePageId = (int)EPages.P_IDLE;
     // set home page...
     CComponentController.getInstance().showPage((int)EPages.P_IDLE);
 }