当前位置: 首页>>代码示例>>C#>>正文


C# EffectType.ToString方法代码示例

本文整理汇总了C#中EffectType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# EffectType.ToString方法的具体用法?C# EffectType.ToString怎么用?C# EffectType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EffectType的用法示例。


在下文中一共展示了EffectType.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TypeString

 internal static string TypeString(EffectType e)
 {
     if(e == EffectType.None)
         return null;
     if(e == EffectType.SlideDown)
         return "slideDown";
     else if(e == EffectType.FadeIn)
         return "fadeIn";
     else
         return e.ToString().ToLower();
 }
开发者ID:Leonscape,项目名称:ESWCtrls,代码行数:11,代码来源:Effect.cs

示例2: HitEffectObstacle

 public void HitEffectObstacle(float value, EffectType type)
 {
     Debug.Log ("Effect " + value.ToString()+ " " + type.ToString());
 }
开发者ID:JeremyJacquemont,项目名称:Blend_Jam_2015,代码行数:4,代码来源:Vehicle.cs

示例3: SetScripts

 internal static void SetScripts(Page p, EffectType e)
 {
     if(e != EffectType.Show && e != EffectType.SlideDown && e != EffectType.FadeIn)
         Script.AddResourceScript(p, "jquery.effects." + e.ToString().ToLower() + ".js");
 }
开发者ID:Leonscape,项目名称:ESWCtrls,代码行数:5,代码来源:Effect.cs

示例4: Transition

        public void Transition(ref System.Windows.Forms.Panel current, ref System.Windows.Forms.Panel next, EffectType type)
        {
            BitmapSource currentBitmapSource = null;
            BitmapSource nextBitmapSource = null;
            ImageBrush currentImage = null;
            ImageBrush nextImage = null;

            WEPDefaultEffect effect = null;

            try
            {
                // 現在のPanelの画像を取得
                currentBitmapSource = GetBitmapSource(current, false);

                // 次に表示するPanleの画像を取得
                string nextBitmapPath = next.Name + ".bmp";
                if (System.IO.File.Exists(nextBitmapPath))
                {
                    System.Drawing.Imaging.BitmapData bitmapData = null;
                    Bitmap nextBitmap = null;
                    try
                    {
                        nextBitmap = new Bitmap(nextBitmapPath);
                        bitmapData = nextBitmap.LockBits(
                            new System.Drawing.Rectangle(0, 0, nextBitmap.Width, nextBitmap.Height),
                            System.Drawing.Imaging.ImageLockMode.ReadOnly,
                            System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                        nextBitmapSource = BitmapSource.Create(
                            nextBitmap.Width, nextBitmap.Height, 96, 96, PixelFormats.Bgra32, null,
                            bitmapData.Scan0, nextBitmap.Width * nextBitmap.Height * 4, bitmapData.Stride);
                    }
                    catch (SystemException ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                    finally
                    {
                        if (bitmapData != null)
                        {
                            nextBitmap.UnlockBits(bitmapData);
                        }
                    }
                }
                else
                {
                    nextBitmapSource = GetBitmapSource(next, true);         // 初回のみ
                }

                if (type == EffectType.Random)
                {
                    type = (EffectType)random.Next(effectList.Count);
                }

                if (type == EffectType.None)
                {
                    effect = new WEPDefaultEffect();
                }
                else
                {
                    effect = effectList[(int)type] as WEPDefaultEffect;
                }

                Console.WriteLine(type.ToString());

                currentImage = new ImageBrush(currentBitmapSource);
                nextImage = new ImageBrush(nextBitmapSource);
                canvas.Width = current.Width;
                canvas.Height = current.Height;
                Console.WriteLine(canvas.Width.ToString() + " " + canvas.Height.ToString());

                //this.Visibility = Visibility.Visible;                     // effectスタート
                current.Visible = false;

                effect.DrawEffectImage(currentImage, nextImage, ref next, ref canvas);

                //this.Visibility = Visibility.Hidden;                        // effect終わり

            }
            catch (SystemException ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
开发者ID:chanpi,项目名称:WpfEffectingPanelLibrary,代码行数:83,代码来源:EffectingPanel.xaml.cs

示例5: NumEffects

 /// <summary>
 /// The number of effects. (Beneficial, Detrimental, All)
 /// </summary>
 /// <param name="type">type</param>
 public int NumEffects(EffectType type = EffectType.All)
 {
     Trace.WriteLine(String.Format("Character:NumEffects({0})", type));
     switch (type)
     {
         case EffectType.Beneficial:
         case EffectType.Detrimental:
             return this.GetIntFromLSO("NumEffects", type.ToString());
         default:
             return this.GetIntFromLSO("NumEffects");
     }
 }
开发者ID:rlane187,项目名称:ISXEQ2Wrapper,代码行数:16,代码来源:Character.cs

示例6: Effect

 /// <summary>
 /// Retrieves the effect of the given type at the specified index. (Beneficial, Detrimental, All(
 /// </summary>
 /// <param name="type">type</param>
 /// <param name="name">name</param>
 public Effect Effect(string name, EffectType type = EffectType.All)
 {
     Trace.WriteLine(String.Format("Character:CountEffects({0}, {1})", type, name));
     switch (type)
     {
         case EffectType.Beneficial:
         case EffectType.Detrimental:
             return new Effect(this.GetMember("Effect", type.ToString(), name));
         default:
             return new Effect(this.GetMember("Effect", name));
     }
 }
开发者ID:rlane187,项目名称:ISXEQ2Wrapper,代码行数:17,代码来源:Character.cs


注:本文中的EffectType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。