コード例 #1
0
        static public System.Windows.Controls.Image GetImageData(object d)
        {
            //BitmapImage s = GetImageSource(d) as BitmapImage;
            //System.Windows.Controls.Image b = new System.Windows.Controls.Image();
            //b.Width = 16;
            //b.Height = 16;
            //b.Stretch = Stretch.UniformToFill;
            //b.Source = s;
            //b.HorizontalAlignment = HorizontalAlignment.Left;
            //b.Margin = new Thickness(2, 2, 2, 2);
            //return b;

            System.Windows.Controls.Image b = new System.Windows.Controls.Image();

            int hc = GetHashCode(d);

            if (dict.ContainsKey(hc))
            {
                b.Source = dict[hc].Source;
            }
            else
            {
                b.Source = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_16x);
            }

            b.Width   = 16;
            b.Height  = 16;
            b.Stretch = Stretch.UniformToFill;

            b.HorizontalAlignment = HorizontalAlignment.Left;
            //   b.Margin = new Thickness(2, 2, 2, 2);
            return(b);
        }
コード例 #2
0
 public ImageElementGenerator(string basePath)
 {
     bitmapImage = ConvertBitmapToBitmapImage.Convert(ve.folding);
     //if (basePath == null)
     //	throw new ArgumentNullException("basePath");
     this.basePath = basePath;
 }
コード例 #3
0
        static public System.Windows.Controls.Image GetImage()
        {
            BitmapImage s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_256x);

            System.Windows.Controls.Image b = new System.Windows.Controls.Image();
            b.Width               = 16;
            b.Height              = 16;
            b.Stretch             = Stretch.UniformToFill;
            b.Source              = s;
            b.HorizontalAlignment = HorizontalAlignment.Left;
            b.Margin              = new Thickness(2, 2, 2, 2);
            return(b);
        }
コード例 #4
0
        public void AddStandards()
        {
            std = new List <object>();
            string[] items = { "Keywords", "Snippets" };

            CsCompletionData d = new CsCompletionData(items[0]);

            d.Image  = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.KeywordSnippet_16x);
            d.Search = "";
            d.obs    = "Keywords";
            std.Add(d);
            d        = new CsCompletionData(items[1]);
            d.Image  = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Snippet_16x);
            d.Search = "";
            d.obs    = "Snippets";
            std.Add(d);
        }
コード例 #5
0
        static public System.Windows.Controls.Image GetImage(int hc)
        {
            System.Windows.Controls.Image b = new System.Windows.Controls.Image();

            if (dict.ContainsKey(hc))
            {
                b.Source = dict[hc].Source;
            }
            else
            {
                b.Source = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_16x);
            }

            b.Width   = 16;
            b.Height  = 16;
            b.Stretch = Stretch.UniformToFill;

            b.HorizontalAlignment = HorizontalAlignment.Left;
            b.Margin = new Thickness(2, 2, 2, 2);
            return(b);
        }
コード例 #6
0
        public BitmapImage GibbetImage()
        {
            switch (_gibbetState)
            {
            case 1:
                return(ConvertBitmapToBitmapImage.Convert(Properties.Resources.KaraGibbet1));

            case 2:
                return(ConvertBitmapToBitmapImage.Convert(Properties.Resources.KaraGibbet2));

            case 3:
                return(ConvertBitmapToBitmapImage.Convert(Properties.Resources.KaraGibbet3));

            case 4:
                return(ConvertBitmapToBitmapImage.Convert(Properties.Resources.KaraGibbet4));

            case 5:
                return(ConvertBitmapToBitmapImage.Convert(Properties.Resources.KaraGibbet5));

            default:
                return(null);
            }
        }
コード例 #7
0
        static public System.Windows.Media.ImageSource GetImageSource(object symbol)
        {
            BitmapImage s = null;

            if (symbol is TypeKind)
            {
                TypeKind t = (TypeKind)symbol;
                switch (t)
                {
                case TypeKind.Class:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_16x);
                    return(s);

                case TypeKind.Interface:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Interface_blue_16x);
                    return(s);

                case TypeKind.Enum:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Enumerator_orange_16x);
                    return(s);

                case TypeKind.Delegate:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Delegate_16x);
                    return(s);

                case TypeKind.Struct:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Structure_16x);
                    return(s);

                default:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Property_16x);
                    return(s);
                }
            }
            else if (symbol is SymbolKind)
            {
                switch (((SymbolKind)symbol))
                {
                case SymbolKind.Namespace:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Namespace_16x);
                    return(s);

                case SymbolKind.Method:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Method_purple_16x);
                    return(s);

                case SymbolKind.Property:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Property_16x);
                    return(s);

                case SymbolKind.Field:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Field_blue_16x);
                    return(s);

                case SymbolKind.Event:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Event_orange_16x);
                    return(s);

                case SymbolKind.Local:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.LocalVariable_16x);
                    return(s);

                case SymbolKind.Parameter:
                    s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.LocalVariable_16x);
                    return(s);
                }
            }
            s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_256x);
            return(s);
        }
コード例 #8
0
 static public System.Windows.Media.ImageSource GetImageSource(System.Drawing.Bitmap b)
 {
     return(ConvertBitmapToBitmapImage.Convert(b));
 }
コード例 #9
0
        static public System.Windows.Media.ImageSource GetImageSource()
        {
            BitmapImage s = ConvertBitmapToBitmapImage.Convert(WinExplorers.ve.Class_yellow_256x);

            return(s);
        }
コード例 #10
0
ファイル: GameControl.xaml.cs プロジェクト: IcyWillow/iet-120
 private void ChangedSoundIcon()
 {
     imgButtonMute.Source = SoundHelper.IsSoundOn
         ? ConvertBitmapToBitmapImage.Convert(Properties.Resources.Unmuted)
         : ConvertBitmapToBitmapImage.Convert(Properties.Resources.Muted);
 }