Пример #1
0
        private void cmbProfile_SelectedValueChanged(object sender, EventArgs e)
        {
            activeProfile = (FilterProfile)cmbProfile.SelectedItem;

            editingFilter = true;
            cmbFilter.Items.Clear();
            foreach (Filter filter in activeProfile.Filters)
            {
                cmbFilter.Items.Add(filter);
            }
            cmbFilter.SelectedIndex = 0;
            editingFilter           = false;

            if (activeProfile.Type == FilterProfileType.Global || activeProfile.Type == FilterProfileType.Multiplier)
            {
                cmbFilter.Enabled     = false;
                cbxShowActive.Enabled = false;
                cbxForce.Enabled      = false;
            }
            else
            {
                cmbFilter.Enabled     = true;
                cbxShowActive.Enabled = true;
                cbxForce.Enabled      = true;
            }
            lblHueNote.Visible = activeProfile.Type == FilterProfileType.Multiplier;
            resetFilter();
        }
Пример #2
0
 private void disableFilters()
 {
     activeProfile      = null;
     cmbProfile.Enabled = false;
     btnSave.Enabled    = false;
     btnClone.Enabled   = false;
     btnDelete.Enabled  = false;
     cmbFilter.Enabled  = false;
     gbxFilter.Enabled  = false;
     lblHueNote.Visible = false;
 }
Пример #3
0
        private void btnClone_Click(object sender, EventArgs e)
        {
            FormCloneProfile formCloneProfile = new FormCloneProfile(activeProfile);

            formCloneProfile.ShowDialog();
            FilterProfile result = formCloneProfile.Result;

            if (result != null)
            {
                addFilterProfile(result);
            }
        }
Пример #4
0
 private void addFilterProfile(FilterProfile profile)
 {
     filterProfiles.Add(profile);
     reloadCmbProfile();
     cmbProfile.SelectedItem = profile;
     if (cmbProfile.Items.Count == 1)
     {
         cmbProfile.Enabled = true;
         btnSave.Enabled    = true;
         btnClone.Enabled   = true;
         btnDelete.Enabled  = true;
         gbxFilter.Enabled  = true;
     }
     profile.Save();
 }
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     if (rbnGlobal.Checked)
     {
         Result = CreateFilterProfile(FilterProfileType.Global, txtName.Text);
     }
     else if (rbnMultiplier.Checked)
     {
         Result = CreateFilterProfile(FilterProfileType.Multiplier, txtName.Text);
     }
     else if (rbnDetailed.Checked)
     {
         Result = CreateFilterProfile(FilterProfileType.Detailed, txtName.Text);
     }
     else if (rbnFullControl.Checked)
     {
         Result = CreateFilterProfile(FilterProfileType.FullControl, txtName.Text);
     }
     Close();
 }
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     Result = clone.Clone(txtName.Text);
     Close();
 }
 public FormCloneProfile(FilterProfile clone)
 {
     InitializeComponent();
     this.clone = clone;
 }