public static void AttachPositionHandler(this Window window, IWindowStateStore store, string windowName, bool isMainWindow = false)
 {
     var unused = new WindowStateHandler(store, window, windowName, true)
     {
         IsMainWindow = isMainWindow
     };
 }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();

            _eventAggregator = new EventAggregator();

            _viewInteractionResolver = new MainWindowViewInteractionResolver {
                Owner = this
            };

            _databaseInteractions = new DatabaseInteractions(_eventAggregator, _viewInteractionResolver);

            _positionManager = new WindowStateHandler(Settings.Current, this, "Main");

#if (!DEBUG)
            Task.Factory.StartNew(() =>
            {
                AppUpdateManager.Current.CheckForUpdates(false).ConfigureAwait(false);
            });
#endif

            AppUpdateManager.Current.PropertyChanged += (sender, args) =>
            {
                if (args.PropertyName == nameof(AppUpdateManager.UpdateActionText) && AppUpdateManager.Current.UpdateActionText == "Restart")
                {
                    DropNewUpdatePanel.IsPopupOpen = true;
                }
            };

            DockSearch.Visibility = Visibility.Collapsed;

            Initialize();
        }
Example #3
0
 public static void AttachPositionHandler(this Window window, IWindowStateStore store, string windowName)
 {
     var unused = new WindowStateHandler(store, window, windowName, true);
 }