Exemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Dispatcher.UnhandledException         += Dispatcher_UnhandledException;
            TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
            SetIEFeature(IE_FEATURE_BROWSER_EMULATION, 0x2AF8);
            //CrystalPalette.Palette.AccentPressedColor = Colors.Bisque;
            //CrystalPalette.Palette.MouseOverHighColor = Colors.Bisque;
            //CrystalPalette.Palette.FontFamily = new FontFamily("Segoe UI");
            //CrystalPalette.Palette.FontFamily = Application.Current.Resources["RobotoCondensed"] as FontFamily;
            //CrystalPalette.Palette.FontSize = 12;
            //CrystalPalette.Palette.CornerRadius = new CornerRadius(0);

            //FluentPalette.Palette.FontFamily = Application.Current.Resources["RobotoCondensed"] as FontFamily;
            //FluentPalette.Palette.FontSize = 13;

            //Office2013Palette.Palette.FontSizeL = 12;
            //Office2013Palette.Palette.FontSizeXL = 12;
            //Office2013Palette.Palette.FontFamily = new FontFamily("Roboto");

            Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor <BinanceViewModel>));
            Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor <DsxViewModel>));
            Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor <BittrexViewModel>));
            //Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor<HuobiViewModel>));
            //Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor<CryptopiaViewModel>));
            //Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor<HitBtcViewModel>));
            //Locator.CurrentMutable.Register(() => new ExchangeView(), typeof(IViewFor<OKexViewModel>));
            Locator.CurrentMutable.Register(() => new CreateTrade(), typeof(IViewFor <TradeTaskViewModel>));
            Locator.CurrentMutable.Register(() => new CreateExchangeAccount(), typeof(IViewFor <CreateExchangeAccountViewModel>));

            //orig:ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3;

            TelegramNotifier.Initialize();
        }