Ejemplo n.º 1
0
        public Settings(AppBar appbar)
        {
            InitializeComponent();

            DataContext = Model = new SettingsModel(appbar);

            Owner = appbar;
            ShowDialog();
        }
Ejemplo n.º 2
0
        public Settings(AppBar appbar)
        {
            InitializeComponent();

            DataContext = Model = new SettingsModel(appbar);

            Owner = appbar;
            ShowDialog();
        }
Ejemplo n.º 3
0
        private void Hide_Click(object sender, EventArgs e)
        {
            AppBar _appbar = GetAppBar;

            if (_appbar == null || _appbar.Visibility == Visibility.Hidden)
            {
                return;
            }

            _appbar.AppBarHide();
        }
Ejemplo n.º 4
0
        private void Show_Click(object sender, EventArgs e)
        {
            AppBar _appbar = GetAppBar;

            if (_appbar == null || _appbar.Visibility == Visibility.Visible)
            {
                return;
            }

            _appbar.AppBarShow();
        }
Ejemplo n.º 5
0
        private void Reload_Click(object sender, EventArgs e)
        {
            AppBar _appbar = GetAppBar;

            if (_appbar == null)
            {
                return;
            }

            _appbar.Reload();
        }
Ejemplo n.º 6
0
        private void Visibility_SubmenuOpened(object sender, EventArgs e)
        {
            AppBar _appbar = GetAppBar;

            if (_appbar == null)
            {
                return;
            }

            MenuItem _this = (MenuItem)sender;

            (_this.Items.GetItemAt(0) as MenuItem).IsChecked = _appbar.Visibility == Visibility.Visible;
            (_this.Items.GetItemAt(1) as MenuItem).IsChecked = _appbar.Visibility == Visibility.Hidden;
        }
Ejemplo n.º 7
0
        private void Save(bool finalize)
        {
            Model.Save();

            Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (Action)(() =>
            {
                AppBar _appbar = (Application.Current as App).GetAppBar;

                if (_appbar == null)
                {
                    return;
                }

                _appbar.Reset(finalize);
            }));
        }
Ejemplo n.º 8
0
        public void OpenSettings()
        {
            Settings _settings = Windows.OfType <Settings>().FirstOrDefault();

            if (_settings != null)
            {
                _settings.WindowState = WindowState.Normal;
                _settings.Activate();
                return;
            }

            AppBar _appbar = GetAppBar;

            if (_appbar == null)
            {
                return;
            }

            new Settings(_appbar);
        }