Esempio n. 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
#if DEBUG
                DiagnosticsTool.MyDebug(string.Format("DefaultBrowser_Load(object sender = {0}, EventArgs e = {1})", (sender != null) ? sender.ToString() : "null", (e != null) ? e.ToString() : "null"));
#endif
                //this.Width = 0;
                //this.Height = 0;
                (this.DataContext as ViewModel.ModernBrowserViewModel).Title = Factory.FactoryConfig.GetAttribute("Atomus", "ServiceName");
            }
            catch (Exception ex)
            {
                (this).WindowsMessageBoxShow(Application.Current.Windows[0], ex);
                Application.Current.Shutdown();
            }

            try
            {
                this.SetLoginControl();

                //System.Threading.Thread.Sleep(5000);
            }
            catch (Exception ex)
            {
                (this).WindowsMessageBoxShow(Application.Current.Windows[0], ex);
                Application.Current.Shutdown();
            }
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
#if DEBUG
                DiagnosticsTool.MyDebug(string.Format("DefaultBrowser_Load(object sender = {0}, EventArgs e = {1})", (sender != null) ? sender.ToString() : "null", (e != null) ? e.ToString() : "null"));
#endif
                //this.Width = 0;
                //this.Height = 0;
                (this.DataContext as ViewModel.ModernBrowserDebugViewModel).Title = Factory.FactoryConfig.GetAttribute("Atomus", "ServiceName");

                (Application.Current as IAction).ControlAction(this, "Login");
                //beforeActionEventHandler.Invoke(this, new AtomusControlEventArgs() { Action = "Login" });

                this.SetBrowserViewer();

                this.SetToolbar();

                this.SetCenter();

                this.gridSplitter = new GridSplitter()
                {
                    Width = 5,
                    HorizontalAlignment = HorizontalAlignment.Right,
                    VerticalAlignment   = VerticalAlignment.Stretch,
                    ResizeBehavior      = GridResizeBehavior.CurrentAndNext,
                    Background          = new SolidColorBrush("#2a3344".ToMediaColor())
                };
                this.gridCenter.Children.Add(this.gridSplitter);

                this.SetTabControl();

                //(Application.Current as IAction).ControlAction(this, "AddUserControl");
                //beforeActionEventHandler.Invoke(this, new AtomusControlEventArgs() { Action = "AddUserControl" });
            }
            catch (Exception ex)
            {
                (this).WindowsMessageBoxShow(Application.Current.Windows[0], ex);
                Application.Current.Shutdown();
            }
        }