Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();
            Task.Factory.StartNew(() =>
            {
                //    RequestYandex.GET("27612.xml");
                //    RequestYandex.ParseXml();

                /// понадобилось чтобы привязать картинку к PathImage
                this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                            (ThreadStart)(() =>
                {
                    RequestYandex.GET("27612.xml");
                    RequestYandex.ParseXml();
                    pathImage = RequestYandex.PathIcon();
                }));
            }).Wait();

            InfoWeather.Click += new RoutedEventHandler((sender, e) =>
            {
                InfoAboutWeather infabweath = new InfoAboutWeather();
                infabweath.ShowDialog();
            });

            this.MainWeather.MouseLeftButtonDown += (sender, e) =>
            {
                this.DragMove();
            };

            this.Close.Click += (sender, e) => { this.Close(); };
            this.About.Click += (sender, e) => { About ab = new About(); ab.ShowDialog(); };

            this.DataContext = this;
        }