コード例 #1
0
		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;
			}
		}
コード例 #2
0
        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;
            }
        }