public Slider(SliderTypes sliderType, float currentValue) { SliderType = sliderType; CurrentValue = currentValue; DisplayName = TypeToDisplayName[SliderType]; Tooltip = TypeToTooltip[SliderType]; }
public static string RenderSlider(this HtmlHelper htmlHelper, string[] sliderIds, SliderTypes sliderType) { switch (sliderType) { case SliderTypes.Recommendation: return RenderSlider(htmlHelper, sliderIds, new { }); case SliderTypes.DefaultFuntionality: return RenderSlider(htmlHelper, sliderIds, new { }); default: // Recommendation return RenderSlider(htmlHelper, sliderIds, new { }); } }
private void _handleDataPush(MessageColonyDataPush data, Colony colony, IShip requestingShip) { switch (data.UpdateType) { case UpdateTypes.SetSlider: { SliderTypes sliderType = (SliderTypes)(byte)data.FirstIdentifier; //Dunno if the byte cast is necessary float sliderValue = data.Data; colony.Sliders[sliderType].CurrentValue = sliderValue; break; } case UpdateTypes.AddConstructableToQueue: { throw new NotImplementedException(); break; } case UpdateTypes.WithdrawResource: { throw new NotImplementedException(); //TransactionSequence tr = new TransactionSequence(); //tr.AddTransaction //_cargoSynchronizer.RequestAtomicTransactionSequence() break; } case UpdateTypes.DropResource: { throw new NotImplementedException(); break; } } }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, object htmlAttributes, bool withoutScript) { // Create tag builder var builder = new TagBuilder("div"); // Create valid id builder.GenerateId(id); // Add attributes builder.MergeAttributes(new RouteValueDictionary(htmlAttributes)); // Render tag return(builder.ToString(TagRenderMode.Normal) + (withoutScript == true ? string.Empty : "\n " + RenderSlider(htmlHelper, new string[] { id }, sliderType))); }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, object htmlAttributes) { return(Slider(htmlHelper, id, value, sliderType, htmlAttributes, false /*withoutScript*/)); }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, bool withoutScript) { return(Slider(htmlHelper, id, value, sliderType, null /*htmlAttributes*/, withoutScript)); }
public static string RenderSlider(this HtmlHelper htmlHelper, string[] sliderIds, SliderTypes sliderType) { switch (sliderType) { case SliderTypes.Recommendation: return(RenderSlider(htmlHelper, sliderIds, new { })); case SliderTypes.DefaultFuntionality: return(RenderSlider(htmlHelper, sliderIds, new { })); default: // Recommendation return(RenderSlider(htmlHelper, sliderIds, new { })); } }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, object htmlAttributes, bool withoutScript) { // Create tag builder var builder = new TagBuilder("div"); // Create valid id builder.GenerateId(id); // Add attributes builder.MergeAttributes(new RouteValueDictionary(htmlAttributes)); // Render tag return builder.ToString(TagRenderMode.Normal) + (withoutScript == true ? string.Empty : "\n " + RenderSlider(htmlHelper, new string[] { id }, sliderType)); }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, object htmlAttributes) { return Slider(htmlHelper, id, value, sliderType, htmlAttributes, false/*withoutScript*/); }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType, bool withoutScript) { return Slider(htmlHelper, id, value, sliderType, null/*htmlAttributes*/, withoutScript); }
public static string Slider(this HtmlHelper htmlHelper, string id, string value, SliderTypes sliderType) { return Slider(htmlHelper, id, value, sliderType, false/*withoutScript*/); }