本文整理汇总了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);
}
示例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);
}