Exemplo n.º 1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            RegistryAccess registryAccess = new RegistryAccess(Application.ProductName);

            try
            {
                applicationSettings = registryAccess.ReadObjectFromRegistry <ApplicationSettings>();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                applicationSettings = new ApplicationSettings();
            }

            UpdateGUIFromSettings();

            sysTrayNotifyIcon.BalloonTipText  = @"Application is now minimized to system tray";
            sysTrayNotifyIcon.BalloonTipTitle = @"Minimized to system tray";
            sysTrayNotifyIcon.BalloonTipIcon  = ToolTipIcon.Info;
        }