public virtual void Recalculate() { CalculatedStyle calculatedStyle = Parent?.InnerDimensions ?? UserInterface.ActiveInstance.Dimensions; CalculatedStyle calculatedStyle2 = default; calculatedStyle2.X = Left.GetValue(calculatedStyle.Width) + calculatedStyle.X; calculatedStyle2.Y = Top.GetValue(calculatedStyle.Height) + calculatedStyle.Y; float value = MinWidth.GetValue(calculatedStyle.Width); float value2 = MaxWidth.GetValue(calculatedStyle.Width); float value3 = MinHeight.GetValue(calculatedStyle.Height); float value4 = MaxHeight.GetValue(calculatedStyle.Height); calculatedStyle2.Width = MathHelper.Clamp(Width.GetValue(calculatedStyle.Width), value, value2); calculatedStyle2.Height = MathHelper.Clamp(Height.GetValue(calculatedStyle.Height), value3, value4); calculatedStyle2.Width += MarginLeft + MarginRight; calculatedStyle2.Height += MarginTop + MarginBottom; calculatedStyle2.X += calculatedStyle.Width * HAlign - calculatedStyle2.Width * HAlign; calculatedStyle2.Y += calculatedStyle.Height * VAlign - calculatedStyle2.Height * VAlign; OuterDimensions = calculatedStyle2; calculatedStyle2.X += MarginLeft; calculatedStyle2.Y += MarginTop; calculatedStyle2.Width -= MarginLeft + MarginRight; calculatedStyle2.Height -= MarginTop + MarginBottom; Dimensions = calculatedStyle2; calculatedStyle2.X += PaddingLeft; calculatedStyle2.Y += PaddingTop; calculatedStyle2.Width -= PaddingLeft + PaddingRight; calculatedStyle2.Height -= PaddingTop + PaddingBottom; InnerDimensions = calculatedStyle2; RecalculateChildren(); }
public override int GetHashCode() { int hc = Id.GetHashCode(); foreach (var i in Images) { hc ^= i.GetHashCode(); } hc ^= (int)Stretch << 14; hc ^= (int)StretchDirection << 17; hc ^= Opacity.GetHashCode(); hc ^= HorizontalOffset.GetHashCode(); hc ^= VerticalOffset.GetHashCode(); hc ^= LeftMarginWidthPercent.GetHashCode(); hc ^= RightMarginWidthPercent.GetHashCode(); hc ^= TopMarginHeightPercent.GetHashCode(); hc ^= BottomMarginHeightPercent.GetHashCode(); hc ^= MaxHeight.GetHashCode(); hc ^= MaxWidth.GetHashCode(); hc ^= Zoom.GetHashCode(); hc ^= (int)ImagePlacement; hc ^= IsRandom ? int.MinValue : 0; hc ^= IsEnabled ? 0x40000000 : 0; hc ^= Interval.GetHashCode(); return(hc); }
protected override void OnInitialized() { _defaultMinWidth = $"{MinWidth.ToString().Replace(",", ".")}px"; _defaultMaxWidth = $"{MaxWidth.ToString().Replace(",", ".")}px"; CreateLocalCss(); base.OnInitialized(); }
public override int GetHashCode() { var hashCode = 459946268; hashCode = hashCode * -1521134295 + EqualityComparer <InfoboxAction[]> .Default.GetHashCode(Actions); hashCode = hashCode * -1521134295 + CloseDelayTime.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(HtmlContent); hashCode = hashCode * -1521134295 + EqualityComparer <Location> .Default.GetHashCode(Location); hashCode = hashCode * -1521134295 + MaxHeight.GetHashCode(); hashCode = hashCode * -1521134295 + MaxWidth.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <GeolocatonPoint> .Default.GetHashCode(Offset); hashCode = hashCode * -1521134295 + ShowCloseButton.GetHashCode(); hashCode = hashCode * -1521134295 + ShowPointer.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title); hashCode = hashCode * -1521134295 + Visible.GetHashCode(); hashCode = hashCode * -1521134295 + ZIndex.GetHashCode(); return(hashCode); }
/// <summary> /// Raises the <see cref = "E:System.Web.UI.Control.Load" /> event. /// </summary> /// <param name = "e">The <see cref = "T:System.EventArgs" /> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); PropertyAliasTextBox.Text = PropertyAlias; MaxHeightTextBox.Text = MaxHeight.ToString(CultureInfo.InvariantCulture); MaxWidthTextBox.Text = MaxWidth.ToString(CultureInfo.InvariantCulture); }
public UIState() { Width.Percent = 1f; Height.Percent = 1f; MaxWidth.Set(Main.Graphics.PreferredBackBufferWidth, 1f); MaxHeight.Set(Main.Graphics.PreferredBackBufferHeight, 1f); Recalculate(); }
public UIScrollbar() { Width.Set(20f, 0f); MaxWidth.Set(20f, 0f); _texture = Main.Assets.Request <Texture2D>("Images/UI/Scrollbar", (AssetRequestMode)1); _innerTexture = Main.Assets.Request <Texture2D>("Images/UI/ScrollbarInner", (AssetRequestMode)1); PaddingTop = 5f; PaddingBottom = 5f; }
public override int GetHashCode() { int hash = 17; hash = hash * 23 + Url.GetHashCode(); hash = hash * 23 + MaxWidth.GetHashCode(); hash = hash * 23 + MaxHeight.GetHashCode(); return(hash); }
public UIScrollbar() { Width.Set(20f, 0f); MaxWidth.Set(20f, 0f); _texture = TextureManager.Load("Images/UI/Scrollbar"); _innerTexture = TextureManager.Load("Images/UI/ScrollbarInner"); PaddingTop = 5f; PaddingBottom = 5f; }
/// <inheritdoc /> public override void Process(TagHelperContext context, TagHelperOutput output) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (output == null) { throw new ArgumentNullException(nameof(output)); } // Return if not enabled if (!Enabled) { output.TagName = null; return; } // Format properties var alwaysShowNavOnTouchDevicesFormatted = AlwaysShowNavOnTouchDevices.ToString().ToLower(); var albumLabelFormatted = AlbumLabel; var disableScrollingFormatted = DisableScrolling.ToString().ToLower(); var fadeDurationFormatted = ((int)FadeDuration.TotalMilliseconds).ToString(); var fitImagesInViewportFormatted = FitImagesInViewport.ToString().ToLower(); var imageFadeDurationFormatted = ((int)ImageFadeDuration.TotalMilliseconds).ToString(); var maxWidthFormatted = MaxWidth?.ToString() ?? "null"; var maxHeightFormatted = MaxHeight?.ToString() ?? "null"; var positionFromTopFormatted = PositionFromTop.ToString(); var resizeDurationFormatted = ((int)ResizeDuration.TotalMilliseconds).ToString(); var showImageNumberLabelFormatted = ShowImageNumberLabel.ToString().ToLower(); var wrapAroundFormatted = WrapAround.ToString().ToLower(); // Format the content var content = TemplateHtml; content = content.Replace("__AlwaysShowNavOnTouchDevices__", alwaysShowNavOnTouchDevicesFormatted); content = content.Replace("__AlbumLabel__", albumLabelFormatted); content = content.Replace("__DisableScrolling__", disableScrollingFormatted); content = content.Replace("__FadeDuration__", fadeDurationFormatted); content = content.Replace("__FitImagesInViewport__", fitImagesInViewportFormatted); content = content.Replace("__ImageFadeDuration__", imageFadeDurationFormatted); content = content.Replace("__MaxWidth__", maxWidthFormatted); content = content.Replace("__MaxHeight__", maxHeightFormatted); content = content.Replace("__PositionFromTop__", positionFromTopFormatted); content = content.Replace("__ResizeDuration__", resizeDurationFormatted); content = content.Replace("__ShowImageNumberLabel__", showImageNumberLabelFormatted); content = content.Replace("__WrapAround__", wrapAroundFormatted); // Output output.TagName = null; output.Content.SetHtmlContent(content); base.Process(context, output); }
private AttributeSet?GetContentAttributeSet() { return(AttributeSet.Create(builder => builder .AddClassAttribute(x => x .Add("dropdown-content") .Add("right-to-left", !_alignContentLeftToRight) .AddElevation(4)) .AddStyleAttribute(x => x .AddProperty("min-width", MinWidth.ToString(), MinWidth.Value > 0) .AddProperty("max-width", MaxWidth.ToString(), MaxWidth.Value > 0)))); }
public GenericUIScrollbar() { Width.Set(20f, 0f); MaxWidth.Set(20f, 0f); PaddingTop = 5f; PaddingBottom = 5f; thumbStumpSize = backgroundStumpSize = 6; smoothScroll = false; }
public void Render(IOutputStream outputStream) { if (MinWidth != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleMinWidth); outputStream.Write(HTMLElements.m_space); MinWidth.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } if (MinHeight != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleMinHeight); outputStream.Write(HTMLElements.m_space); MinHeight.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } if (MaxHeight != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleMaxHeight); outputStream.Write(HTMLElements.m_space); MaxHeight.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } if (MaxWidth != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleMaxWidth); outputStream.Write(HTMLElements.m_space); MaxWidth.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } if (Width != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleWidth); outputStream.Write(HTMLElements.m_space); Width.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } if (Height != null) { outputStream.Write(HTMLElements.m_space); outputStream.Write(HTMLElements.m_styleHeight); outputStream.Write(HTMLElements.m_space); Height.Render(outputStream); outputStream.Write(HTMLElements.m_semiColon); } }
public Menu(float width, float height) { MaxWidth.Set(width, 0f); MaxHeight.Set(height, 0f); SetPadding(7); buttonGrid = new UIGrid(7); buttonGrid.Width.Set(-20, 1); buttonGrid.Height.Set(0, 1); buttonGrid.ListPadding = 7f; Append(buttonGrid); AppendButtons(); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (MaxWidth != null) { hashCode = hashCode * 59 + MaxWidth.GetHashCode(); } if (MaxHeight != null) { hashCode = hashCode * 59 + MaxHeight.GetHashCode(); } return(hashCode); } }
/// <summary> /// Gets raw html response body for a URL /// </summary> /// <param name="url"></param> /// <returns></returns> public string GetEmbedResponse(string url) { StringBuilder output = new StringBuilder(); NameValueCollection queryString = System.Web.HttpUtility.ParseQueryString(string.Empty); queryString["url"] = url; queryString["format"] = "json"; if (MaxHeight > 0) { queryString["maxheight"] = MaxHeight.ToString(); } if (MaxWidth > 0) { queryString["maxwidth"] = MaxWidth.ToString(); } string fullURL = String.Format("{0}?{1}", EndpointURL, queryString.ToString()); WebRequest embedReq; embedReq = WebRequest.Create(fullURL); Stream objStream; objStream = embedReq.GetResponse().GetResponseStream(); StreamReader objReader = new StreamReader(objStream); string sLine = ""; int i = 0; while (sLine != null) { i++; sLine = objReader.ReadLine(); if (sLine != null) { output.AppendLine(sLine); } } return(output.ToString()); }
public override void ResizeThis(Rectangle parentRectangle) { //scale all relative values to parent rectangle Margin.Resize(parentRectangle.Size); FlexWidth.Resize(parentRectangle.Width); FlexHeight.Resize(parentRectangle.Height); MaxWidth.Resize(parentRectangle.Width); MinWidth.Resize(parentRectangle.Width); MaxHeight.Resize(parentRectangle.Height); MinHeight.Resize(parentRectangle.Height); //clamp size to min and max Width = MathHelper.Clamp(FlexWidth.Absolute / SEGMENT_WIDTH, MinWidth.Absolute, MaxWidth.Absolute) * SEGMENT_WIDTH; Height = MathHelper.Clamp(FlexHeight.Absolute, MinHeight.Absolute, MaxHeight.Absolute); //if control is square, conform both width and height to the larger of the two if (IsSquare) { Width = Height = Math.Min(Width, Height); } X = HorizontalAlign switch { HorizontalAlign.Center => (parentRectangle.X + (parentRectangle.Width / 2) - (Width / 2)), HorizontalAlign.Left => parentRectangle.Left + Margin.Left, _ => parentRectangle.Right - Width - Margin.Right }; Y = VerticalAlign switch { VerticalAlign.Center => (parentRectangle.Top + parentRectangle.Height / 2 - Height / 2), VerticalAlign.Top => parentRectangle.Top + Margin.Top, _ => parentRectangle.Bottom - Height - Margin.Bottom }; Padding.Resize(Size); //calculate internal rectangle ContentRectangle = new Rectangle(X + Margin.Left + Padding.Left, Y + Margin.Top + Padding.Top, Width - Padding.Horizontal, Height - Padding.Vertical); }
/// <summary> /// Returns true if ComDayCqExtwidgetServletsImageSpriteServletProperties instances are equal /// </summary> /// <param name="other">Instance of ComDayCqExtwidgetServletsImageSpriteServletProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComDayCqExtwidgetServletsImageSpriteServletProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( MaxWidth == other.MaxWidth || MaxWidth != null && MaxWidth.Equals(other.MaxWidth) ) && ( MaxHeight == other.MaxHeight || MaxHeight != null && MaxHeight.Equals(other.MaxHeight) )); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Width/Min", true, out subEle); subEle.Value = MinWidth.ToString("G15"); ele.TryPathTo("Width/Max", true, out subEle); subEle.Value = MaxWidth.ToString("G15"); ele.TryPathTo("Height/Min", true, out subEle); subEle.Value = MinHeight.ToString("G15"); ele.TryPathTo("Height/Max", true, out subEle); subEle.Value = MaxHeight.ToString("G15"); ele.TryPathTo("Depth", true, out subEle); subEle.Value = Depth.ToString("G15"); ele.TryPathTo("Shininess", true, out subEle); subEle.Value = Shininess.ToString("G15"); ele.TryPathTo("Parallax/Scale", true, out subEle); subEle.Value = ParallaxScale.ToString("G15"); ele.TryPathTo("Parallax/Passes", true, out subEle); subEle.Value = ParallaxPasses.ToString(); ele.TryPathTo("Flags", true, out subEle); subEle.Value = DecalFlags.ToString(); WriteUnusedXML(ele, master); ele.TryPathTo("Color", true, out subEle); Color.WriteXML(subEle, master); }
public static string ToDescriptionString(this MaxWidth val) { var attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }
/// <summary> /// 储存文件并返回结果 /// </summary> /// <returns>Bool</returns> public bool Save() { if (!Directory.Exists(sv.MapPath(SavePath))) { Directory.CreateDirectory(sv.MapPath(SavePath)); } if (ReqFile == null) { Err = 4; return(false); } if (ReqFile.ContentLength > MaxSize) { Err = 1; return(false); } var fil = Filter.Where(m => m == Path.GetExtension(ReqFile.FileName.ToLower())); string TempFilePath = TempFolder.EndsWith("/") ? TempFolder + NewFileName : TempFolder + "/" + NewFileName; string NewFilepath = SavePath.EndsWith("/") ? SavePath + NewFileName : SavePath + "/" + NewFileName; if (fil.Count() != 1) { Err = 2; return(false); } if (SafePicture) { try { var rawimg = Image.FromStream(ReqFile.InputStream); rawimg.Dispose(); } catch (Exception) { Err = 2; return(false); } } try { ReqFile.SaveAs(sv.MapPath(TempFilePath)); } catch (Exception) { Err = 3; return(false); } if (Resize) { IASPJpeg j = new ASPJpeg(); j.Open(sv.MapPath(TempFilePath)); j.Quality = 80; int ow = j.OriginalWidth; int oh = j.OriginalHeight; if (ow > MaxWidth) { j.Width = MaxWidth; if (Constrain) { j.Height = (int)((MaxWidth.CDbl() / ow.CDbl()) * oh.CDbl()); if (Crop && j.Height > MaxHeight) { j.Crop(0, (j.Height - MaxHeight) / 2, j.Width, MaxHeight + (j.Height - MaxHeight) / 2); } } else { j.Height = MaxHeight; } } j.Save(sv.MapPath(NewFilepath)); StoredPath = NewFilepath; File.Delete(sv.MapPath(TempFilePath)); return(true); } else { File.Move(sv.MapPath(TempFilePath), sv.MapPath(NewFilepath)); StoredPath = NewFilepath; return(true); } }
public bool SaveTheme(XmlWriter writer) { if (_ThemeLoaded || _ButtonText) { writer.WriteStartElement(_Theme.Name); writer.WriteComment("<X>, <Y>: Text position"); writer.WriteElementString("X", X.ToString("#0")); writer.WriteElementString("Y", Y.ToString("#0")); if (!_ButtonText) { writer.WriteComment("<Z>: Text position"); writer.WriteElementString("Z", Z.ToString("#0.00")); } writer.WriteComment("<H>: Text height"); writer.WriteElementString("H", Height.ToString("#0")); writer.WriteComment("<MaxW>: Maximum text width (if exists)"); if (MaxWidth > 0) { writer.WriteElementString("MaxW", MaxWidth.ToString("#0")); } writer.WriteComment("<Color>: Text color from ColorScheme (high priority)"); writer.WriteComment("or <R>, <G>, <B>, <A> (lower priority)"); if (_Theme.ColorName != String.Empty) { writer.WriteElementString("Color", _Theme.ColorName); } else { writer.WriteElementString("R", Color.R.ToString("#0.00")); writer.WriteElementString("G", Color.G.ToString("#0.00")); writer.WriteElementString("B", Color.B.ToString("#0.00")); writer.WriteElementString("A", Color.A.ToString("#0.00")); } writer.WriteComment("<SColor>: Selected Text color from ColorScheme (high priority)"); writer.WriteComment("or <SR>, <SG>, <SB>, <SA> (lower priority)"); if (_Theme.SColorName != String.Empty) { writer.WriteElementString("SColor", _Theme.SColorName); } else { writer.WriteElementString("SR", SColor.R.ToString("#0.00")); writer.WriteElementString("SG", SColor.G.ToString("#0.00")); writer.WriteElementString("SB", SColor.B.ToString("#0.00")); writer.WriteElementString("SA", SColor.A.ToString("#0.00")); } writer.WriteComment("<Align>: Text align: " + CConfig.ListStrings(Enum.GetNames(typeof(EAlignment)))); writer.WriteElementString("Align", Enum.GetName(typeof(EAlignment), Align)); writer.WriteComment("<Style>: Text style: " + CConfig.ListStrings(Enum.GetNames(typeof(EStyle)))); writer.WriteElementString("Style", Enum.GetName(typeof(EStyle), Style)); writer.WriteComment("<Font>: Text font name"); writer.WriteElementString("Font", Fon); writer.WriteComment("<Text>: Text or translation tag"); if (CLanguage.TranslationExists(_Theme.Text)) { writer.WriteElementString("Text", _Theme.Text); } else { writer.WriteElementString("Text", string.Empty); } if (!_ButtonText) { writer.WriteComment("<Reflection> If exists:"); writer.WriteComment(" <Space>: Reflection Space"); writer.WriteComment(" <Height>: Reflection Height"); } if (Reflection && !_ButtonText) { writer.WriteStartElement("Reflection"); writer.WriteElementString("Space", ReflectionSpace.ToString("#0")); writer.WriteElementString("Height", ReflectionHeight.ToString("#0")); writer.WriteEndElement(); } writer.WriteEndElement(); return(true); } return(false); }
/// <summary> /// Save Features.Charts settings to the settings file /// </summary> /// <param name="generalNode">XML-node for the Features.Charts settings</param> public void Save(XmlNode chartsNode) { string xpath; XmlNode node; xpath = "./height"; SettingsHelper.SetSettingValue(xpath, chartsNode, Height.ToString()); xpath = "./maxHeight"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxHeight.ToString()); xpath = "./width"; SettingsHelper.SetSettingValue(xpath, chartsNode, Width.ToString()); xpath = "./maxWidth"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxWidth.ToString()); xpath = "./colors"; SettingsHelper.SetSettingValue(xpath, chartsNode, "color", Colors); xpath = "./lineThickness"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineThickness.ToString()); xpath = "./maxLineThickness"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxLineThickness.ToString()); xpath = "./logotype"; SettingsHelper.SetSettingValue(xpath, chartsNode, Logotype); xpath = "./maxValues"; SettingsHelper.SetSettingValue(xpath, chartsNode, MaxValues.ToString()); xpath = "./timeSortOrder"; SettingsHelper.SetSettingValue(xpath, chartsNode, TimeSortOrder.ToString()); xpath = "./labelOrientation"; SettingsHelper.SetSettingValue(xpath, chartsNode, LabelOrientation.ToString()); xpath = "./font"; node = SettingsHelper.GetNode(chartsNode, xpath); _fontSettings.Save(node); xpath = "./legend"; node = SettingsHelper.GetNode(chartsNode, xpath); _legendSettings.Save(node); xpath = "./guidelines"; node = SettingsHelper.GetNode(chartsNode, xpath); _guidelinesSettings.Save(node); xpath = "./showSourse"; SettingsHelper.SetSettingValue(xpath, chartsNode, ShowSource.ToString()); xpath = "./showLogo"; SettingsHelper.SetSettingValue(xpath, chartsNode, ShowLogo.ToString()); xpath = "./lineThicknessPhrame"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineThicknessPhrame.ToString()); xpath = "./lineColorPhrame"; SettingsHelper.SetSettingValue(xpath, chartsNode, LineColorPhrame.ToString()); xpath = "./backgroundColorGraphs"; SettingsHelper.SetSettingValue(xpath, chartsNode, BackgroundColorGraphs.ToString()); }
private void SaveWindowSettings() { Properties.Settings.Default.instancegui_windowsettings = String.Join(";", new string[] { Left.ToString(), Top.ToString(), MaxWidth.ToString(), MaxHeight.ToString() }); Properties.Settings.Default.instancegui_ispinned = ispinned; Properties.Settings.Default.Save(); }
public override int GetHashCode() { return(LocalPath.GetHashCode() + MaxWidth.GetHashCode() + MaxHeight.GetHashCode()); }
public bool Equals(ContentTypeProperty input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( RootPropertyName == input.RootPropertyName || (RootPropertyName != null && RootPropertyName.Equals(input.RootPropertyName)) ) && ( ReadableName == input.ReadableName || (ReadableName != null && ReadableName.Equals(input.ReadableName)) ) && ( Value == input.Value || (Value != null && Value.Equals(input.Value)) ) && ( PropertyDescription == input.PropertyDescription || (PropertyDescription != null && PropertyDescription.Equals(input.PropertyDescription)) ) && ( Localizable == input.Localizable || (Localizable != null && Localizable.Equals(input.Localizable)) ) && ( Fallback == input.Fallback || (Fallback != null && Fallback.Equals(input.Fallback)) ) && ( Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled)) ) && ( Order == input.Order || (Order.Equals(input.Order)) ) && ( Visible == input.Visible || (Visible != null && Visible.Equals(input.Visible)) ) && ( IsTitle == input.IsTitle || (IsTitle != null && IsTitle.Equals(input.IsTitle)) ) && ( Required == input.Required || (Required != null && Required.Equals(input.Required)) ) && ( MaxLength == input.MaxLength || (MaxLength.Equals(input.MaxLength)) ) && ( MaxByteLength == input.MaxByteLength || (MaxByteLength.Equals(input.MaxByteLength)) ) && ( MaxFileSize == input.MaxFileSize || (MaxFileSize.Equals(input.MaxFileSize)) ) && ( Regexp == input.Regexp || (Regexp != null && Regexp.Equals(input.Regexp)) ) && ( ValidateAs == input.ValidateAs || (ValidateAs != null && ValidateAs.Equals(input.ValidateAs)) ) && ( RssAttribute == input.RssAttribute || (RssAttribute != null && RssAttribute.Equals(input.RssAttribute)) ) && ( VisibleDependency == input.VisibleDependency || (VisibleDependency != null && VisibleDependency.Equals(input.VisibleDependency)) ) && ( VisibleOn == input.VisibleOn || (VisibleOn != null && VisibleOn.Equals(input.VisibleOn)) ) && ( Datatype == input.Datatype || (Datatype != null && Datatype.Equals(input.Datatype)) ) && ( Attributes == input.Attributes || (Attributes != null && Attributes.SequenceEqual(input.Attributes)) ) && ( ChildProperties == input.ChildProperties || (ChildProperties != null && ChildProperties.SequenceEqual(input.ChildProperties)) ) && ( ContentTypeAllowed == input.ContentTypeAllowed || (ContentTypeAllowed != null && ContentTypeAllowed.Equals(input.ContentTypeAllowed)) ) && ( BindToProperty == input.BindToProperty || (BindToProperty != null && BindToProperty.Equals(input.BindToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( RepresentationSelection == input.RepresentationSelection || (RepresentationSelection != null && RepresentationSelection.SequenceEqual(input.RepresentationSelection)) ) && ( DefaultValues == input.DefaultValues || (DefaultValues != null && DefaultValues.SequenceEqual(input.DefaultValues)) ) && ( IsExternalAllowed == input.IsExternalAllowed || (IsExternalAllowed != null && IsExternalAllowed.Equals(input.IsExternalAllowed)) ) && ( PropertySection == input.PropertySection || (PropertySection != null && PropertySection.Equals(input.PropertySection)) ) && ( Weight == input.Weight || (Weight.Equals(input.Weight)) ) && ( Entitytype == input.Entitytype || (Entitytype != null && Entitytype.Equals(input.Entitytype)) ) && ( IsCombo == input.IsCombo || (IsCombo != null && IsCombo.Equals(input.IsCombo)) ) && ( SuppressProperty == input.SuppressProperty || (SuppressProperty != null && SuppressProperty.Equals(input.SuppressProperty)) ) && ( LegalContentTypes == input.LegalContentTypes || (LegalContentTypes != null && LegalContentTypes.SequenceEqual(input.LegalContentTypes)) ) && ( RepresentationValidationString == input.RepresentationValidationString || (RepresentationValidationString != null && RepresentationValidationString.Equals(input.RepresentationValidationString)) ) && ( MinWidth == input.MinWidth || (MinWidth.Equals(input.MinWidth)) ) && ( MaxWidth == input.MaxWidth || (MaxWidth.Equals(input.MaxWidth)) ) && ( MinHeight == input.MinHeight || (MinHeight.Equals(input.MinHeight)) ) && ( MaxHeight == input.MaxHeight || (MaxHeight.Equals(input.MaxHeight)) ) && ( IsVideo == input.IsVideo || (IsVideo != null && IsVideo.Equals(input.IsVideo)) ) && ( IsImage == input.IsImage || (IsImage != null && IsImage.Equals(input.IsImage)) )); }
/// <summary> /// Registers the session. /// </summary> private void RegisterSession() { if (HttpContext.Current == null) { return; //design time } if (HttpContext.Current.Session == null) { throw new ApplicationException("The session is disabled, please enable before continue", new NullReferenceException()); //session is off } Hashtable hashtable1 = new Hashtable(); if (string.Empty.Equals(m_ReturnFunction)) { hashtable1.Add("ControlToFill", ClientID); hashtable1.Add("ReturnFunction", m_ReturnFunction); } else { hashtable1.Add("ControlToFill", m_ReturnFunction); hashtable1.Add("ReturnFunction", m_ReturnFunction); } hashtable1.Add("ShowExceptions", m_ShowExceptions); hashtable1.Add("UploadDirectory", m_UploadDirectory); hashtable1.Add("AllowUpload", m_AllowUpload.ToString()); hashtable1.Add("ShowUploadFirst", m_ShowUploadFirst.ToString()); hashtable1.Add("MaxWidth", MaxWidth.ToString()); hashtable1.Add("MinWidth", m_MinWidth.ToString()); hashtable1.Add("MaxHeight", m_MaxHeight.ToString()); hashtable1.Add("MinHeight", m_MinHeight.ToString()); hashtable1.Add("MaxBytes", m_MaxBytes.ToString()); hashtable1.Add("AllowEdit", m_AllowEdit.ToString()); hashtable1.Add("AllowDelete", m_AllowDelete.ToString()); hashtable1.Add("AllowCreateDirectory", m_AllowCreateDirectory.ToString()); hashtable1.Add("AllowRename", m_AllowRename.ToString()); hashtable1.Add("FileTypes", m_FileTypes); hashtable1.Add("FileNameOnly", m_FileNameOnly.ToString()); hashtable1.Add("DemoMode", m_DemoMode.ToString()); hashtable1.Add("FontName", m_FontName); hashtable1.Add("FontSize", m_FontSize); if (m_DataStore == "Session") { if (string.Empty.Equals(m_ReturnFunction)) { HttpContext.Current.Session["UpldDlg" + ID] = hashtable1; } else { HttpContext.Current.Session["UpldDlg" + m_ReturnFunction] = hashtable1; } } else if (m_DataStore == "Application") { if (string.Empty.Equals(m_ReturnFunction)) { HttpContext.Current.Application["UpldDlg" + ID] = hashtable1; } else { HttpContext.Current.Application["UpldDlg" + m_ReturnFunction] = hashtable1; } } }
private void SaveWindowSettings() { LBConfiguration.Config.instancegui_windowsettings = String.Join(";", new string[] { Left.ToString(), Top.ToString(), MaxWidth.ToString(), MaxHeight.ToString() }); LBConfiguration.Config.instancegui_ispinned = ispinned; LBConfiguration.Save(); }