Esempio n. 1
0
        public MainWindow()
        {
            var manager = new WpfWindowManager(this);

            manager.ManageDefault();
            manager.Initialize();
            InitializeComponent();
            Messenger.Default.Register <NotificationMessage>(this, handleStatusMessage);
            Messenger.Default.Register <ShowWindowMessage>(this, handleOpenWindow);
            this.Closing += MainWindow_Closing;
        }
Esempio n. 2
0
        public MainWindow()
        {
            var manager = new WpfWindowManager(this);

            manager.ManageDefault();
            manager.Initialize();
            InitializeComponent();
            Messenger.Default.Register <NotificationMessage>(this, handleStatusMessage);
            Messenger.Default.Register <ShowWindowMessage>(this, handleOpenWindow);
            this.Closing += MainWindow_Closing;
            LocalizeDictionary.Instance.Culture = System.Globalization.CultureInfo.CurrentUICulture;
        }
Esempio n. 3
0
 public MainWindow()
 {
     manager = new WpfWindowManager(this);
     manager.ManageDefault();
     manager.Manage(nameof(Topmost));
     manager.ApplyToSettings(Settings.Default);
     manager.Initialize();
     InitializeComponent();
     updateChecker = new WpfUpdateChecker(App.UPDATE_URL, this, App.UPDATE_MODE);
     ((INotifyCollectionChanged)lstHistory.Items).CollectionChanged += LastColors_CollectionChanged;
     LocalizeDictionary.Instance.Culture = System.Globalization.CultureInfo.CurrentUICulture;
 }
Esempio n. 4
0
        public MainWindow()
        {
            // Create new instances of WindowManager and UpdateChecker for WPF.
            manager       = new WpfWindowManager(this);
            updateChecker = new WpfUpdateChecker(updateCheckUrl, this, updateIdentifier);

            // --- EXAMPLE 1/2: Persist Window State/ Make Settings Portable ---
            // Manage default properties for Window class.
            manager.ManageDefault();

            // Add any public property of the window with this method to let its value
            // be saved when the application is closed and loaded when it starts.
            manager.Manage(nameof(this.OpenCount), defaultValue: -1);

            // Make default settings portable.
            manager.ApplyToSettings(Properties.Settings.Default);

            // Initialize the manager. Please make sure this method is called BEFORE the window is initialized.
            manager.Initialize();

            //Initialize the window.
            InitializeComponent();
        }