Esempio n. 1
0
 protected virtual void OnColorChange(ColorChangeEventArgs e)
 {
     if (ColorChange != null)
     {
         ColorChange(this, e);
     }
 }
Esempio n. 2
0
 protected virtual void OnColorChange(ColorChangeEventArgs e)
 {
     if (ColorChange != null)
     {
         ColorChange(this, e);
     }
 }
Esempio n. 3
0
 protected void OnColorChange(ColorChangeEventArgs args)
 {
     if (ColorChange != null)
     {
         ColorChange(this, args);
     }
 }
Esempio n. 4
0
        protected void OnSelectedColorChanging(ColorChangeEventArgs eventArgs)
        {
            var selectedColorChanging = SelectedColorChanging;

            if (selectedColorChanging != null)
            {
                selectedColorChanging.Invoke(this, eventArgs);
            }
        }
Esempio n. 5
0
        protected void OnSelectedColorChanged(ColorChangeEventArgs eventArgs)
        {
            var selectedColorChanged = SelectedColorChanged;

            if (selectedColorChanged != null)
            {
                selectedColorChanged.Invoke(this, eventArgs);
            }
        }
Esempio n. 6
0
 private void ColorChangeNotice()
 {
     if (ColorChange != null)
     {
         // ハンドラが設定されていたらイベント発生
         ColorChangeEventArgs eArgs = new ColorChangeEventArgs();
         eArgs.Handled = false;
         ColorChange(this, eArgs);
     }
 }
Esempio n. 7
0
 private async Task OnBackgroundColorChange(ColorChangeEventArgs ea)
 {
     await this.UIThreadAsync(() =>
     {
         if (ea.NewColor != BackgroundColor.SelectedColor)
         {
             BackgroundColor.SelectedColor = ea.NewColor;
         }
     });
 }
Esempio n. 8
0
        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);
                            }
                        }
                    }//*/
                }
            });
        }
Esempio n. 9
0
 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());
         }
     }
 }
Esempio n. 10
0
        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();
                }
            });
        }
Esempio n. 11
0
    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);
 }
Esempio n. 13
0
        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();
        }
Esempio n. 14
0
 private void updateText(object sender, ColorChangeEventArgs args)
 {
     gameObject.GetComponent <Text> ().text = colorName + args.Color.ToString("F1");
 }
Esempio n. 15
0
 private void setRed(object sender, ColorChangeEventArgs args)
 {
     redValue = ((float)args.Color) * 2 - 1;
 }
Esempio n. 16
0
 protected abstract void newColorValue(object sender, ColorChangeEventArgs args);
Esempio n. 17
0
 private void setCoeficientValue(object sender, ColorChangeEventArgs args)
 {
     heightAdjustCoeficient = (float)args.Color;
 }
Esempio n. 18
0
 private void setGroundedSpeedBonus(object sender, ColorChangeEventArgs args)
 {
     groudSpeedAdjustCoeficient = (float)args.Color;
 }
Esempio n. 19
0
 private void setBlue(object sender, ColorChangeEventArgs args)
 {
     blueValue = ((float)args.Color) * 2 - 1;
 }
Esempio n. 20
0
 void setAirSpeedBonus(object sender, ColorChangeEventArgs args)
 {
     airSpeedAdjustCoeficient = (float)args.Color;
 }
Esempio n. 21
0
 protected override void newColorValue(object sender, ColorChangeEventArgs args)
 {
     base.OnColorChange(new ColorChangeEventArgs((-1 * Math.Cos(args.Color * Mathf.Deg2Rad) + 1) / 2));
 }
Esempio n. 22
0
 void setFallBonusValue(object sender, ColorChangeEventArgs args)
 {
     controlAdjustCoeficient = (float)args.Color;
 }
Esempio n. 23
0
 private void ColorEditorSelectedColorChanged(object sender, ColorChangeEventArgs e)
 {
     ViewModel.ColorEditorSelectedColorChanged(sender, e);
 }