CmisSync.UIHelpers.GetImagePathname C# (CSharp) Méthode

GetImagePathname() public static méthode

public static GetImagePathname ( string name, string type = "png" ) : string
name string
type string
Résultat string
        public static string GetImagePathname(string name, string type = "png") {
            string filename = name + "." + type;

            string brandFolder = Path.Combine(ConfigManager.CurrentConfig.GetConfigPath(), Program.Controller.BrandConfigFolder);
            string pathname = FindImagePathname(brandFolder, filename);
            if (!string.IsNullOrEmpty(pathname)) {
                return pathname;
            }

            pathname = Path.Combine(NSBundle.MainBundle.ResourcePath, "Pixmaps", filename);
            if (File.Exists(pathname)) {
                return pathname;
            }

            return Path.Combine(NSBundle.MainBundle.ResourcePath, filename);
        }

Usage Example

        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            this.SkipButton.Title     = Properties_Resources.SkipTutorial;
            this.ContinueButton.Title = Properties_Resources.Continue;
//            this.ContinueButton.KeyEquivalent = "\r";

            NSImage image = new NSImage(UIHelpers.GetImagePathname("tutorial-slide-" + Controller.TutorialCurrentPage))
            {
                Size = new SizeF(350, 200)
            };

            TutorialView.Image = image;

            switch (Controller.TutorialCurrentPage)
            {
            case 1:
                TutorialText.StringValue = String.Format(Properties_Resources.CmisSyncCreates, Properties_Resources.ApplicationName);
                break;

            default:
                break;
            }
        }
All Usage Examples Of CmisSync.UIHelpers::GetImagePathname