Exemplo n.º 1
0
        private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox         scenarioListBox = sender as ListBox;
            ZNavigationItem s = scenarioListBox.SelectedItem as ZNavigationItem;

            if (s != null)
            {
                _navigate(s, null);
            }
        }
Exemplo n.º 2
0
        private void _navigate(ZNavigationItem s, object args = null)
        {
            if (SuspensionManager.SessionState.ContainsKey("Next"))
            {
                SuspensionManager.SessionState["Prev"] = SuspensionManager.SessionState["Next"];
            }
            SuspensionManager.SessionState["Next"] = scenarioListBox.SelectedIndex;

            ScenarioFrame.Navigate(s.ClassType, args);

            checkAdditionButtons();
        }
Exemplo n.º 3
0
        public void checkAdditionButtons()
        {
            ZNavigationItem frameToNavItem = _frameToNavigationItem();

            backButton.Visibility    = (ScenarioFrame.CanGoBack) ? Visibility.Visible : Visibility.Collapsed;
            refreshButton.Visibility = ((new string[] { "Start", "Autoren", "Zitate", "Thema", "Sammlung" }).Contains(frameToNavItem.Title)) ? Visibility.Visible : Visibility.Collapsed;

            if (scenarioListBox.Items.Contains(frameToNavItem))
            {
                scenarioListBox.SelectedItem = frameToNavItem;
            }
        }
Exemplo n.º 4
0
        private void searchButton_Click(object sender, RoutedEventArgs e)
        {
            ZNavigationItem s = searchCombobox.SelectedItem as ZNavigationItem;

            if (s != null)
            {
                ZNavigationArgs args = new ZNavigationArgs()
                {
                    SearchValue = searchBox.Text, Refresh = true
                };
                _navigate(s, args);
            }
        }
Exemplo n.º 5
0
        private void refresh_click(object sender, RoutedEventArgs e)
        {
            ZNavigationItem navItem = _frameToNavigationItem();
            ZNavigationArgs args    = new ZNavigationArgs()
            {
                SearchValue = SearchValue, Refresh = true
            };

            if (navItem.ClassType != null)
            {
                _navigate(navItem, args);
            }
        }