Ejemplo n.º 1
0
        void data_sr_getDatasCompleted(object sender, getDatasCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                //Entities.DatasList.Add(e.Result);
                Entities.DatasList = e.Result;
                Entities.DatasYol  = e.Result;

                for (int i = 0; i < Entities.AraclarList.Count; i++)
                {
                    Entities.AracDataList[i].Data = e.Result[i];
                    ClientIslem.geoIndexList.Add(i);

                    string kontaki = "Collapsed";
                    if (e.Result[i].DT_KONTAK == "Kapalý")
                    {
                        kontaki = "Collapsed";
                        Entities.AracDataList[i].Data.DT_H1Z = "0";
                    }
                    else
                    {
                        kontaki = "Visible";
                    }
                    Entities.AraclarList[i].ARC_KONTAK = kontaki;
                }
                ClientIslem.SetBestView();
            }

            loginBusy.IsBusy = false;
        }
Ejemplo n.º 2
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            Entities.DatasList    = new System.Collections.ObjectModel.ObservableCollection <Datas>();
            Entities.DatasYol     = new System.Collections.ObjectModel.ObservableCollection <Datas>();
            Entities.AracDataList = new System.Collections.ObjectModel.ObservableCollection <AracData>();

            MapLink.Visibility        = Visibility.Collapsed;
            LoginLink.Visibility      = Visibility.Visible;
            DiagnostikLink.Visibility = Visibility.Collapsed;
            RaporPageLink.Visibility  = Visibility.Collapsed;
            HakkindaLink.Visibility   = Visibility.Collapsed;
            TanimLink.Visibility      = Visibility.Collapsed;

            Entities.data_sr.getKullaniciCompleted += new EventHandler <getKullaniciCompletedEventArgs>(kul_sr_getKullaniciCompleted);
            Entities.data_sr.getAraclarCompleted   += new EventHandler <getAraclarCompletedEventArgs>(arc_sr_getAraclarCompleted);
            Entities.data_sr.getDataCompleted      += new EventHandler <getDataCompletedEventArgs>(data_sr_getDataCompleted);
            Entities.data_sr.getDatasCompleted     += new EventHandler <getDatasCompletedEventArgs>(data_sr_getDatasCompleted);

            MyAsenkronOlay = new SocketAsyncEventArgs();

            MyAsenkronOlay.RemoteEndPoint = SocketIslemler.MyEndPoint;
            MyAsenkronOlay.Completed     += new EventHandler <SocketAsyncEventArgs>(MyAsenkronOlay_Completed);

            SocketIslemler.MysisSocket.ConnectAsync(MyAsenkronOlay);


            conControl.Interval = TimeSpan.FromSeconds(300);
            conControl.Tick    += new EventHandler(conControl_Tick);

            if (ClientIslem.LoginIn == false)
            {
                ContentFrame.Navigate(new Uri("Home", UriKind.Relative));
            }

            ClientIslem.setAracImages();
        }