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
Ejemplo n.º 1
0
 // QuickButton
 private void quickButton_MouseClick(object sender, MouseEventArgs e)
 {
     switch (e.Button)
     {
         case MouseButtons.Left:
             OpenFile();
             break;
         case MouseButtons.Middle:
             if (!string.IsNullOrEmpty(mp.FileInfo.Url))
             {
                 var jumpForm = new JumpForm(mp.CurrentStatus);
                 if (jumpForm.ShowDialog(this) == DialogResult.OK)
                 {
                     mp.Seek(jumpForm.GetNewTime);
                     jumpForm.Dispose();
                 }
             }
             break;
         case MouseButtons.Right:
             var webForm = new UrlForm(mp.FileInfo);
             if (webForm.ShowDialog(this) == DialogResult.OK)
             {
                 mp.OpenFile(webForm.Url);
                 webForm.Dispose();
             }
             break;
     }
 }
Ejemplo n.º 2
0
        private void openURLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var webForm = new UrlForm(mp.FileInfo);

            if (webForm.ShowDialog(this) == DialogResult.OK)
                mp.OpenFile(webForm.Url);

            webForm.Dispose();
        }