Пример #1
0
 void RegisterNavigationMenuItem(BarLinkContainerItem menuItem, ModuleType type) {
     BarCheckItem biModule = new BarCheckItem();
     biModule.Caption = ViewModel.GetModuleCaption(type);
     biModule.Name = "biModule" + ViewModel.GetModuleName(type);
     biModule.Glyph = (System.Drawing.Image)ViewModel.GetModuleImage(type);
     biModule.GroupIndex = 1;
     biModule.BindCommand((t) => ViewModel.SelectModule(t), ViewModel, () => type);
     menuItem.AddItem(biModule);
 }
Пример #2
0
 void RegisterNavigationMenuItems(BarLinkContainerItem menuItem, ModuleType[] types) {
     for(int i = 0; i < types.Length; i++)
         RegisterNavigationMenuItem(menuItem, types[i]);
 }