public RadioButton GenerateRadioButton(string label, string iconImageName = null) { ImageBuffer iconImage = null; if (iconImageName != null) { iconImage = StaticData.Instance.LoadIcon(iconImageName); if (!ActiveTheme.Instance.IsDarkTheme && AllowThemeToAdjustImage) { InvertLightness.DoInvertLightness(iconImage); } } BorderDouble internalMargin = new BorderDouble(0); TextImageWidget nomalState = new TextImageWidget(label, normalFillColor, normalBorderColor, normalTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget hoverState = new TextImageWidget(label, hoverFillColor, hoverBorderColor, hoverTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget checkingState = new TextImageWidget(label, hoverFillColor, checkedBorderColor, hoverTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget checkedState = new TextImageWidget(label, pressedFillColor, checkedBorderColor, pressedTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget disabledState = new TextImageWidget(label, disabledFillColor, disabledBorderColor, disabledTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); RadioButtonViewStates checkBoxButtonViewWidget = new RadioButtonViewStates(nomalState, hoverState, checkingState, checkedState, disabledState); RadioButton radioButton = new RadioButton(checkBoxButtonViewWidget); radioButton.Margin = Margin; return(radioButton); }
public RadioButton GenerateRadioButton(string label, ImageBuffer iconImage) { BorderDouble internalMargin = 0; var nomalState = new TextImageWidget(label, normalFillColor, normalBorderColor, normalTextColor, borderWidth, internalMargin, iconImage, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth); var hoverState = new TextImageWidget(label, hoverFillColor, hoverBorderColor, hoverTextColor, borderWidth, internalMargin, iconImage, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth); var checkingState = new TextImageWidget(label, hoverFillColor, checkedBorderColor, hoverTextColor, borderWidth, internalMargin, iconImage, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth); var checkedState = new TextImageWidget(label, pressedFillColor, checkedBorderColor, pressedTextColor, borderWidth, internalMargin, iconImage, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth); var disabledState = new TextImageWidget(label, disabledFillColor, disabledBorderColor, disabledTextColor, borderWidth, internalMargin, iconImage, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth); var buttonView = new RadioButtonViewStates(nomalState, hoverState, checkingState, checkedState, disabledState); return(new RadioButton(buttonView) { Margin = Margin }); }
public RadioButton GenerateRadioButton(string label, string iconImageName = null) { ImageBuffer iconImage = null; if (iconImageName != null) { iconImage = new ImageBuffer(); ImageBMPIO.LoadImageData(this.GetImageLocation(iconImageName), iconImage); } BorderDouble internalMargin = new BorderDouble(0); TextImageWidget nomalState = new TextImageWidget(label, normalFillColor, normalBorderColor, normalTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget hoverState = new TextImageWidget(label, hoverFillColor, hoverBorderColor, hoverTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget checkingState = new TextImageWidget(label, hoverFillColor, RGBA_Bytes.White, hoverTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget checkedState = new TextImageWidget(label, pressedFillColor, RGBA_Bytes.White, pressedTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); TextImageWidget disabledState = new TextImageWidget(label, disabledFillColor, disabledBorderColor, disabledTextColor, borderWidth, internalMargin, iconImage, flowDirection: flowDirection, fontSize: this.fontSize, height: this.FixedHeight, width: this.FixedWidth, centerText: true); RadioButtonViewStates checkBoxButtonViewWidget = new RadioButtonViewStates(nomalState, hoverState, checkingState, checkedState, disabledState); RadioButton radioButton = new RadioButton(checkBoxButtonViewWidget); radioButton.Margin = Margin; return(radioButton); }
public RadioButton GenerateRadioButton(string label) { BorderDouble internalMargin = new BorderDouble(0); TextWidget nomalState = new TextWidget(label); TextWidget hoverState = new TextWidget(label); TextWidget checkingState = new TextWidget(label); TextWidget checkedState = new TextWidget(label); TextWidget disabledState = new TextWidget(label); RadioButtonViewStates checkBoxButtonViewWidget = new RadioButtonViewStates(nomalState, hoverState, checkingState, checkedState, disabledState); RadioButton radioButton = new RadioButton(checkBoxButtonViewWidget); radioButton.Margin = new BorderDouble(); return radioButton; }