Esempio n. 1
0
 private void FManageProfiles_Load(object sender, EventArgs e)
 {
     lvProfiles.LargeImageList = ilProfileIcons.IconsList;
     btnEdit.Enabled           = false;
     btnDelete.Enabled         = false;
     this.profiles             = CSettings.LoadProfiles();
     loadList();
 }
Esempio n. 2
0
 private void FChooseProfile_Load(object sender, EventArgs e)
 {
     lvProfiles.LargeImageList = ilProfileIcons.IconsList;
     settings = CSettings.LoadProfiles();
     foreach (CScanSettings profile in settings)
     {
         lvProfiles.Items.Add(profile.DisplayName, profile.IconID);
     }
 }
Esempio n. 3
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do you really want to delete " + profiles[lvProfiles.SelectedItems[0].Index].DisplayName, "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
     {
         profiles.RemoveAt(lvProfiles.SelectedItems[0].Index);
         loadList();
         CSettings.SaveProfiles(profiles);
         lvProfiles_SelectedIndexChanged(null, null);
     }
 }
Esempio n. 4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            FEditScanSettings fedit = new FEditScanSettings();

            fedit.ScanSettings = profiles[lvProfiles.SelectedItems[0].Index];
            fedit.ShowDialog();
            if (fedit.Result)
            {
                loadList();
                CSettings.SaveProfiles(profiles);
            }
        }
Esempio n. 5
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FEditScanSettings fedit = new FEditScanSettings();

            fedit.ScanSettings = new CScanSettings();
            fedit.ShowDialog();
            if (fedit.Result)
            {
                this.profiles.Add(fedit.ScanSettings);
                loadList();
                CSettings.SaveProfiles(profiles);
            }
        }