示例#1
0
        private void loadFilters(FilterInfo info)
        {
            FilterPreview preview = new FilterPreview();

            if (info.Image != null)
            {
                preview.Image = info.Image;
            }
            else
            {
                preview.Image = Resources.Preview;
            }
            preview.Location = new Point(0, loadedFilters * 92);
            preview.Size     = new Size(120, 90);
            preview.Filter   = info.Filter;
            preview.onClick  = filterTab_Click;
            filterControls.Add(preview);
            filterPanel.Controls.Add(preview);
            loadedFilters++;
            if (filters.Count > 0)
            {
                filters.RemoveAt(0);
                loadFilters();
            }
        }
示例#2
0
 private void filterTab_Click(FilterPreview filterControl)
 {
     foreach(FilterPreview control in filterControls){
         if (control.Selected)
         {
             control.Selected = false;
             control.Invalidate();
         }
     }
     filterControl.Selected = true;
 }
示例#3
0
 private void filterTab_Click(FilterPreview filterControl)
 {
     foreach (FilterPreview control in filterControls)
     {
         if (control.Selected)
         {
             control.Selected = false;
             control.Invalidate();
         }
     }
     filterControl.Selected = true;
 }
示例#4
0
 private void loadFilters(FilterInfo info)
 {
     FilterPreview preview = new FilterPreview();
     if (info.Image != null)
     {
         preview.Image = info.Image;
     }
     else
     {
         preview.Image = Resources.Preview;
     }
     preview.Location = new Point(0, loadedFilters * 92);
     preview.Size = new Size(120, 90);
     preview.Filter = info.Filter;
     preview.onClick = filterTab_Click;
     filterControls.Add(preview);
     filterPanel.Controls.Add(preview);
     loadedFilters++;
     if (filters.Count > 0)
     {
         filters.RemoveAt(0);
         loadFilters();
     }
 }