当前位置: 首页>>代码示例>>C#>>正文


C# Core.Add方法代码示例

本文整理汇总了C#中Core.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Core.Add方法的具体用法?C# Core.Add怎么用?C# Core.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Core的用法示例。


在下文中一共展示了Core.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			if (this.Disabled) {
				// BUG: There seems to be a bug in jQuery UI meaning disabling all the tabs
				// doesn't work, so disable each tab manually. The overall "disabled" flag
				// is kept as false so we use the List<int> entry point instead.
				this.DisabledArray.Clear();
				for (int i=0; i < this.Tabs._Panes._Panes.Count(); i++) {
					this.DisabledArray.Add(i);
				}				
				// Following line is left here for when the jQuery UI library is fixed.
				//options.Add(this.Disabled, "disable", this.Disabled.JsBool());
			}
			if (this.DisabledArray != null && this.DisabledArray.Count() > 0) {
				options.Add("disabled", this.DisabledArray.JsArray());
			}
			options.Add(!this.IsNullOrEmpty(this.Fx), "fx", this.Fx);
			options.Add(!this.IsNullEmptyOrDefault(this.Evt, DEFAULT_EVENT), "event", this.Evt.InDoubleQuotes());
			options.Add(this.Cache, "cache", this.Cache.JsBool() );
			options.Add(!this.IsNullOrEmpty(this.AjaxOptions), "ajaxOptions", this.AjaxOptions);
			options.Add(this.Collapsible, "collapsible", this.Collapsible.JsBool() );
			// Cookie is a little bit different because it's an object, so just add it's options in
			options.Add(this.Cookie.Options.GetCookieScriptOption());
			options.Add(!this.IsNullEmptyOrDefault(this.IdPrefix, DEFAULT_ID_PREFIX), "idPrefix", this.IdPrefix.InDoubleQuotes());
			options.Add(!this.IsNullEmptyOrDefault(this.PanelTemplate, DEFAULT_PANEL_TEMPLATE), "panelTemplate", this.PanelTemplate.InDoubleQuotes());
			options.Add(!this.IsNullEmptyOrDefault(this.Spinner, DEFAULT_SPINNER), "spinner", this.Spinner.InDoubleQuotes());
			options.Add(!this.IsNullEmptyOrDefault(this.TabTemplate, DEFAULT_TAB_TEMPLATE), "tabTemplate", this.TabTemplate.InDoubleQuotes());
			if (this.Tabs.Panes.HasSelectedTab() && this.Tabs.Panes.GetSelectedTab().Index > 0) {
				options.Add( this.Tabs.Panes.HasSelectedTab(), "selected", this.Tabs.Panes.GetSelectedTab().Index.ToString() );
			}
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:35,代码来源:Options-Core.cs

示例2: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.Icons, DEFAULT_ICONS), "icons", "{{ submenu: {0} }}", this.Icons.InDoubleQuotes());
			options.Add(!this.IsNullEmptyOrDefault(this.Menus, DEFAULT_MENUS), "menus", this.Menus.InDoubleQuotes() );
			options.Add(!this.IsNullEmptyOrDefault(this.Role, DEFAULT_ROLE), "role", this.Role.InDoubleQuotes());

			// Position is a little bit different because it's an object, so just add it's options in
			options.Add(this.Position.Options.GetPositionScriptOption());
		}
开发者ID:akhuang,项目名称:Fluqi,代码行数:14,代码来源:Options-Core.cs

示例3: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(!this.IsNullOrEmpty(this.AppendTo), "appendTo", this.AppendTo.InDoubleQuotes());
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.Icons, DEFAULT_ICONS), "icons", "{{ button: {0} }}", this.Icons.InDoubleQuotes());
			options.Add(this.Position.Options.GetPositionScriptOption());
			if (this.Width.HasValue) {
				options.Add(this.Width.HasValue, "width", this.Width.Value.ToString());
			}
		}
开发者ID:toepoke,项目名称:Fluqi,代码行数:14,代码来源:Options-Core.cs

示例4: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.Text, "text", this.Text.JsBool());
			
			// icons must be set as a pair
			string iconSetting = "";
			if (!this.IsNullOrEmpty(this.PrimaryIconClass) || !this.IsNullOrEmpty(this.SecondaryIconClass)) {
				iconSetting = string.Format("{{ primary: '{0}', secondary: '{1}' }}", this.PrimaryIconClass, this.SecondaryIconClass);
				options.Add("icons", iconSetting);
			}
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:16,代码来源:Options-Core.cs

示例5: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			// default is "disable"
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());

			options.Add(!this.IsNullOrEmpty(this.Source), "source", this.Source);
			options.Add(!this.IsNullEmptyOrDefault(this.AppendTo, DEFAULT_APPEND_TO), "appendTo", this.AppendTo.InDoubleQuotes());
			options.Add(this.AutoFocus, "autoFocus", this.AutoFocus.JsBool());
			options.Add(!this.IsDefault(this.Delay, DEFAULT_DELAY), "delay", this.Delay.ToString());
			options.Add(!this.IsDefault(this.MinimumLength, DEFAULT_MINIMUM_LENGTH), "minLength", this.MinimumLength.ToString());

			// Position is a little bit different because it's an object, so just add it's options in
			options.Add(this.Position.Options.GetPositionScriptOption());
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:18,代码来源:Options-Core.cs

示例6: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			if (this.Disabled) {
				// BUG: There seems to be a bug in jQuery UI meaning disabling all the tabs
				// doesn't work, so disable each tab manually. The overall "disabled" flag
				// is kept as false so we use the List<int> entry point instead.
				this.DisabledArray.Clear();
				for (int i=0; i < this.Tabs._Panes._Panes.Count(); i++) {
					this.DisabledArray.Add(i);
				}				
				// Following line is left here for when the jQuery UI library is fixed.
				//options.Add(this.Disabled, "disable", this.Disabled.JsBool());
			}
			if (this.DisabledArray != null && this.DisabledArray.Count() > 0) {
				options.Add("disabled", this.DisabledArray.JsArray());
			}
			options.Add(!this.IsNullEmptyOrDefault(this.Evt, DEFAULT_EVENT), "event", this.Evt.InDoubleQuotes());
			options.Add(!this.IsNullEmptyOrDefault(this.HeightStyle, DEFAULT_HEIGHT_STYLE), "heightStyle", this.HeightStyle.InDoubleQuotes());
			options.Add(this.Collapsible, "collapsible", this.Collapsible.JsBool() );
			// Show and hide are a little bit different because it's an object, so just add it's options in
			options.Add(this.ShowAnimation.Options.GetAnimationScriptOption());
			options.Add(this.HideAnimation.Options.GetAnimationScriptOption());
			if (this.Tabs.Panes.HasActiveTab() && this.Tabs.Panes.GetActiveTab().Index > 0) {
				options.Add( this.Tabs.Panes.HasActiveTab(), "active", this.Tabs.Panes.GetActiveTab().Index.ToString() );
			}
		}
开发者ID:akhuang,项目名称:Fluqi,代码行数:30,代码来源:Options-Core.cs

示例7: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(!this.IsNullOrEmpty(this.Content) && !this.IsEmptyQuotes(this.Content), "content", this.Content);
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.Items, DEFAULT_ITEMS), "items", this.Items);
			options.Add(!this.IsNullOrEmpty(this.ToolTipClass), "tooltipClass", this.ToolTipClass.InDoubleQuotes());
			options.Add(this.Track, "track", this.Track.JsBool());			
			// Position and Animation is a little bit different because it's an object, so just add it's options in
			options.Add(this.Position.Options.GetPositionScriptOption());
			options.Add(this.ShowAnimation.Options.GetAnimationScriptOption());
			options.Add(this.HideAnimation.Options.GetAnimationScriptOption());
		}
开发者ID:toepoke,项目名称:Fluqi,代码行数:16,代码来源:Options-Core.cs

示例8: ExecuteAction

        public GeneratorActionResult ExecuteAction(GeneratorArguments arguments, Core.InputFields.ActionInputValues values, Dictionary<string, string> parameters)
        {
            url = parameters["url"];
            token = parameters["token"];

            try
            {
                values.Add("CloneUrl", GetCloneUrl(values.GetString("projectId")));
            }
            catch (Exception ex)
            {
                return new GeneratorActionResult(false, ex.Message);
            }

            return new GeneratorActionResult(true, "");
        }
开发者ID:florisrobbemont,项目名称:uMadeEasy,代码行数:16,代码来源:GetGitlabCloneUrlAction.cs

示例9: ExecuteAction

        public GeneratorActionResult ExecuteAction(GeneratorArguments arguments, Core.InputFields.ActionInputValues values, Dictionary<string, string> parameters)
        {
            url = parameters["url"];
            token = parameters["token"];
            moveToken = parameters["moveToken"];

            try
            {
                var projectId = CreateProject(arguments.Name, "", "Websites");
                values.Add("projectId", projectId);
            }
            catch (Exception ex)
            {
                return new GeneratorActionResult(false, ex.Message);
            }

            return new GeneratorActionResult(true, "");
        }
开发者ID:florisrobbemont,项目名称:uMadeEasy,代码行数:18,代码来源:CreateGitlabProjectAction.cs

示例10: Part

        /// <summary>
        /// </summary>
        /// <param name="aFile"> </param>
        /// <param name="aSize"> </param>
        /// <returns> </returns>
        public FilePart Part(Core.File aFile, Int64 aSize)
        {
            FilePart returnPart = null;

            IEnumerable<FilePart> parts = aFile.Parts;
            if (!parts.Any() && aSize == 0)
            {
                returnPart = new FilePart {StartSize = aSize, CurrentSize = aSize, StopSize = aFile.Size, Checked = true};
                aFile.Add(returnPart);
            }
            else
            {
                // first search incomplete parts not in use
                foreach (FilePart part in parts)
                {
                    Int64 size = part.CurrentSize - Settings.Instance.FileRollbackBytes;
                    if (part.State == FilePart.States.Closed && (size < 0 ? 0 : size) == aSize)
                    {
                        returnPart = part;
                        break;
                    }
                }
                // if multi dling is enabled
                if (returnPart == null && Settings.Instance.EnableMultiDownloads)
                {
                    // now search incomplete parts in use
                    foreach (FilePart part in parts)
                    {
                        if (part.State == FilePart.States.Open)
                        {
                            // split the part
                            if (part.StartSize < aSize && part.StopSize > aSize)
                            {
                                returnPart = new FilePart {StartSize = aSize, CurrentSize = aSize, StopSize = part.StopSize};

                                // update previous part
                                part.StopSize = aSize;
                                part.Commit();
                                aFile.Add(returnPart);
                                break;
                            }
                        }
                    }
                }
            }
            return returnPart;
        }
开发者ID:sstraus,项目名称:xdcc-grabscher,代码行数:52,代码来源:FileActions.cs

示例11: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.AutoOpen, "autoOpen", this.AutoOpen.JsBool());
			options.Add(!this.CloseOnEscape, "closeOnEscape", this.CloseOnEscape.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.CloseText, DEFAULT_CLOSE_TEXT), "closeText", this.CloseText.InDoubleQuotes());
			options.Add(!this.IsNullOrEmpty(this.DialogClass), "dialogClass", this.DialogClass.InDoubleQuotes());
			options.Add(!this.Draggable, "draggable", this.Draggable.JsBool());

			if (!this.IsNullEmptyOrDefault(this.Height, DEFAULT_HEIGHT)) {
				if (this.IsNumeric(this.Height))
					options.Add("height", this.Height);
				else 
					options.Add("height", this.Height.InDoubleQuotes());
			}

			options.Add(!this.IsNullOrEmpty(this.Hide), "hide", this.Hide);
			options.Add(this.MinWidth != DEFAULT_MIN_WIDTH, "minWidth", this.MinWidth.ToString());
			options.Add(!this.IsNullEmptyOrDefault(this.MaxWidth, DEFAULT_MAX_WIDTH), "maxWidth", this.MaxWidth);
			options.Add(this.MinHeight != DEFAULT_MIN_HEIGHT, "minHeight", this.MinHeight.ToString());
			options.Add(!this.IsNullEmptyOrDefault(this.MaxHeight, DEFAULT_MAX_HEIGHT), "maxHeight", this.MaxHeight);
			options.Add(this.Modal, "modal", this.Modal.JsBool());

			if (this.Position != null && this.Position.Any() && !this.Position[0].IgnorantEquals(Options.DEFAULT_POSITION)) {
				if (this.Position.Count() == 1) {
					// only "left", "right", etc is supported in single mode
					options.Add("position", this.Position[0].InDoubleQuotes());

				} else {
					// if it's a numeric list, don't add quotes otherwise we do
					if (this.IsNumeric(this.Position[0]))
						options.Add("position", this.Position.JsArray());
					else 
						options.Add("position", this.Position.JsArray(false/*singleQuotes*/));
				}
			}

			options.Add(!this.Resizable, "resizable", this.Resizable.JsBool());
			options.Add(!this.IsNullOrEmpty(this.Show), "show", this.Show);
			options.Add(!this.Stack, "stack", this.Stack.JsBool());
			options.Add(!this.IsNullOrEmpty(this.Title), "title", this.Title.InDoubleQuotes());
			options.Add(this.Width != DEFAULT_WIDTH, "width", this.Width.ToString());
			options.Add(this.ZIndex != DEFAULT_ZINDEX, "zIndex", this.ZIndex.ToString());

			if (this.ButtonOptions != null && this.ButtonOptions.Buttons.Any()) {
				options.Add(this.ButtonOptions.GetButtonsScriptOptions());
			}
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:52,代码来源:Options-Core.cs

示例12: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			//bool bValue = false; int nValue = 0;

			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.IsNullOrEmpty(this.Culture), "culture", this.Culture.InDoubleQuotes());

			if (!this.IsNullEmptyOrDefault(this.DownIconClass, DEFAULT_DOWN_ICON_CLASS) && !this.IsNullEmptyOrDefault(this.UpIconClass, DEFAULT_UP_ICON_CLASS)) {
				// output both
				options.Add("icons", "{{ down: {0}, up: {1} }}", this.DownIconClass.InDoubleQuotes(), this.UpIconClass.InDoubleQuotes());
			} else if (!this.IsNullEmptyOrDefault(this.DownIconClass, DEFAULT_DOWN_ICON_CLASS)) {
				// just down
				options.Add("icons", "{{ down: {0} }}", this.DownIconClass.InDoubleQuotes());
			} else if (!this.IsNullEmptyOrDefault(this.UpIconClass, DEFAULT_UP_ICON_CLASS)) {
				// just up
				options.Add("icons", "{{ up: {0} }}", this.UpIconClass.InDoubleQuotes());
			}

			if (this.IsBool(this.Incremental)) {
				bool value = bool.Parse(this.Incremental);
				options.Add(!value, "incremental", value.JsBool());
			} else {
				// assume it's using the function method
				options.Add(!this.IsNullOrEmpty(this.Incremental), "incremental", this.Incremental );
			}

			if (!this.IsNullEmptyOrDefault(this.Min, DEFAULT_MIN_VALUE)) {
				options.Add(this.IsNumeric(this.Min), "min", this.Min);
				options.Add(!this.IsNumeric(this.Min), "min", this.Min.InDoubleQuotes());
			}
			if (!this.IsNullEmptyOrDefault(this.Max, DEFAULT_MAX_VALUE)) {
				options.Add(this.IsNumeric(this.Max), "max", this.Max);
				options.Add(!this.IsNumeric(this.Max), "max", this.Max.InDoubleQuotes());
			}

			options.Add(!this.IsNullEmptyOrDefault(this.NumberFormat, DEFAULT_NUMBER_FORMAT), "numberFormat", this.NumberFormat.InDoubleQuotes());
			options.Add(!this.IsDefault(this.Page, DEFAULT_PAGE), "page", this.Page.ToString());

			if (!this.IsNullEmptyOrDefault(this.Step, DEFAULT_STEP)) {
				options.Add(this.IsNumeric(this.Step), "step", this.Step);
				options.Add(!this.IsNumeric(this.Step), "step", this.Step.InDoubleQuotes());
			}
		}
开发者ID:akhuang,项目名称:Fluqi,代码行数:47,代码来源:Options-Core.cs

示例13: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(GetPositionScriptOption(false/*asChild*/));
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:8,代码来源:Options-Core.cs

示例14: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.Animated, DEFAULT_ANIMATED), "animated", this.Animated.InDoubleQuotes());
			options.Add(!this.AutoHeight, "autoHeight", this.AutoHeight.JsBool());
			options.Add(this.ClearStyle, "clearStyle", this.ClearStyle.JsBool());
			options.Add(this.Collapsible, "collapsible", this.Collapsible.JsBool());
			options.Add(!this.IsNullEmptyOrDefault(this.HeadingTag, DEFAULT_HEADING_TAG), "heading", this.HeadingTag.InDoubleQuotes());
			options.Add(this.FillSpace, "fillSpace", this.FillSpace.JsBool());
			options.Add(this.Navigation, "navigation", this.Navigation.JsBool());
			options.Add(!this.IsNullOrEmpty(this.NavigationFilter),"navigationFilter", this.NavigationFilter);
			options.Add(!this.IsNullEmptyOrDefault(this.Event, DEFAULT_EVENT), "event", this.Event.InSingleQuotes() );
			
			// icons have to be set as a pair
			if (AreIconsEnabled()) {
				bool addNormalIcon = !string.IsNullOrEmpty(this.HeaderIconClass) && this.HeaderIconClass != DEFAULT_HEADER_ICON_CLASS;
				bool addSelectedIcon = !string.IsNullOrEmpty(this.HeaderSelectedIconClass) && this.HeaderSelectedIconClass != DEFAULT_HEADER_SELECTED_ICON_CLASS;
				if (addNormalIcon || addSelectedIcon) {
					options.Add( "icons", "{{ 'header': '{0}', 'headerSelected': '{1}' }}", this.HeaderIconClass, this.HeaderSelectedIconClass );
				}
			}
			
			int activeIndex = this.Accordion.Panels.GetActivePaneIndex();
			if (activeIndex > 0) {
				options.Add( this.Accordion.Panels.HasActivePane(), "active", activeIndex.ToString() );
			}
		}
开发者ID:codeinpeace,项目名称:Fluqi,代码行数:31,代码来源:Options-Core.cs

示例15: DiscoverOptions

		/// <summary>
		/// Builds up a set of options the control can use (i.e. jQuery UI control supports).  Which is
		/// then used in rendering the JavaScript required to initialise the control properties.
		/// </summary>
		/// <param name="options">Collection to add the identified options to</param>
		override protected internal void DiscoverOptions(Core.ScriptOptions options) {
			options.Add(this.Disabled, "disabled", this.Disabled.JsBool());
			options.Add(this.Value != DEFAULT_VALUE, "value", this.Value.ToString());
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:9,代码来源:Options-Core.cs


注:本文中的Core.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。