private void DocumentContainer1_ActiveDocumentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { loaclpath = Directory.GetParent(path).ToString(); if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Beijing") { ConditionToNight.Text = "Showers Clear"; ConditionTomoNight.Text = "Showers Late"; TemperatureToNight.Text = "29"; TemperatureTomoNight.Text = "28"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\showerClear.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\Showers Late.jpg"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Madagascar") { ConditionToNight.Text = "Light Showers"; ConditionTomoNight.Text = "Rain"; TemperatureToNight.Text = "22"; TemperatureTomoNight.Text = "25"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\Rain.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\rainy1.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Newyork") { ConditionToNight.Text = "Partly Cloudy"; ConditionTomoNight.Text = "Mostly Cloudy"; TemperatureToNight.Text = "26"; TemperatureTomoNight.Text = "27"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\Mostly Cloudy.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\Partly Cloudy.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "London") { ConditionToNight.Text = "Thunder"; ConditionTomoNight.Text = "Thunderstorms"; TemperatureToNight.Text = "20"; TemperatureTomoNight.Text = "22"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\Scattered Thunderstorms.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\Thunderstorms.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Brussels") { ConditionToNight.Text = "Rain"; ConditionTomoNight.Text = "Light Showers"; TemperatureToNight.Text = "26"; TemperatureTomoNight.Text = "25"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\Rain.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\rainy1.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "New Delhi") { ConditionToNight.Text = "Partly Cloudy"; ConditionTomoNight.Text = "Mostly Cloudy"; TemperatureToNight.Text = "23"; TemperatureTomoNight.Text = "24"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\Mostly Cloudy.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\Partly Cloudy.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Chennai") { ConditionToNight.Text = "Light Showers"; ConditionTomoNight.Text = "Showers Clear"; TemperatureToNight.Text = "23"; TemperatureTomoNight.Text = "24"; String WeatherTomoNightimgpath = loaclpath.Replace("bin", "Images\\showerClear.png"); String WeatherToNightimgpath = loaclpath.Replace("bin", "Images\\rainy1.png"); WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } }
private void DocumentContainer1_ActiveDocumentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { loaclpath = Directory.GetParent(path).ToString(); string[] filePath = loaclpath.Split('\\'); string removeString = filePath[filePath.Length - 1]; if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Beijing") { ConditionToNight.Text = "Showers Clear"; ConditionTomoNight.Text = "Showers Late"; TemperatureToNight.Text = "29"; TemperatureTomoNight.Text = "28"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/showerClear.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Showers Late.jpg"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Madagascar") { ConditionToNight.Text = "Light Showers"; ConditionTomoNight.Text = "Rain"; TemperatureToNight.Text = "22"; TemperatureTomoNight.Text = "25"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Rain.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/rainy1.png"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Newyork") { ConditionToNight.Text = "Partly Cloudy"; ConditionTomoNight.Text = "Mostly Cloudy"; TemperatureToNight.Text = "26"; TemperatureTomoNight.Text = "27"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Mostly Cloudy.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Partly Cloudy.png"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "London") { ConditionToNight.Text = "Thunder"; ConditionTomoNight.Text = "Thunderstorms"; TemperatureToNight.Text = "20"; TemperatureTomoNight.Text = "22"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Scattered Thunderstorms.jpg"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Thunderstorms.jpg"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Brussels") { ConditionToNight.Text = "Rain"; ConditionTomoNight.Text = "Light Showers"; TemperatureToNight.Text = "26"; TemperatureTomoNight.Text = "25"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Rain.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/rainy1.png"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "New Delhi") { ConditionToNight.Text = "Partly Cloudy"; ConditionTomoNight.Text = "Mostly Cloudy"; TemperatureToNight.Text = "23"; TemperatureTomoNight.Text = "24"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Mostly Cloudy.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/Partly Cloudy.png"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } else if (DocumentContainer1.ActiveDocument != null && DocumentContainer.GetHeader(DocumentContainer1.ActiveDocument).ToString() == "Chennai") { ConditionToNight.Text = "Light Showers"; ConditionTomoNight.Text = "Showers Clear"; TemperatureToNight.Text = "23"; TemperatureTomoNight.Text = "24"; String WeatherTomoNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/showerClear.png"; String WeatherToNightimgpath = "/syncfusion.dockingmanagerdemos.wpf;component/Assets/DockingManager/DockingTouch/rainy1.png"; WeatherReport(WeatherTomoNightimgpath, WeatherToNightimgpath); } }