Exemplo n.º 1
0
        private void CheckNetworkState()
        {
            if (NetworkInterface.GetIsNetworkAvailable())
            {
                //Сеть доступна
                panel_Simatek.Visibility      = Visibility.Visible;
                img_Network_status.Visibility = System.Windows.Visibility.Collapsed;
                txt_Network_status.Visibility = System.Windows.Visibility.Collapsed;

                Deployment.Current.RuntimeVersion.ToString();

                WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
                wc.ws_TestDBConnectionCompleted += new EventHandler <WS_Link.ws_TestDBConnectionCompletedEventArgs>(wc_ws_TestDBConnectionCompleted);
                wc.ws_TestDBConnectionAsync();
                wc.ws_TestAuthConnectionCompleted += new EventHandler <WS_Link.ws_TestAuthConnectionCompletedEventArgs>(wc_ws_TestAuthConnectionCompleted);
                wc.ws_TestAuthConnectionAsync();
            }
            else
            {
                //Сеть недоступна
                panel_Simatek.Visibility      = Visibility.Collapsed;
                img_Network_status.Visibility = System.Windows.Visibility.Visible;
                txt_Network_status.Visibility = System.Windows.Visibility.Visible;
                ErrorWindow.CreateNew("Нет соединения с сетью!");
            }
        }
Exemplo n.º 2
0
        private void CheckNetworkState()
        {
            if (NetworkInterface.GetIsNetworkAvailable())
            {
                //Сеть доступна
                panel_Simatek.Visibility = Visibility.Visible;
                img_Network_status.Visibility = System.Windows.Visibility.Collapsed;
                txt_Network_status.Visibility = System.Windows.Visibility.Collapsed;

                Deployment.Current.RuntimeVersion.ToString();

                WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
                wc.ws_TestDBConnectionCompleted += new EventHandler<WS_Link.ws_TestDBConnectionCompletedEventArgs>(wc_ws_TestDBConnectionCompleted);
                wc.ws_TestDBConnectionAsync();
                wc.ws_TestAuthConnectionCompleted += new EventHandler<WS_Link.ws_TestAuthConnectionCompletedEventArgs>(wc_ws_TestAuthConnectionCompleted);
                wc.ws_TestAuthConnectionAsync();       
            }
            else
            {
                //Сеть недоступна
                panel_Simatek.Visibility = Visibility.Collapsed;
                img_Network_status.Visibility = System.Windows.Visibility.Visible;
                txt_Network_status.Visibility = System.Windows.Visibility.Visible;
                ErrorWindow.CreateNew("Нет соединения с сетью!");
            }
        }
Exemplo n.º 3
0
        void Page_Loaded(object sender, RoutedEventArgs e)
        {

            WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
            wc.WS_GetTreeCompleted += new EventHandler<WS_Link.WS_GetTreeCompletedEventArgs>(wc_WS_GetTreeCompleted);
            wc.WS_GetTreeAsync();

        }
Exemplo n.º 4
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            try
            {
                WS_Link.BaseItem bt = treeView.SelectedItem as WS_Link.BaseItem;
                WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
                wc.WS_GetDevicesCompleted += new EventHandler<WS_Link.WS_GetDevicesCompletedEventArgs>(wc_WS_GetDevicesCompleted);

                //if (bt.lastchild == 1)
                //{
                    wc.WS_GetDevicesAsync(bt.ID);
                //}
            }
            catch (Exception err)
            {
                HeaderText.Text = "Исключение в WS_GetDevices: ";
                ErrorWindow.CreateNew(err);
            }
        }
Exemplo n.º 5
0
        private void treeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            try
            {
                WS_Link.BaseItem       bt = treeView.SelectedItem as WS_Link.BaseItem;
                WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
                wc.WS_GetDevicesCompleted += new EventHandler <WS_Link.WS_GetDevicesCompletedEventArgs>(wc_WS_GetDevicesCompleted);

                //if (bt.lastchild == 1)
                //{
                wc.WS_GetDevicesAsync(bt.ID);
                //}
            }
            catch (Exception err)
            {
                HeaderText.Text = "Исключение в WS_GetDevices: ";
                ErrorWindow.CreateNew(err);
            }
        }
Exemplo n.º 6
0
 void Page_Loaded(object sender, RoutedEventArgs e)
 {
     WS_Link.WServiceClient wc = new WS_Link.WServiceClient();
     wc.WS_GetTreeCompleted += new EventHandler <WS_Link.WS_GetTreeCompletedEventArgs>(wc_WS_GetTreeCompleted);
     wc.WS_GetTreeAsync();
 }