Ejemplo n.º 1
0
        public UserControl SelectView <C>(int i)
        {
            IVisualModule module = ((IVisualModule)modules[i]);

            module.OnSelected();
            return(module.GetPage());
        }
Ejemplo n.º 2
0
        public void SelectDynamically(int index)
        {
            lvModules.SelectedIndex = index;
            IVisualModule module = VisualModules[0];

            spModule.Children.Clear();
            _selectedModule       = module;
            lblModulTitle.Content = _selectedModule.GetTitle();
            spModule.Children.Add((_controller).ModulHandler.SelectView(module));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This function will be called if the user selects a new module from the lvModules
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ListViewItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            _selectedModule?.OnDisselected();
            var           item   = sender as ListViewItem;
            IVisualModule module = item.Content as IVisualModule;

            spModule.Children.Clear();
            _selectedModule       = module;
            lblModulTitle.Content = _selectedModule.GetTitle();
            spModule.Children.Add((_controller).ModulHandler.SelectView(module));
        }
Ejemplo n.º 4
0
 public Control SelectView(IVisualModule module)
 {
     module.OnSelected();
     return(module.GetPage()); // TODO the hash value approach is too simple...
 }