Exemplo n.º 1
0
        private async void GRIDipgwMain_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            if (!((PageStatus == IPGWstatus.Choosing) || (PageStatus == IPGWstatus.Multing)))
            {
                return;
            }
            IPGWmain.Opacity = 0.5;
            if (!(PageStatus == IPGWstatus.Choosing))
            {
                PageStatus = IPGWstatus.Nothing;
                STRBDconnectEnd.Begin();
                return;
            }
            PageStatus = IPGWstatus.Connecting;
            STRBDconnecting.Begin();
            TXTBLKblue.Text   = "";
            TXTBLKgreen.Text  = "";
            TXTBLKred.Text    = "";
            TXTBLKyellow.Text = "";
            IPGWMsg msg = await IPGWUtil.DoConnection(ConnectType);

            try
            {
                Constants.BoxPage.ShowMessage(msg.Content, msg.Title);
            }
            catch
            {
                Constants.BoxPage.ShowMessage("连接网关失败!");
            }
            PageStatus = IPGWstatus.Nothing;
            STRBDconnecting.Stop();
            STRBDconnectEnd.Begin();
        }
Exemplo n.º 2
0
 private void STRBDconnectEnd_Completed(object sender, object e)
 {
     if (PageStatus != IPGWstatus.Connecting)
     {
         STRBDcircle1.Begin();
     }
     else
     {
         STRBDconnecting.Begin();
     }
 }