private void DataViewPoint_ItemSelectFuns(WeatherViewPoint vp)
 {
     if (isShowingTest)
     {
         dataList_Test.SelectedItem = vp;
         dataList_Test.ScrollIntoView(vp);
     }
     else
     {
         DataList_Default.SelectedItem = vp;
         DataList_Default.ScrollIntoView(vp);
     }
 }
        private void DataList_Default_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //foreach (object items in e.AddedItems) {
            //	WeatherViewPoint vpoint = items as WeatherViewPoint;

            //}

            //foreach (object items in e.RemovedItems) {
            //	WeatherViewPoint vpoint = items as WeatherViewPoint;
            //	vpoint.IsSelect = false;
            //}

            var slist = DataList_Default.SelectedItems;

            int count = slist.Count;

            if (count <= 1)
            {
                foreach (var item in showingPoints)
                {
                    item.IsNear   = true;
                    item.IsSelect = false;
                }
                if (count == 1)
                {
                    WeatherViewPoint wvp = DataList_Default.SelectedItem as WeatherViewPoint;
                    DetilShow(wvp.ToString());
                    wvp.IsSelect = true;
                }
            }
            else
            {
                DetilShow($"已选择 {count} 项");
                foreach (var item in showingPoints)
                {
                    if (slist.Contains(item))
                    {
                        item.IsNear   = true;
                        item.IsSelect = true;
                    }
                    else
                    {
                        item.IsNear   = false;
                        item.IsSelect = false;
                    }
                }
            }
        }
        /// <summary>
        /// 导入测试数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            WeatherViewPoint.DictionaryED.Clear();
            DataList_Default.SelectedItem = null;

            Brush t0 = new SolidColorBrush(Color.FromRgb(0, 255, 0));
            Brush t1 = new SolidColorBrush(Color.FromRgb(255, 255, 0));
            Brush t2 = new SolidColorBrush(Color.FromRgb(255, 255, 0));
            Brush t3 = new SolidColorBrush(Color.FromRgb(255, 0, 0));
            Brush t4 = new SolidColorBrush(Color.FromRgb(0, 0, 255));

            canvShow.Children.Clear();

            ICollection <Weather.Weather> weas = new FileData(".\\Datas\\ou.csv").GetDatas();

            //weathers = weas;

            foreach (var item in weas)
            {
                Brush brush = null;
                switch (item.Type)
                {
                case 0: brush = t0; break;

                case 5: brush = t4; break;

                case 4: brush = t3; break;

                case 3: brush = t2; break;

                case 2: brush = t1; break;
                }

                WeatherViewPoint point = new WeatherViewPoint(item, 8, brush, ZeroPoint, UniteLength);                 //WeatherViewPoint(item, 8, brush, canvShow, new Point_2D(0, 768), new Point_2D(768));
                points.Add(point);
            }
            DataList_Default.ItemsSource = points;
            ShowPoints(points);
            Button btn = sender as Button;

            if (btn == null)
            {
                return;
            }
            btn.IsEnabled = false;
        }