Beispiel #1
0
        void wc_ws_selectDeviceWorkStatesCompleted(object sender, ws_selectDeviceWorkStatesCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                WSt = e.Result;

                WSt.Description = this.uc_descripton;

                if (WSt.list_SCADAMessages.Count <= 0)
                {
                    dg_Root.Visibility      = Visibility.Collapsed;
                    panel_NoInfo.Visibility = Visibility.Visible;
                }
                else
                {
                    dg_Root.Visibility      = Visibility.Visible;
                    panel_NoInfo.Visibility = Visibility.Collapsed;
                }

                LayoutRoot.DataContext = WSt;

                if (box_ed.Items.Count > 0)
                {
                    box_ed.SelectedIndex = 0;
                }
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_SELECT, e.OpStatus.ToString());
                w.Show();
            }
        }
        void wc_ws_selectDeviceWorkStatesCompleted(object sender, ws_selectDeviceWorkStatesCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                WSt = e.Result;

                WSt.Description = this.uc_descripton;

                if (WSt.list_SCADAMessages.Count <= 0)
                {
                    dg_Root.Visibility = Visibility.Collapsed;
                    panel_NoInfo.Visibility = Visibility.Visible;
                }
                else
                {
                    dg_Root.Visibility = Visibility.Visible;
                    panel_NoInfo.Visibility = Visibility.Collapsed;
                }

                LayoutRoot.DataContext = WSt;

                if (box_ed.Items.Count >0)
                    box_ed.SelectedIndex = 0;
                
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_SELECT, e.OpStatus.ToString());
                w.Show();
            }         
        }