protected virtual void OnColorChange(ColorChangeEventArgs e) { if (ColorChange != null) { ColorChange(this, e); } }
protected void OnColorChange(ColorChangeEventArgs args) { if (ColorChange != null) { ColorChange(this, args); } }
protected void OnSelectedColorChanging(ColorChangeEventArgs eventArgs) { var selectedColorChanging = SelectedColorChanging; if (selectedColorChanging != null) { selectedColorChanging.Invoke(this, eventArgs); } }
protected void OnSelectedColorChanged(ColorChangeEventArgs eventArgs) { var selectedColorChanged = SelectedColorChanged; if (selectedColorChanged != null) { selectedColorChanged.Invoke(this, eventArgs); } }
private void ColorChangeNotice() { if (ColorChange != null) { // ハンドラが設定されていたらイベント発生 ColorChangeEventArgs eArgs = new ColorChangeEventArgs(); eArgs.Handled = false; ColorChange(this, eArgs); } }
private async Task OnBackgroundColorChange(ColorChangeEventArgs ea) { await this.UIThreadAsync(() => { if (ea.NewColor != BackgroundColor.SelectedColor) { BackgroundColor.SelectedColor = ea.NewColor; } }); }
protected virtual async Task OnBackgroundColorChange(ColorChangeEventArgs ea) { await this.UIThreadAsync(() => { if (((SolidColorBrush)this.Background).Color != ea.NewColor) { this.Background = new SolidColorBrush(ea.NewColor); if (_TataruUIModel.IsChatClickThrough) { MakeWindowClickThrought(); } if (((SolidColorBrush)this.Background).Color.A == 0) { try { if (_MouseHooker != null) { _MouseHooker.LowLevelMouseEvent -= OnLowLevelMousEvent; _MouseHooker.Dispose(); _MouseHooker = null; } _MouseHooker = new MouseHooker(); _MouseHooker.LowLevelMouseEvent += OnLowLevelMousEvent; } catch (Exception e) { Logger.WriteLog(e); } } else { if (_MouseHooker != null) { try { _MouseHooker.LowLevelMouseEvent -= OnLowLevelMousEvent; _MouseHooker.Dispose(); _MouseHooker = null; } catch (Exception e) { Logger.WriteLog(e); } } }//*/ } }); }
private void trigger(object sender, ColorChangeEventArgs args) { if (Vector3.Distance(gameObject.transform.position, origin.transform.position) < maxDistance) { if (1 - args.Color < tolerance) { base.triggerFire(new EventArgs()); } else { base.triggerLeave(new EventArgs()); } } }
protected override async Task OnBackgroundColorChange(ColorChangeEventArgs ea) { await this.UIThreadAsync(() => { if (((SolidColorBrush)this.Background).Color != ea.NewColor) { var tmpColor = ea.NewColor; tmpColor.A = 255; this.Background = new SolidColorBrush(tmpColor); MakeWindowClickThrought(); } }); }
void setTransparence(object sender, ColorChangeEventArgs args) { float distance = Vector3.Distance(gameObject.transform.position, discoverer.transform.position); transparence = (float)args.Color; if (distance < startDiscoverDistance && distance > totalDiscoverDistance) { float adjust = ((startDiscoverDistance - distance) / (startDiscoverDistance - totalDiscoverDistance)); if (reveal) { foreach (SpriteRenderer rend in renderers) { rend.material.SetColor("_Color", new Color(1f, 1f, 1f, adjust * (float)Math.Pow(transparence, 3))); } } else { foreach (SpriteRenderer rend in renderers) { rend.material.SetColor("_Color", new Color(1f, 1f, 1f, 1 - (adjust * (float)Math.Pow(transparence, 3)))); } } } else if (distance < totalDiscoverDistance) { if (reveal) { foreach (SpriteRenderer rend in renderers) { rend.material.SetColor("_Color", new Color(1f, 1f, 1f, (float)Math.Pow(transparence, 3))); } } else { foreach (SpriteRenderer rend in renderers) { rend.material.SetColor("_Color", new Color(1f, 1f, 1f, 1 - (float)Math.Pow(transparence, 3))); } } } }
private void RadColorEditor_SelectedColorChanged(object sender, ColorChangeEventArgs e) { TxtBlock.Foreground = new SolidColorBrush(e.Color); }
public void ColorEditorSelectedColorChanged(object sender, ColorChangeEventArgs e) { //将颜色配置对象的集合转换成颜色配置XML var fleetColorSet = new XElement("FleetColorSet"); var colorSet = new XElement("ColorSet"); fleetColorSet.Add(colorSet); //航空公司节点 var airLineNode = new XElement("Type", new XAttribute("TypeName", "航空公司")); colorSet.Add(airLineNode); foreach (var xmlItem in AirLineList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); airLineNode.Add(itemNode); } //座级节点 var aircraftRegionalNode = new XElement("Type", new XAttribute("TypeName", "座级")); colorSet.Add(aircraftRegionalNode); foreach (var xmlItem in RegionalList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); aircraftRegionalNode.Add(itemNode); } //机型节点 var aircraftTypeNode = new XElement("Type", new XAttribute("TypeName", "机型")); colorSet.Add(aircraftTypeNode); foreach (var xmlItem in AircraftTypeList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); aircraftTypeNode.Add(itemNode); } //引进类型节点 var importTypeNode = new XElement("Type", new XAttribute("TypeName", "引进方式")); colorSet.Add(importTypeNode); foreach (var xmlItem in ImportTypeList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); importTypeNode.Add(itemNode); } //机龄节点 var aircraftAgeNode = new XElement("Type", new XAttribute("TypeName", "机龄")); colorSet.Add(aircraftAgeNode); foreach (var xmlItem in AircraftAgeList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); aircraftAgeNode.Add(itemNode); } //运力变化节点 var aircraftTrendNode = new XElement("Type", new XAttribute("TypeName", "运力变化")); colorSet.Add(aircraftTrendNode); foreach (var xmlItem in AircraftTrendList) { var itemNode = new XElement("Item", new XAttribute("Name", xmlItem.Name), new XAttribute("Color", xmlItem.Color)); aircraftTrendNode.Add(itemNode); } XmlSetting.SettingContent = fleetColorSet.ToString(); }
private void updateText(object sender, ColorChangeEventArgs args) { gameObject.GetComponent <Text> ().text = colorName + args.Color.ToString("F1"); }
private void setRed(object sender, ColorChangeEventArgs args) { redValue = ((float)args.Color) * 2 - 1; }
protected abstract void newColorValue(object sender, ColorChangeEventArgs args);
private void setCoeficientValue(object sender, ColorChangeEventArgs args) { heightAdjustCoeficient = (float)args.Color; }
private void setGroundedSpeedBonus(object sender, ColorChangeEventArgs args) { groudSpeedAdjustCoeficient = (float)args.Color; }
private void setBlue(object sender, ColorChangeEventArgs args) { blueValue = ((float)args.Color) * 2 - 1; }
void setAirSpeedBonus(object sender, ColorChangeEventArgs args) { airSpeedAdjustCoeficient = (float)args.Color; }
protected override void newColorValue(object sender, ColorChangeEventArgs args) { base.OnColorChange(new ColorChangeEventArgs((-1 * Math.Cos(args.Color * Mathf.Deg2Rad) + 1) / 2)); }
void setFallBonusValue(object sender, ColorChangeEventArgs args) { controlAdjustCoeficient = (float)args.Color; }
private void ColorEditorSelectedColorChanged(object sender, ColorChangeEventArgs e) { ViewModel.ColorEditorSelectedColorChanged(sender, e); }