TranslateTool.ResolvePoEntry.Dispose C# (CSharp) Method

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

Usage Example

Exemplo n.º 1
0
 void ApplyEntry(PoEntry entry, LocString str, TextWriter statusOutput)
 {
     if (str.NonLocalized == entry.NonLocalized)
     {
         if (str.Localized != entry.Localized)
         {
             statusOutput.WriteLine("Updating localized RESX for '{0}' to '{1}'", str.Name, entry.Localized);
             str.Localized = entry.Localized;
         }
     }
     else
     {
         // Non-localized strings don't match any more. Prompt to get new translation.
         ResolvePoEntry dialog = new ResolvePoEntry();
         dialog.textBoxCurrentUnlocalized.Text = str.NonLocalized;
         dialog.textBoxOldUnlocalized.Text     = entry.NonLocalized;
         dialog.textBoxLocalized.Text          = entry.Localized;
         dialog.labelStringId.Text             = str.Name;
         dialog.labelLanguageName.Text         = str.File.Culture.DisplayName;
         dialog.ShowDialog();
         str.Localized = dialog.textBoxLocalized.Text;
         statusOutput.WriteLine("Updating localized RESX for '{0}' to '{1}'", str.Name, str.Localized);
         dialog.Dispose();
     }
 }
All Usage Examples Of TranslateTool.ResolvePoEntry::Dispose