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


C# Language.getString方法代码示例

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


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

示例1: AutoUpdateDownloadForm

        /// <summary>
        /// Creates a new AutoUpdateDownloadForm
        /// </summary>
        internal AutoUpdateDownloadForm(AutoUpdatable applicationInfo, Uri location, String md5, Icon programIcon)
        {
            InitializeComponent();

            this.applicationInfo = applicationInfo;
            this.lang = applicationInfo.Lang;

            if (programIcon != null)
                this.Icon = programIcon;

            this.Text = applicationInfo.ApplicationName + " - " + lang.getString("update_download");

            this.lblDownloading.Text = lang.getString("update_downloading");

            // Set the temp file name and create new 0-byte file
            tempFile = Path.GetTempFileName();

            this.md5 = md5;

            // Set up WebClient to download file
            webClient = new WebClient();
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(webClient_DownloadProgressChanged);
            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(webClient_DownloadFileCompleted);

            // Set up backgroundworker to hash file
            bgWorker = new BackgroundWorker();
            bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
            bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);

            // Download file
            try { webClient.DownloadFileAsync(location, this.tempFile); }
            catch { this.DialogResult = DialogResult.No; this.Close(); }

            // DPI settings
            AutoScaleDimensions = new SizeF(96F, 96F);
            AutoScaleMode = AutoScaleMode.Dpi;

            // Set UI Font according to language
            lang.setFont(this.Controls);
            Font = new Font(lang.getFont(), Font.Size, Font.Style);
        }
开发者ID:henryxrl,项目名称:SimpleEpub2,代码行数:44,代码来源:AutoUpdateDownloadForm.cs

示例2: AutoUpdateAcceptForm

        /// <summary>
        /// Creates a new AutoUpdateAcceptForm
        /// </summary>
        /// <param name="applicationInfo"></param>
        /// <param name="updateInfo"></param>
        internal AutoUpdateAcceptForm(AutoUpdatable applicationInfo, AutoUpdateXml updateInfo)
        {
            InitializeComponent();

            this.applicationInfo = applicationInfo;
            this.updateInfo = updateInfo;
            this.lang = applicationInfo.Lang;

            this.Text = lang.getString("update_found_title");

            this.lblAppName.Text = this.applicationInfo.ApplicationName;
            this.lblUpdateAvail.Text = lang.getString("update_found");
            this.lblNewVersion_label.Text = lang.getString("update_new");
            this.lblCurVersion_label.Text = lang.getString("update_cur");
            this.lblDescription.Text = lang.getString("update_description");

            this.btnYes.Text = lang.getString("button_ok");
            this.btnNo.Text = lang.getString("button_cancel");

            // Assigns the icon if it isn't null
            if (this.applicationInfo.ApplicationIcon != null)
                this.Icon = this.applicationInfo.ApplicationIcon;

            // Adds the current version # to the form
            this.lblCurVersion.Text = applicationInfo.ApplicationAssembly.GetName().Version.ToString();

            // Adds the update version # to the form
            this.lblNewVersion.Text = this.updateInfo.Version.ToString();

            // Fill in update info
            this.txtDescription.Text = updateInfo.Description;
            //this.txtDescription.ScrollBarAppearance = DevComponents.DotNetBar.eScrollBarAppearance.ApplicationScroll;
            //Size txtDescription_size = this.txtDescription.Size;
            //this.txtDescription.Size = new Size(txtDescription_size.Width /3, txtDescription_size.Height /3);

            // DotNetBar richTextBoxEx doesn't appear correctly under high DPI
            // Use normal richTextBox instead!
            this.richTextBox1.Text = updateInfo.Description;

            // DPI settings
            AutoScaleDimensions = new SizeF(96F, 96F);
            AutoScaleMode = AutoScaleMode.Dpi;

            // Set UI Font according to language
            lang.setFont(this.Controls);
            Font = new Font(lang.getFont(), Font.Size, Font.Style);
        }
开发者ID:henryxrl,项目名称:SimpleEpub2,代码行数:52,代码来源:AutoUpdateAcceptForm.cs


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