Exemple #1
0
 private void GenerateMenu()
 {
     changeStateMenu = ContextMenuItem.CreateAndRegister(this, StateMenuEventId, Messages.Menu_SetState);
     Enum.GetValues(typeof(AlternativeState)).Cast <AlternativeState>().ToList().ForEach(state =>
     {
         ContextMenuItem menuItem = ContextMenuItem.CreateAndRegister(this, state.GetName().ToUpper(),
                                                                      state.GetName(), true);
         menuItem.Action = () => State = state;
         menu[state]     = menuItem;
     });
 }
Exemple #2
0
 public FlowLayoutAlternativeState(AlternativeState state, int index)
 {
     OldState = state.GetName();
     Color    = state.GetColor();
     Index    = index;
     Init();
 }