コード例 #1
0
        internal void PreloadAssemblies()
        {
            DevExpressLibraryPreloader.PreLoadCarousel();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadChart();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadFlowLayout();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadGrid();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadNavBar();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadPivot();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadPrinting();
            App.DoEvents();

            DevExpressLibraryPreloader.PreLoadRibbon();
            App.DoEvents();

            DevExpressLibraryPreloader.PreloadMap();
            App.DoEvents();

            AuthenticationHost.Register();
        }
コード例 #2
0
ファイル: HubViewModel.cs プロジェクト: rlefever68/Broobu
 /// <summary>
 /// Initializes the ViewModel the first time it is called.
 /// This method will be called from the View that implements the
 /// ViewModel
 /// </summary>
 /// <param name="parameters">The parameters used to initialize the ViewModel</param>
 protected override void InitializeInternal(object[] parameters)
 {
     DevExpress.Xpf.Core.DXSplashScreen.Close();
     AuthenticationHost.WaitInfo = new GetMenuWaitInfo();
     AuthenticationHost.StartSessionAsync(GetUserEnvironmentInfo);
     FeedbackText = "Welcome, Please sign in or register to continue.";
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TrayWindow"/> class.
        /// </summary>
        /// <remarks></remarks>
        public TrayWindow()
        {
            if (LauncherConfigurationHelper.RunOnlyOneInstance)
            {
                string    runningProcess = Process.GetCurrentProcess().ProcessName;
                Process[] processes      = Process.GetProcessesByName(runningProcess);

                if (processes.Length > 1)
                {
                    MessageBox.Show("Application is already running", "Stop", MessageBoxButton.OK, MessageBoxImage.Error);
                    Application.Current.Shutdown();
                }
            }

            _launcherId   = Guid.NewGuid().ToString();
            this.ToolTip  = "Broobu Boutique";
            ShowInTaskbar = false;
            //WindowState = WindowState.Minimized;
            Width            = 0;
            Height           = 0;
            this.WindowStyle = WindowStyle.None;
            this.Left        = -1;
            this.Top         = -1;

            ApplicationHelper.EnableExceptionHandling((nfo) =>
            {
                IsEnabled = true;
                _splsh.Close();
            });
            _splsh.Show();
            IsEnabled = false;
            InitializeComponent();
            ni       = CreateNotifyIcon();
            Closing += (s, e) => AuthenticationHost.TerminateSessionAsync(ShutdownDesktop);
            // Application.Current.Resources = MobiLauncherThemeHelper.ReadCommonThemes();
            App.DoEvents();
            _host                             = new LauncherHost(this);
            _host.LauncherId                  = HostApplication.LauncherId;
            Host.BroadcastReceived           += new BroadcastReceivedEventHandler(BroadcastReceived);
            Host.RequestShellContextReceived += new RequestShellContextReceivedEventHandler(RequestShellContextReceived);
            Host.UnloadPluginReceived        += new UnloadPluginReceivedEventHandler(UnloadPluginReceived);
            //PluginHost.Current = _host;
            Loaded += (s, e) =>
            {
                AppDomain.CurrentDomain.AssemblyLoad += (s1, e1) =>
                {
                    //SetFeedBackText("Iris Desktop is busy.",
                    //    String.Format("Loading : {0}", e1.LoadedAssembly.FullName));
                };
                App.DoEvents();
                SetFeedBackText("Iris Desktop is busy.", "Please Wait...");
                _host.PreloadAssemblies();
                _splsh.Close();
                IrisSession.Current = SessionFactory.CreateDefaultIrisSession();
                StartSessionAsync(GetBoutiqueUserInfo, LoginCanceled);
            };
        }
コード例 #4
0
 /// <summary>
 /// Mis the logon click.
 /// </summary>
 public void LogonLogoff()
 {
     if (IrisSession.Current.IsDefaultSession)
     {
         StartSessionAsync(GetBoutiqueUserInfo);
     }
     else
     {
         AuthenticationHost.TerminateSessionAsync(OnTerminateSessionCompleted);
     }
 }
コード例 #5
0
 /// <summary>
 /// Handles the Click event of the miLogon control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 /// <remarks></remarks>
 void miLogon_Click(object sender, EventArgs e)
 {
     if (IrisSession.Current.IsDefaultSession)
     {
         StartSessionAsync(GetBoutiqueUserInfo, LoginCanceled);
     }
     else
     {
         AuthenticationHost.TerminateSessionAsync(OnTerminateSessionCompleted);
     }
 }
コード例 #6
0
ファイル: HubViewModel.cs プロジェクト: rlefever68/Broobu
 public void LogonLogoff()
 {
     if (WulkaSession.Current.IsDefaultSession)
     {
         AuthenticationHost.StartSessionAsync(GetUserEnvironmentInfo);
     }
     else
     {
         AuthenticationHost.TerminateSessionAsync(OnTerminateSessionCompleted);
     }
 }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HostWindow" /> class.
        /// </summary>
        public HostWindow()
        {
            ApplicationHelper.EnableExceptionHandling((nfo) =>
            {
                IsEnabled = true;
                _splash.Close();
            });
            _splash.Show();
            if (LauncherConfigurationHelper.RunOnlyOneInstance)
            {
                string runningProcess = Process.GetCurrentProcess().ProcessName;
                var    processes      = Process.GetProcessesByName(runningProcess);
                if (processes.Length > 1)
                {
                    MessageBox.Show("Broobu Desktop is already running", "Stop", MessageBoxButton.OK, MessageBoxImage.Error);
                    Application.Current.Shutdown();
                }
            }
            IsEnabled = false;
            InitializeComponent();
            SizeToContent     = SizeToContent.Height;
            Width             = SystemParameters.PrimaryScreenWidth;
            Closing          += (s, e) => AuthenticationHost.TerminateSessionAsync(ShutdownDesktop);
            AppBar.HostWindow = this;
            App.DoEvents();

            _host = new LauncherHost(this)
            {
                LauncherId = HostApplication.LauncherId
            };

            Loaded += (s, e) =>
            {
                ApplyTheme(LauncherConfigurationHelper.DefaultTheme);
                SizeToContent = SizeToContent.Height;
                var measuredHeight = Height;
                SizeToContent = SizeToContent.Manual;
                Height        = measuredHeight;

                AppDomain.CurrentDomain.AssemblyLoad += (s1, e1) => SetSplashFeedback(String.Format("Loading : {0}",
                                                                                                    e1.LoadedAssembly.
                                                                                                    FullName));
                _host.PreloadAssemblies();
                Thread.Sleep(5000);
                _splash.Close();
                IrisSession.Current = SessionFactory.CreateDefaultIrisSession();
                App.DoEvents();
                StartSessionAsync(GetBoutiqueUserInfo);
            };
        }
コード例 #8
0
        /// <summary>
        /// Handles the Click event of the miExit control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        void miExit_Click(object sender, EventArgs e)
        {
            bool close = true;

            if (_host.HasRunningApplications)
            {
                close = false;
                MessageBoxResult result = MessageBox.Show(
                    "Broobu Boutique and all applications will be closed. All unsaved data will be lost. Are u sure?",
                    "Warning", MessageBoxButton.YesNo, MessageBoxImage.Question);
                if (result == MessageBoxResult.Yes)
                {
                    close = true;
                }
            }
            if (close)
            {
                AuthenticationHost.TerminateSessionAsync(ShutdownDesktop);
            }
        }
コード例 #9
0
 /// <summary>
 /// Bis the exit click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="ItemClickEventArgs"/> instance containing the event data.</param>
 private void BiExitClick(object sender, ItemClickEventArgs e)
 {
     AuthenticationHost.TerminateSessionAsync(ShutdownDesktop);
 }
コード例 #10
0
 /// <summary>
 /// Mis the logon admin click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="ExecuteRoutedEventArgs" /> instance containing the event data.</param>
 private void MiLogonAdminClick(object sender, RoutedEventArgs e)
 {
     IrisSession.Current.Username = AuthenticationDefaults.RootUserName;
     AuthenticationHost.StartNativeSessionAsync();
 }
コード例 #11
0
 /// <summary>
 /// Starts the session asynchronous.
 /// </summary>
 /// <param name="act">The act.</param>
 void StartSessionAsync(Action act)
 {
     AuthenticationHost.StartSessionAsync(loginCompletedAction: act);
 }
コード例 #12
0
 /// <summary>
 /// Starts the session async.
 /// </summary>
 /// <param name="act">The act.</param>
 /// <param name="cancelAction">The cancel action.</param>
 void StartSessionAsync(Action act, Action cancelAction = null)
 {
     AuthenticationHost.StartSessionAsync(act, cancelAction);
 }
コード例 #13
0
 public void Try_AuthenticationHost()
 {
     AuthenticationHost.StartNativeSessionAsync(() => { });
 }
コード例 #14
0
ファイル: HubViewModel.cs プロジェクト: rlefever68/Broobu
 /// <summary>
 /// Logons the guest.
 /// </summary>
 private void LogonGuest()
 {
     WulkaSession.Current     = SessionFactory.CreateDefaultWulkaSession();
     WulkaCredentials.Current = WulkaSession.Current.Credentials;
     AuthenticationHost.TerminateSessionAsync(GetUserEnvironmentInfo);
 }
コード例 #15
0
ファイル: HubViewModel.cs プロジェクト: rlefever68/Broobu
 public void Exit()
 {
     AuthenticationHost.WaitInfo = new ShuttingDownWaitInfo();
     AuthenticationHost.TerminateSessionAsync(ShutdownDesktop);
 }