Example #1
0
        private void SectionListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Domain.SectionType section = Domain.SectionType.Null;
            switch (SectionListBox.SelectedIndex)
            {
            case 7:
                section = Domain.SectionType.AdministrationFolders;
                MarginStackPanel.Visibility    = Visibility.Visible;
                AdminContentControl.Visibility = Visibility.Visible;
                break;

            default:
                MarginStackPanel.Visibility    = Visibility.Collapsed;
                AdminContentControl.Visibility = Visibility.Collapsed;
                break;
            }

            Publisher.Publish <SectionSelectionEvent>(
                new SectionSelectionEvent
            {
                Section = section
            });
        }
Example #2
0
        public void Navigate(Domain.SectionType section)
        {
            if (!SectionCache.ContainsKey(section))
            {
                switch (section)
                {
                case Domain.SectionType.AdministrationFolders:
                    SelectedSectionViewModel = new FolderSettingsViewModel();
                    SelectedSectionIndex     = 7;
                    break;

                case Domain.SectionType.AdministrationUserMaintenance:

                    break;

                case Domain.SectionType.AdministrationPricelists:
                    break;

                case Domain.SectionType.AdministrationOptimization:
                    break;

                case Domain.SectionType.AdministrationMarkuprules:
                    break;

                case Domain.SectionType.AdministrationRoundingrules:
                    break;

                case Domain.SectionType.AdministrationRollback:
                    break;

                case Domain.SectionType.AdministrationProcesses:
                    break;
                }
                SectionCache.Add(section, SelectedSectionViewModel);
            }
            else //in cache
            {
                switch (section)
                {
                case Domain.SectionType.AdministrationFolders:
                    SelectedSectionViewModel = ((FolderSettingsViewModel)SectionCache[section]);

                    break;

                case Domain.SectionType.AdministrationUserMaintenance:

                    break;

                case Domain.SectionType.AdministrationPricelists:
                    break;

                case Domain.SectionType.AdministrationOptimization:
                    break;

                case Domain.SectionType.AdministrationMarkuprules:
                    break;

                case Domain.SectionType.AdministrationRoundingrules:
                    break;

                case Domain.SectionType.AdministrationRollback:
                    break;

                case Domain.SectionType.AdministrationProcesses:
                    break;
                }
            }
        }