コード例 #1
0
ファイル: AboutInfo.cs プロジェクト: WildGums/Orchestra
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutInfo" /> class.
        /// </summary>
        /// <param name="companyLogoForSplashScreenUri"></param>
        /// <param name="companyLogoUri">The company logo image Uri.</param>
        /// <param name="logoImageSource">The logo image source.</param>
        /// <param name="uriInfo">The uri info. Can be <c>null</c>.</param>
        /// <param name="assembly">The assembly to use for the information. If <c>null</c>, the assembly will be determined automatically.</param>
        /// <param name="appIcon">The application icon. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="buildDateTime">The application build datetime. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="company">The application company. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="copyright">The application copyright. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="description">The application description. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="displayVersion">The application display version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="informationalVersion">The application informational version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="productName">The application product name. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="name">The application title. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="version">The application version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        public AboutInfo(Uri companyLogoUri = null, string logoImageSource = null, UriInfo uriInfo = null, Assembly assembly = null,
            Uri companyLogoForSplashScreenUri = null, BitmapSource appIcon = null, DateTime? buildDateTime = null, string company = null,
            string copyright = null, string description = null, string displayVersion = null, string informationalVersion = null,
            string name = null, string productName = null, string version = null)
        {
            ShowLogButton = true;

            Assembly = assembly ?? AssemblyHelper.GetEntryAssembly();

            CompanyLogoForSplashScreenUri = companyLogoForSplashScreenUri;
            CompanyLogoUri = companyLogoUri;
            LogoImageSource = logoImageSource;
            UriInfo = uriInfo;
            
            AppIcon = appIcon ?? Assembly.ExtractLargestIcon();
            BuildDateTime = buildDateTime ?? Assembly.GetBuildDateTime();
            Company = company ?? Assembly.Company();
            Copyright = copyright ?? Assembly.Copyright();
            Description = description ?? Assembly.Description();
            InformationalVersion = informationalVersion ?? Assembly.InformationalVersion();
            ProductName = productName ?? Assembly.Product();
            Name = name ?? Assembly.Title();
            Version = version ?? Assembly.Version();

            DisplayVersion = displayVersion ?? VersionHelper.GetCurrentVersion(Assembly);
        }
コード例 #2
0
ファイル: AboutInfo.cs プロジェクト: yanchao891012/Orchestra
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutInfo" /> class.
        /// </summary>
        /// <param name="companyLogoForSplashScreenUri"></param>
        /// <param name="companyLogoUri">The company logo image Uri.</param>
        /// <param name="logoImageSource">The logo image source.</param>
        /// <param name="uriInfo">The uri info. Can be <c>null</c>.</param>
        /// <param name="assembly">The assembly to use for the information. If <c>null</c>, the assembly will be determined automatically.</param>
        /// <param name="appIcon">The application icon. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="buildDateTime">The application build datetime. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="company">The application company. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="copyright">The application copyright. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="copyrightUri">The application copyright Uri. Can be <c>null</c>.</param>
        /// <param name="description">The application description. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="displayVersion">The application display version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="informationalVersion">The application informational version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="productName">The application product name. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="name">The application title. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        /// <param name="version">The application version. Can be <c>null</c>. If <c>null</c> then value will be picked from assembly.</param>
        public AboutInfo(Uri companyLogoUri = null, string logoImageSource = null, UriInfo uriInfo = null, Assembly assembly = null,
                         Uri companyLogoForSplashScreenUri = null, BitmapSource appIcon = null, DateTime?buildDateTime = null, string company = null,
                         string copyright = null, Uri copyrightUri   = null, string description = null, string displayVersion = null, string informationalVersion = null,
                         string name      = null, string productName = null, string version     = null)
        {
            ShowLogButton = true;

            Assembly = assembly ?? Catel.Reflection.AssemblyHelper.GetEntryAssembly();

            CompanyLogoForSplashScreenUri = companyLogoForSplashScreenUri;
            CompanyLogoUri  = companyLogoUri;
            CopyrightUri    = copyrightUri;
            LogoImageSource = logoImageSource;
            UriInfo         = uriInfo;

            AppIcon              = appIcon ?? Assembly.ExtractLargestIcon();
            BuildDateTime        = buildDateTime ?? Assembly.GetBuildDateTime();
            Company              = company ?? Assembly.Company();
            Copyright            = copyright ?? Assembly.Copyright();
            Description          = description ?? Assembly.Description();
            InformationalVersion = informationalVersion ?? Assembly.InformationalVersion();
            ProductName          = productName ?? Assembly.Product();
            Name    = name ?? Assembly.Title();
            Version = version ?? Assembly.Version();

            DisplayVersion = displayVersion ?? VersionHelper.GetCurrentVersion(Assembly);
        }
コード例 #3
0
ファイル: AboutInfo.cs プロジェクト: icygit/Orchestra
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutInfo" /> class.
        /// </summary>
        /// <param name="companyLogoForSplashScreenUri"></param>
        /// <param name="companyLogoUri">The company logo image Uri.</param>
        /// <param name="logoImageSource">The logo image source.</param>
        /// <param name="uriInfo">The uri info. Can be <c>null</c>.</param>
        /// <param name="assembly">The assembly to use for the information. If <c>null</c>, the assembly will be determined automatically.</param>
        public AboutInfo(Uri companyLogoUri = null, string logoImageSource = null, UriInfo uriInfo = null, Assembly assembly = null, Uri companyLogoForSplashScreenUri = null)
        {
            ShowLogButton = true;

            CompanyLogoForSplashScreenUri = companyLogoForSplashScreenUri;
            CompanyLogoUri = companyLogoUri;
            LogoImageSource = logoImageSource;
            UriInfo = uriInfo;
            Assembly = assembly ?? AssemblyHelper.GetEntryAssembly();
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutInfo" /> class.
        /// </summary>
        /// <param name="companyLogoForSplashScreenUri"></param>
        /// <param name="companyLogoUri">The company logo image Uri.</param>
        /// <param name="logoImageSource">The logo image source.</param>
        /// <param name="uriInfo">The uri info. Can be <c>null</c>.</param>
        /// <param name="assembly">The assembly to use for the information. If <c>null</c>, the assembly will be determined automatically.</param>
        public AboutInfo(Uri companyLogoUri = null, string logoImageSource = null, UriInfo uriInfo = null, Assembly assembly = null, Uri companyLogoForSplashScreenUri = null)
        {
            ShowLogButton = true;

            CompanyLogoForSplashScreenUri = companyLogoForSplashScreenUri;
            CompanyLogoUri  = companyLogoUri;
            LogoImageSource = logoImageSource;
            UriInfo         = uriInfo;
            Assembly        = assembly ?? AssemblyHelper.GetEntryAssembly();
        }