CmisSync.UIHelpers.GetImagePath C# (CSharp) Метод

GetImagePath() приватный Метод

private GetImagePath ( string name ) : string
name string
Результат string
        public static string GetImagePath(string name) {
            string brandFolder = Path.Combine(ConfigManager.CurrentConfig.GetConfigPath(), Program.Controller.BrandConfigFolder);
            string image_path = FindImagePathname(brandFolder, name);
            if (!string.IsNullOrEmpty(image_path)) {
                return image_path;
            }

            image_path = Path.Combine(UI.AssetsPath, "pixmaps", name);
            return image_path;
        }

Usage Example

Пример #1
0
        public About() : base(string.Empty)
        {
            this.DeleteEvent += delegate(object o, DeleteEventArgs args) {
                this.Controller.WindowClosed();
                args.RetVal = true;
            };

            this.DefaultSize    = new Gdk.Size(600, 260);
            this.Resizable      = false;
            this.BorderWidth    = 0;
            this.IconName       = "dataspacesyc-folder";
            this.WindowPosition = WindowPosition.Center;
            this.Title          = string.Format(Properties_Resources.About, Properties_Resources.ApplicationName);
            this.AppPaintable   = true;

            string image_path = UIHelpers.GetImagePath("about.png");

            this.Realize();
            Gdk.Pixbuf buf = new Gdk.Pixbuf(image_path);
            Gdk.Pixmap map, map2;
            buf.RenderPixmapAndMask(out map, out map2, 255);
            GdkWindow.SetBackPixmap(map, false);

            this.CreateAbout();

            this.Controller.HideWindowEvent += delegate {
                Application.Invoke(delegate {
                    this.HideAll();
                });
            };

            this.Controller.ShowWindowEvent += delegate {
                Application.Invoke(delegate {
                    this.ShowAll();
                    this.Present();
                });
            };
        }