Beispiel #1
0
 void createEntryObjectMenu()
 {
     foreach (var entryControl in EntryObjectControlManager.Instance.Controls)
     {
         //first check if we have A6W entry. If yes then skip it from Add menu
         if (!entryControl.Key.CanBeManuallyAdded())
         {//TODO:Add this to the server part (in SaveTrainingDay method)
             continue;
         }
         string text        = EntryObjectLocalizationManager.Instance.GetString(entryControl.Key, EnumLocalizer.EntryObjectName);
         string description = EntryObjectLocalizationManager.Instance.GetString(entryControl.Key, EnumLocalizer.EntryObjectShortDescription);
         var    image       = PluginsManager.Instance.GetEntryObjectProvider(entryControl.Key).ModuleImage;
         var    item        = new ImageSourceListItem <Type>(text, image, entryControl.Key);
         item.Description = description;
         EntryItems.Add(item);
     }
 }
Beispiel #2
0
        public void AddOptionsControl(IOptionsControl control)
        {
            //FIX: strange bug but this solves it
            var parent = ((Control)control).Parent as ContentControl;

            if (parent != null)
            {
                parent.Content = null;
            }
            //end fix

            var tabItem = new ImageSourceListItem <IOptionsControl>();

            tabItem.Text  = control.Title;
            tabItem.Value = control;
            tabItem.Image = control.Image;
            xtraTabControl1.Items.Add(tabItem);
        }