public PageMaxEmergency()
 {
     InitializeComponent();
     DirectoryInfo di;
     di = new DirectoryInfo(System.Environment.CurrentDirectory);
     strPATH = di.Parent.Parent.FullName;
     ds = new EmergencyBasic();
     //webBrowsermaxmap.Navigate(new Uri(strPATH + @"/html/MaxEmergency.htm", UriKind.RelativeOrAbsolute));
     webBrowsermaxmap.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
     webBrowsermaxmap.ObjectForScripting = ds;
 }
 public Emergency()
 {
     InitializeComponent();
     //string path=Directory.GetParent(System.Environment.CurrentDirectory + @"/html.htm").Parent.Parent.ToString();
     //webBrowser1.Navigate(
     //    new Uri(System.Environment.CurrentDirectory + @"/html.htm",
     //        UriKind.RelativeOrAbsolute));//获取根目录的日历文件
     DirectoryInfo di = new DirectoryInfo(System.Environment.CurrentDirectory);
     string path = di.Parent.Parent.FullName;
     ds = new EmergencyBasic();
     webBrowser1.Navigate(new Uri(path + @"/html/Emergency.htm", UriKind.RelativeOrAbsolute));//获取根目录的日历文件
     webBrowser1.ObjectForScripting = ds;//该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问
 }
Beispiel #3
0
        public Emergency()
        {
            InitializeComponent();
            //string path=Directory.GetParent(System.Environment.CurrentDirectory + @"/html.htm").Parent.Parent.ToString();
            //webBrowser1.Navigate(
            //    new Uri(System.Environment.CurrentDirectory + @"/html.htm",
            //        UriKind.RelativeOrAbsolute));//获取根目录的日历文件
            DirectoryInfo di   = new DirectoryInfo(System.Environment.CurrentDirectory);
            string        path = di.Parent.Parent.FullName;

            ds = new EmergencyBasic();
            webBrowser1.Navigate(new Uri(path + @"/html/Emergency.htm", UriKind.RelativeOrAbsolute)); //获取根目录的日历文件
            webBrowser1.ObjectForScripting = ds;                                                      //该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问
        }
        public MainWindow()
        {
            this.InitializeComponent();
            LoadRss();
            // Insert code required on object creation below this point.
            DirectoryInfo di = new DirectoryInfo(System.Environment.CurrentDirectory);
            string pathTraffic = di.Parent.Parent.FullName;
            wbTraffic.Navigate(new Uri(pathTraffic + @"/html/Traffic.htm", UriKind.RelativeOrAbsolute));
            string pathEmergency = di.Parent.Parent.FullName;
            ds = new EmergencyBasic();
            wbEmergency.Navigate(new Uri(pathEmergency + @"/html/Emergency.htm", UriKind.RelativeOrAbsolute));//获取根目录的日历文件
            wbEmergency.ObjectForScripting = ds;//该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问

            string pathEnvironment = di.Parent.Parent.FullName;
            ds1 = new EnvironmentBasic();
            wbenvironment.Navigate(new Uri(pathEnvironment + @"/html/Environment.htm", UriKind.RelativeOrAbsolute));//获取根目录的日历文件
            wbenvironment.ObjectForScripting = ds1;//该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问
        }
        public HomePage()
        {
            InitializeComponent();
            DirectoryInfo di;
            di = new DirectoryInfo(System.Environment.CurrentDirectory);
            strPATH = di.Parent.Parent.FullName;
            webbrowserEnvironment.Navigate(new Uri(strPATH + @"/html/tufashijian.html", UriKind.RelativeOrAbsolute));
            webbrowserEnvironment1.Navigate(new Uri(strPATH + @"/html/tufashijian1.html", UriKind.RelativeOrAbsolute));
            webbrowserEnvironment2.Navigate(new Uri(strPATH + @"/html/tufashijian2.html", UriKind.RelativeOrAbsolute));

            //webbrowserTraffic.Navigate(new Uri(strPATH + @"/html/Traffic.htm", UriKind.RelativeOrAbsolute));
            webbrowserTraffic.Navigate(new Uri(strPATH + @"/html/xiaoyuanhuodong.htm", UriKind.RelativeOrAbsolute));
            webbrowserTraffic1.Navigate(new Uri(strPATH + @"/html/xiaoyuanhuodong1.htm", UriKind.RelativeOrAbsolute));
            ds = new EmergencyBasic();
            //webbrowserEmergency.Navigate(new Uri(strPATH + @"/html/Emergency.htm", UriKind.RelativeOrAbsolute));
            webbrowserEmergency.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
            webbrowserEmergency.ObjectForScripting = ds;
            loadWeather();
            calendar1.SelectedDate = DateTime.Today;
        }
 private void Grid_Loaded(object sender, RoutedEventArgs e)
 {
     tbx_ZiRanZaiHai_ShiJianShiShiGengXin.Text = "事件实时更新\r\n发生时间:2012年8月13日,13:56\r\n发生地点:同济大学体育馆工地西北\r\n事件情况:";
     tbx_ZiRanZaiHai_ShiJianQingKuang.Text = "(v1208131359)施工操作不当,引发施工现场起火,火势较大。\r\n(v1208131403)建筑中有工人被困,大约为6-9人。\r\n(v1208131411)第一辆救火车赶到现场,开始进行灭火操作,人员全部安全转移,初步确定无伤亡。\r\n(v1208131417)第二辆救火车和救护车赶到现场\r\n(v1208131422)。。。";
     DirectoryInfo di = new DirectoryInfo(System.Environment.CurrentDirectory);
     string pathEmergency = di.Parent.Parent.FullName;
     ds = new EmergencyBasic();
     webBrowser_ZiRanZaiHai.Navigate(new Uri(pathEmergency + @"/html/ZiRanZaiHai.htm", UriKind.RelativeOrAbsolute));//获取根目录的日历文件
     webBrowser_ZiRanZaiHai.ObjectForScripting = ds;//该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问
 }
        protected void Page_Loaded(object sender, RoutedEventArgs e)
        {
            string strPATH;
            DirectoryInfo di;
            di = new DirectoryInfo(System.Environment.CurrentDirectory);
            strPATH = di.Parent.Parent.FullName;
            ds = new EmergencyBasic();
            W_xiaohao.Navigate(new Uri(strPATH + @"/html/GreenDetect1.htm", UriKind.RelativeOrAbsolute));
            W_xiaohao.ObjectForScripting = ds;
            W_huanjing.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
            W_huanjing.ObjectForScripting = ds;

            CreateChart.ChartInformation ci1 = new ChartInformation()
            {
                m_BorderThickness = new Thickness(1.0),
                m_Theme = "Theme1",
                m_View3D = true,
                m_axisXTitle = "水耗",
                m_axisYTitle = "",
                m_axisYMaximum = 100,
                m_axisYInterval = 20,
                dsc = new DataSeriesCollection()
                    {
                        new DataSeries()
                        {
                            LegendText = "",
                            RenderAs = RenderAs.Column,
                            AxisYType = AxisTypes.Primary,
                            DataPoints = new DataPointCollection()
                            {
                                new DataPoint()
                                {
                                    AxisXLabel = "1月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "2月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "3月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "4月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "5月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "6月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "7月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "8月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "9月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "10月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "11月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "12月",
                                    YValue = 25,
                                },
                            }
                        },
                    },
            };
            CreateChart.ChartInformation ci2 = new ChartInformation()
            {
                m_BorderThickness = new Thickness(1.0),
                m_Theme = "Theme1",
                m_View3D = true,
                m_axisXTitle = "能耗",
                m_axisYTitle = "",
                m_axisYMaximum = 100,
                m_axisYInterval = 20,
                dsc = new DataSeriesCollection()
                    {
                        new DataSeries()
                        {
                            LegendText = "",
                            RenderAs = RenderAs.Line,
                            AxisYType = AxisTypes.Primary,
                            DataPoints = new DataPointCollection()
                            {
                                new DataPoint()
                                {
                                    AxisXLabel = "1月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "2月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "3月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "4月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "5月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "6月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "7月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "8月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "9月",
                                    YValue = 25,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "10月",
                                    YValue = 18,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "11月",
                                    YValue = 35,
                                },
                                new DataPoint()
                                {
                                    AxisXLabel = "12月",
                                    YValue = 25,
                                },
                            }
                        },
                    },
            };

            ChartHelper ch = new ChartHelper();
            Chart m_chart1 = ch.CreateChart(ci1);
            gridGraph1.Children.Clear();
            gridGraph1.Children.Add(m_chart1);

            Chart m_chart2 = ch.CreateChart(ci2);
            gridGraph2.Children.Clear();
            gridGraph2.Children.Add(m_chart2);
        }
        private void slider1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            string strPATH;
            DirectoryInfo di;
            di = new DirectoryInfo(System.Environment.CurrentDirectory);
            strPATH = di.Parent.Parent.FullName;

            if((slider1.Value == 0)||(slider1.Value == 3)||(slider1.Value == 6)||(slider1.Value == 9))
            {

                ds = new EmergencyBasic();
                W_xiaohao.Navigate(new Uri(strPATH + @"/html/GreenDetect1.htm", UriKind.RelativeOrAbsolute));
                W_xiaohao.ObjectForScripting = ds;
                W_huanjing.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
                W_huanjing.ObjectForScripting = ds;
            }
            else if ((slider1.Value == 1) || (slider1.Value == 4) || (slider1.Value == 7) || (slider1.Value == 10))
            {
                ds1 = new EmergencyBasic1();
                W_xiaohao.Navigate(new Uri(strPATH + @"/html/GreenDetect1.htm", UriKind.RelativeOrAbsolute));
                W_xiaohao.ObjectForScripting = ds1;
                W_huanjing.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
                W_huanjing.ObjectForScripting = ds1;
            }
            else if ((slider1.Value == 2) || (slider1.Value == 8) || (slider1.Value == 11))
            {
                ds2 = new EmergencyBasic2();
                W_xiaohao.Navigate(new Uri(strPATH + @"/html/GreenDetect1.htm", UriKind.RelativeOrAbsolute));
                W_xiaohao.ObjectForScripting = ds2;
                W_huanjing.Navigate(new Uri(strPATH + @"/html/GreenDetect.htm", UriKind.RelativeOrAbsolute));
                W_huanjing.ObjectForScripting = ds2;
            }
        }