public StyleColor GetBackgroundColorValue() { var ListWidget = GetEligibleWidgets_Toolbar(PropertyOption.OPtion_BackColor); if (ListWidget.Count() == 0) { return(default(StyleColor)); } StyleColor sReturnValue = ListWidget.First().vBackgroundColor; foreach (var data in ListWidget) { if (!sReturnValue.Equals(data.vBackgroundColor)) { return(new StyleColor(ColorFillType.Solid, -1)); } } return(sReturnValue); }
void pop_PreviewLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { if (GetPopUpRoot(e.NewFocus as FrameworkElement) != null) { return; } if (_bIsShowDlgStatus == true) { return; } ///to do if (this.IsSolidType()) { if (ColorPanelShow.Fill is SolidColorBrush) { System.Windows.Media.Color panelColor = (ColorPanelShow.Fill as SolidColorBrush).Color; var sc = new StyleColor(ColorFillType.Solid, System.Drawing.Color.FromArgb(panelColor.A, panelColor.R, panelColor.G, panelColor.B).ToArgb()); if (!_orignColor.Equals(sc)) { _currentColor = sc; InvokeCommand(_currentColor); } } } else { var angle = 90d; double.TryParse(anglebox.Text, out angle); var rtnStyle = new StyleColor(ColorFillType.Gradient, 0); rtnStyle.Angle = angle; rtnStyle.Frames = this.GradientEditor1.CurrentStyle.Frames; if (!rtnStyle.Equals(_orignColor)) { InvokeCommand(rtnStyle); } } }
public StyleColor GetBackgroundColorModifyValue() { var ListWidget = GetEligibleWidgets_Toolbar(PropertyOption.OPtion_BackColor); if (ListWidget.Count() == 0) { return(default(StyleColor)); } StyleColor sReturnValue = ListWidget.First().vBackgroundColor; foreach (WidgetViewModBase data in ListWidget) { if (!sReturnValue.Equals(data.vBackgroundColor)) { return(data.vBackgroundColor.FillType == ColorFillType.Gradient ? data.vBackgroundColor : sReturnValue); } else { sReturnValue = data.vBackgroundColor; } } return(sReturnValue); }