/// </summary>
private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
#region Windows Form Designer generated code
/// <summary>
this.ShowInTaskbar = false;
this.TopMost = true;
this.Activated += new System.EventHandler(this.ShowUserInfo_Activated);
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ShowUserInfo_FormClosing);
this.Load += new System.EventHandler(this.ShowUserInfo_Load);
this.Shown += new System.EventHandler(this.ShowUserInfo_Shown);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.ShowUserInfo_DragDrop);
UserPicture.Invalidate(false);
}
- private void ShowUserInfo_FormClosing(object sender, FormClosingEventArgs e)
- {
- var oldImage = this.UserPicture.Image;
- if (oldImage != null)
- {
- this.UserPicture.Image = null;
- oldImage.Dispose();
- }
- }
-
private void ShowUserInfo_Shown(object sender, EventArgs e)
{
ButtonClose.Focus();
await this.DoChangeIcon(filename);
}
}
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ var oldImage = this.UserPicture.Image;
+ if (oldImage != null)
+ {
+ this.UserPicture.Image = null;
+ oldImage.Dispose();
+ }
+
+ if (this.components != null)
+ this.components.Dispose();
+ }
+
+ base.Dispose(disposing);
+ }
}
}