当前位置: 首页>>代码示例>>C#>>正文


C# SplashScreen.Close方法代码示例

本文整理汇总了C#中System.Windows.SplashScreen.Close方法的典型用法代码示例。如果您正苦于以下问题:C# SplashScreen.Close方法的具体用法?C# SplashScreen.Close怎么用?C# SplashScreen.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.SplashScreen的用法示例。


在下文中一共展示了SplashScreen.Close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PetuniaStart

 // Startup Parameter
 private void PetuniaStart(object sender, StartupEventArgs e)
 {
     SplashScreen petuniaSplash = new SplashScreen("SplashScreen.png");
     petuniaSplash.Show(false);
     if (e.Args.Length>0)
     {
         switch (e.Args[0])
         {
             case "-h":
                 //PetuniaVariables.SetAllVariables();
                 //LoadLoaclData();
                 // Minimize System tray code here.
                 petuniaSplash.Close(TimeSpan.FromSeconds(0.3));
                 break;
             case "-b":
                 //PetuniaVariables.SetAllVariables();
                 //LoadLoaclData();
                 petuniaSplash.Close(TimeSpan.FromSeconds(0.3));
                 break;
             default:
                 Console.WriteLine("Invalid Command");
                 break;
         }
     }
     petuniaSplash.Close(TimeSpan.FromSeconds(0.9));
 }
开发者ID:shuvo009,项目名称:ProcestaPetunia,代码行数:27,代码来源:App.xaml.cs

示例2: MainWindow

        /* Constructor
         *
         * Initializes the window and calls the data provider to initialize
         * airports lists. Creates the autocomplete boxes. In case the connection
         * to the database is unavailable, displays an information and exits.
         */
        public MainWindow()
        {
            SplashScreen splash = new SplashScreen("SplashScreen.png");
            splash.Show(true);
            InitializeComponent();
            try
            {
                EtosPRODataProvider provider = new EtosPRODataProvider(this);
                airportsFullList = provider.GetFullAirportsList();
                airportCodes = provider.GetAirportsCodesList();

                SearchDepartureBox = new AutoCompleteBox();
                SearchDepartureBox.FilterMode = AutoCompleteFilterMode.Contains;
                SearchDepartureBox.ItemsSource = airportsFullList;
                SearchDeparturePanel.Children.Add(SearchDepartureBox);

                SearchArrivalBox = new AutoCompleteBox();
                SearchArrivalBox.FilterMode = AutoCompleteFilterMode.Contains;
                SearchArrivalBox.ItemsSource = airportsFullList;
                SearchArrivalPanel.Children.Add(SearchArrivalBox);
            }
            catch (SqlException e)
            {
                splash.Close(TimeSpan.Zero);
                ErrorWindow error = new ErrorWindow("Could not connect to the server! The application will exit.\n\n" +
                                                    "Verify your connection or contact the developers.");
                error.Show();
                this.Hide();
            }
            splash.Close(TimeSpan.FromSeconds(1));
        }
开发者ID:mehulsbhatt,项目名称:etospro,代码行数:37,代码来源:MainWindow.xaml.cs

示例3: IsBuilderConnectionUnavailable

        private static bool IsBuilderConnectionUnavailable()
        {
            if (ConfigurationManager.ConnectionStrings["Builder"] == null)
             {
            MessageBox.Show(
               "Connection to Builder database was missed in configuration file." + Environment.NewLine +
               "Please check app.config file.", "Configuration error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            return true;
             }

             var splashScreen = new SplashScreen("Resources/splash.png");
             try
             {
            splashScreen.Show(false);
            using (
               var connection =
                  SqlConnectionHelper.OpenConnection(ConfigurationManager.ConnectionStrings["Builder"].ConnectionString)
               )
            {
            }
            splashScreen.Close(TimeSpan.FromSeconds(0));
             }
             catch (Exception)
             {
            splashScreen.Close(TimeSpan.FromSeconds(0));
            MessageBox.Show(
               "Connection to Builder database not available." + Environment.NewLine + "Please check app.config file.",
               "Configuration error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            return true;
             }
             return false;
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:32,代码来源:MainWindow.xaml.cs

示例4: OnStartup

        private const int SPLASH_FADE_TIME = 500; // Miliseconds

        #endregion Fields

        #region Methods

        /// <summary>
        /// It loads the splash screen
        /// </summary>
        /// <param name="e"></param>
        protected override void OnStartup(StartupEventArgs e)
        {
            // Step 1 - Load the splash screen
            SplashScreen splash = new SplashScreen("Images/transcoderLogo.png");
            splash.Show(false, true);

            // Step 2 - Start a stop watch
            Stopwatch timer = new Stopwatch();
            timer.Start();

            // Step 3 - Load your LoginWindow but don't show it yet
            base.OnStartup(e);
            LoginWindow main = new LoginWindow();
            // testControlsPage main = new testControlsPage();

            // Step 4 - Make sure that the splash screen lasts at least two seconds
            timer.Stop();
            int remainingTimeToShowSplash = MINIMUM_SPLASH_TIME - (int)timer.ElapsedMilliseconds;
            if (remainingTimeToShowSplash > 0)
                Thread.Sleep(remainingTimeToShowSplash);

            // Step 5 - show the page
            splash.Close(TimeSpan.FromMilliseconds(SPLASH_FADE_TIME));
            main.Show();
        }
开发者ID:Prayance,项目名称:BCiProt,代码行数:35,代码来源:App.xaml.cs

示例5: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            SplashScreen s = new SplashScreen(@"Images\Splash.png");
            s.Show(false);
            s.Close(new TimeSpan(0, 0, 5));

            App.Current.Resources.MergedDictionaries.Add(Application.LoadComponent(new Uri(@"Template/DialogBaseStyle.xaml", UriKind.Relative)) as ResourceDictionary);
            App.Current.Resources.MergedDictionaries.Add(Application.LoadComponent(new Uri(@"Template/GeneralStyle.xaml", UriKind.Relative)) as ResourceDictionary);

            PurchaseSellStock.Properties.Settings.Default.MachineSerial = Data.SysParam.GetMachineSerial("00");
            PurchaseSellStock.Properties.Settings.Default.Version = string.Format("{0} V{1}.{2}",
                PurchaseSellStock.Properties.Settings.Default.VersionType,
                Application.ResourceAssembly.GetName().Version.Major, 
                Application.ResourceAssembly.GetName().Version.Minor);

            DialogRegister dialog = new DialogRegister();
            dialog.Show();

            //if (PurchaseSellStock.Properties.Settings.Default.NeedLogin)
            //{
            //    DialogLogin dialog = new DialogLogin();
            //    dialog.Show();
            //}
            //else
            //{
            //    string strLoginName = PurchaseSellStock.Properties.Settings.Default.LastLoginName;
            //    Data.User.UserName = strLoginName;
            //    WindowMain objMain = new WindowMain();
            //    objMain.Show();
            //}

            //base.OnStartup(e);
        }
开发者ID:jameshuang-i,项目名称:test,代码行数:33,代码来源:App.xaml.cs

示例6: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            if (!SingleInstance.InitializeAsFirstInstance(SignalExternalCommandLineArgs))
                Environment.Exit(0);

            var appSplash = new SplashScreen("splash.png");
            appSplash.Show(false);
            {
                base.OnStartup(e);
                Config.ShowConsole = true;
                Context.Startup();
            }
            appSplash.Close(TimeSpan.FromMilliseconds(300));

            if (false)
            {
                ShutdownMode = ShutdownMode.OnExplicitShutdown;
                Context.ProcessingQueueEmpty += Shutdown;

                Context.Log += OnLog;
                Context.ProcessingProcessChanged += OnProcessingProcessChanged;
                Context.ProcessingProgressChanged += OnProcessingProgressChanged;
            }
            else
            {
                ShowMainWindow();
            }

            HandleArgs(e.Args);
        }
开发者ID:jdauie,项目名称:cloudae,代码行数:30,代码来源:App.xaml.cs

示例7: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            SplashScreen s = new SplashScreen("Images/loadImg.png");
            s.Show(true, true);

            BLL.FileManager.CheckMyDocFolder();//检查文件夹
            Config.ReadConfig();
            Config.ReadBlogsConfig();

            Application.Current.Resources.BeginInit();
            switch (Config.Common.Theme)
            {
                case ThemeStyle.Office2010:
                    Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/Fluent;component/Themes/Generic.xaml") });
                    Application.Current.Resources.MergedDictionaries.RemoveAt(0);
                    break;
                case ThemeStyle.Office2013:
                    Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/Fluent;component/Themes/Office2013/Generic.xaml") });
                    Application.Current.Resources.MergedDictionaries.RemoveAt(0);
                    break;
            }
            Application.Current.Resources.EndInit();

            base.OnStartup(e);
            System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(p =>
            {
                s.Close(new TimeSpan(0, 0, 2));
            }));
        }
开发者ID:yuntianming026,项目名称:MarkWord,代码行数:29,代码来源:App.xaml.cs

示例8: Application_Startup

 /// <summary>
 /// Loads the Splash Screen and shows it for an amount of seconds
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     SplashScreen splash = new SplashScreen("/Common/Assets/splash.png");
     splash.Show(false);
     System.Threading.Thread.Sleep(3 * 1000);
     splash.Close(TimeSpan.Zero);
 }
开发者ID:JazzMalar,项目名称:AppCommander,代码行数:12,代码来源:App.xaml.cs

示例9: MainWindow

 public MainWindow()
 {
     var splash = new SplashScreen("spalsh.png");
     //splash.Show(false);
     //splash.Show(true);
     InitializeComponent();
     splash.Close(TimeSpan.FromMinutes(0.5));
 }
开发者ID:kozintsev,项目名称:ETools,代码行数:8,代码来源:MainWindow.xaml.cs

示例10: ShowSplashScreen

 private static void ShowSplashScreen()
 {
     SplashScreen splash = new SplashScreen("Resources/SplashScreen.png");
     splash.Show(false, true);
     Thread.Sleep(1500);
     splash.Close(TimeSpan.FromSeconds(1));
     Thread.Sleep(1000);
 }
开发者ID:gczarnocki,项目名称:raster-paint,代码行数:8,代码来源:StartWindow.xaml.cs

示例11: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            SplashScreen s = new SplashScreen("/Images/shh.png");
            s.Show(false);
            Thread.Sleep(3000);//让SplashScreen图片显示3秒
            s.Close(new TimeSpan(0, 0, 1));//登录窗体显示后1秒关闭这个SplashScreen

            base.OnStartup(e);
        }
开发者ID:dalinhuang,项目名称:ChargeLeaderSystem,代码行数:9,代码来源:App.xaml.cs

示例12: OnStartup

        protected override void OnStartup(object sender, StartupEventArgs e)
        {
            var imageService = _container.GetInstance<IImageService>();

            var splash = new SplashScreen("Resources/splash.jpg");
            splash.Show(false);
            imageService.Initialize();
            splash.Close(TimeSpan.FromSeconds(2));

            DisplayRootViewFor<MainViewModel>();
        }
开发者ID:ahmetabdi,项目名称:swtor-caster,代码行数:11,代码来源:Bootstrapper.cs

示例13: MainWindow

 public MainWindow()
 {
     SplashScreen screen = new SplashScreen(
         new Random().Next(1,3) == 1 ?
         "/Resources/blueo.png":"/Resources/redx.png");
     screen.Show(false);
     InitializeComponent();
     HashTables.Initialize();
     ResetButton1_Click(null,null);
     screen.Close(TimeSpan.MinValue);
 }
开发者ID:pmorris2012,项目名称:Ultimate-Tic-Tac-Toe,代码行数:11,代码来源:MainWindow.xaml.cs

示例14: closeSplash

        private static void closeSplash(SplashScreen splash)
        {
            if (splash == null)
                return;

            try
            {
                splash.Close(TimeSpan.FromSeconds(0.3));
            }
            catch (Exception)
            {
                try
                {
                    splash.Close(TimeSpan.Zero);
                }
                catch
                {
                    //whatever 
                }
            }

        }
开发者ID:KhalidElSayed,项目名称:Ema-Personal-Wiki,代码行数:22,代码来源:App.xaml.cs

示例15: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var splashScreen = new SplashScreen("resources/quikpix-noback.png");
            splashScreen.Show(false);

            var main = new Main();
            main.Show();

            //var browser = new MovieViewer();
            //browser.Show();

            splashScreen.Close(TimeSpan.FromSeconds(2));
        }
开发者ID:ebouwsema,项目名称:quikpix,代码行数:15,代码来源:App.xaml.cs


注:本文中的System.Windows.SplashScreen.Close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。