Пример #1
0
        public App()
        {
            WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
            WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp);

            if (!IsolatedStorageFile.IsEnabled)
            {
                MessageBox.Show("请启用Silverlight应用程序存储功能。");
                return;
            }

            //检测当前的状态
            //if (!NetworkInterface.GetIsNetworkAvailable())
            //   MessageBox.Show("系统无法联机,请检查网络连接是否正常!", "警告", MessageBoxButton.OK);


            SkinHelper.AddResource(SkinHelper.SkinDictionary.ColorDictionary[SkinHelper.ReadCurrentSkin().SkinType]);

            SkinHelper.AddResource(SkinHelper.SkinDictionary.SkinFontFamilyDictionary[SkinHelper.ReadCurrentSkin().SkinFontFamily]);

            SkinHelper.AddResource(SkinHelper.SkinDictionary.SkinFontSizeDictionary[SkinHelper.ReadCurrentSkin().SkinFontSize]);

            // var sd = new DisplayDesign();
            //var  Source = DesignDataUpdate.GetHouseInStorage();
            //  sd.SetDesign(Source.FirstOrDefault(item=>item.designCode.Equals("design1")));

            RootVisual = new PDMainPage();
            CheckVersionUpdate();

            GeneralConfigs.Initialize("ConstantConfiguration.txt");
            GeneralConfigs.InitializeCompleted += (ConstantInitializeCompleted);
            this.UnhandledException            += Application_UnhandledException;
        }