Exemplo n.º 1
0
        public void Dispose()
        {
            Icon icon = notifyIcon.Icon;

            notifyIcon.Icon = null;
            if (icon != null)
            {
                icon.Dispose();
            }
            notifyIcon.Dispose();

            if (brush != null)
            {
                brush.Dispose();
            }
            if (darkBrush != null)
            {
                darkBrush.Dispose();
            }
            pen.Dispose();
            graphics.Dispose();
            bitmap.Dispose();
            font.Dispose();
            smallFont.Dispose();
        }
Exemplo n.º 2
0
 public void Dispose()
 {
     foreach (SensorNotifyIcon icon in list)
     {
         icon.Dispose();
     }
     mainIcon.Dispose();
 }