Exemple #1
0
        /// <summary>
        /// Load profile from configuration file
        /// </summary>
        private void loadProfiles()
        {
            _Profiles = ConfigurationHelper.LoadConfig();

            // populate the profile drop down list
            cboProfiles.Items.Clear();
            foreach (Profile profile in _Profiles)
            {
                cboProfiles.Items.Add(profile.Name);
            }
        }
Exemple #2
0
        private void BuildContextMenuWithProfiles()
        {
            if (_Profiles.Count == 0)
            {
                _Profiles = ConfigurationHelper.LoadConfig();
            }

            // populate the profile drop down list
            sysTrayMenu.Items.Clear();
            sysTrayMenu.Items.Add("Restore", null, RestoreApplication);
            sysTrayMenu.Items.Add("-");

            foreach (Profile profile in _Profiles)
            {
                sysTrayMenu.Items.Add(profile.Name, null, ChangeProfile);
            }
            sysTrayMenu.Items.Add("-");
            sysTrayMenu.Items.Add("E&xit", null, ExitApplication);
        }