Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            WpfSingleInstance.Make();
            Config.Load();

            this.DispatcherUnhandledException += App_DispatcherUnhandledException;
        }
Example #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            #region Single Instance
            base.OnStartup(e);
            WpfSingleInstance.Make("MyWpfApplication", this);
            #endregion Single Instance

            //create the notifyicon (it's a resource declared in NotifyIconResources.xaml
            notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
        }
Example #3
0
        public static void Main(string[] args)
        {
            App app = new App();

            //register the single instance application
            WpfSingleInstance.Make("C.B.R.", app);

            ISplashScreen splashScreen = SplashScreenManager.CreateSplashScreen(typeof(SplashContent));

            SplashScreenManager.Splash.Message = "Starting...";

            app.InitializeComponent();
            app.Run();
        }
Example #4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            WpfSingleInstance.Make();

            base.OnStartup(e);

            InitializeOffline();

            dataUpdater = new DataUpdater(new ProjectRepository(),
                                          new ActivityRepository(), queueManager.ConnectionMonitor, new Base64EncryptorEx());
            dataUpdater.ShowError += ShowError;
            if (dataUpdater.IsConnected)
            {
                dataUpdater.Update();
                dataUpdater.StartTimer();
            }

            MainWindow = new MainWindow();
            SetWindowSettings();

            MainWindow.ShowDialog();
        }