public void Load (CommandExecutionContext ctx, bool includeDefault, bool includeDefaultCustomizer, ExecutionModeIncludeFilter filter) { bool separate = false; foreach (List<IExecutionMode> modeList in ExecutionModeCommandService.GetExecutionModeCommands (ctx, includeDefault, includeDefaultCustomizer)) { bool addedSome = false; foreach (IExecutionMode mode in modeList) { if (filter == null || filter (mode)) { if (separate) { modes.Add (null); comboMode.AppendText ("--"); separate = false; } modes.Add (mode); comboMode.AppendText (mode.Name); addedSome = true; } } separate = addedSome; } }
public void Load(CommandExecutionContext ctx, bool includeDefault, bool includeDefaultCustomizer, ExecutionModeIncludeFilter filter) { bool separate = false; foreach (List <IExecutionMode> modeList in ExecutionModeCommandService.GetExecutionModeCommands(ctx, includeDefault, includeDefaultCustomizer)) { bool addedSome = false; foreach (IExecutionMode mode in modeList) { if (filter == null || filter(mode)) { if (separate) { modes.Add(null); comboMode.AppendText("--"); separate = false; } modes.Add(mode); comboMode.AppendText(mode.Name); addedSome = true; } } separate = addedSome; } }