public OverwritePromtDialog()
 {
     this.InitializeComponent();
     base.LocalizeForm();
     this.btnOverwrite.Tag = OverwriteDialogResult.Overwrite;
     this.btnAppend.Tag = OverwriteDialogResult.Append;
     this.btnResume.Tag = OverwriteDialogResult.Resume;
     this.btnSkip.Tag = OverwriteDialogResult.Skip;
     this.btnRename.Tag = OverwriteDialogResult.Rename;
     ResourceManager manager = new SettingsManager.LocalizedResourceManager(typeof(OverwritePromtDialog));
     this.AlreadyExistsFormat = manager.GetString("lblAlreadyExists.Text");
     this.ItemLastWriteTimeFormat = manager.GetString("lblSourceLastWriteTime.Text");
     this.ItemSizeFormat = manager.GetString("lblSourceSize.Text");
     if (CopySettings.Default.ShowThumbnailInOverwriteDialog)
     {
         base.SuspendLayout();
         this.tlpBack.SuspendLayout();
         this.imgSourceIcon.Scalable = false;
         this.imgSourceIcon.Size = CopySettings.Default.ThumbnailSize;
         this.imgSourceIcon.Paint += new PaintEventHandler(this.imgSourceIcon_Paint);
         this.imgDestIcon.Scalable = false;
         this.imgDestIcon.Size = CopySettings.Default.ThumbnailSize;
         this.imgDestIcon.Paint += new PaintEventHandler(this.imgSourceIcon_Paint);
         this.btnOverwrite.Width = Math.Max(this.btnOverwrite.Width, 90);
         this.btnAppend.Width = Math.Max(this.btnAppend.Width, 90);
         this.btnSkip.Width = Math.Max(this.btnSkip.Width, 90);
         this.btnCancel.Width = Math.Max(this.btnCancel.Width, 90);
         this.tlpBack.ResumeLayout();
         base.ResumeLayout();
         this.DefaultIconStyle = IconStyle.DefaultIcon;
         base.Shown += new EventHandler(this.ShowThumnails);
     }
 }
예제 #2
0
 public RunAsDialog()
 {
     this.InitializeComponent();
     base.LocalizeForm();
     this.chkShowPassword_CheckedChanged(this.chkShowPassword, EventArgs.Empty);
     ResourceManager manager = new SettingsManager.LocalizedResourceManager(typeof(RunAsDialog));
     this.rbCurrentUser.Text = string.Format(manager.GetString("rbCurrentUser.Text"), WindowsIdentity.GetCurrent().Name);
     this.rbAdministrator.Enabled = OS.IsWinVista;
     this.rbSpecifiedUser.Enabled = OS.IsWin2k;
     switch (OS.ElevationType)
     {
         case ElevationType.Default:
         {
             WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
             this.ShieldRequired = !principal.IsInRole(WindowsBuiltInRole.Administrator);
             break;
         }
         case ElevationType.Limited:
             this.ShieldRequired = true;
             break;
     }
 }
 public void UpdateCulture()
 {
     int num = (int) this.nudNotOlderThan.Value;
     ResourceManager manager = new SettingsManager.LocalizedResourceManager(typeof(AdvancedFilterControl));
     this.cmbDateMeasure.Items[0] = PluralInfo.Format(manager.GetString("cmbDateMeasure.Items"), new object[] { num });
     for (int i = 1; i < this.cmbDateMeasure.Items.Count; i++)
     {
         this.cmbDateMeasure.Items[i] = PluralInfo.Format(manager.GetString("cmbDateMeasure.Items" + i.ToString()), new object[] { num });
     }
 }