Exemplo n.º 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();
     }
 }
Exemplo n.º 2
0
 private void processFilter(FilterInfo info)
 {
     if (filters.Count <= 0)
     {
         progressBar.Value = 0;
         progressBar.Style = ProgressBarStyle.Marquee;
         statusTxt.Text = "Processing...";
     }
     statusPanel.Visible = true;
     imageProcessor.RunWorkerAsync(info);
 }
Exemplo n.º 3
0
 private void loadFilters()
 {
     if (filters.Count <= 0)
     {
         statusPanel.Visible = false;
         filterPanel.Enabled = true;
         return;
     }
     FilterInfo info = new FilterInfo();
     info.Callback = loadFilters;
     info.Filter = filters[0];
     info.Value = filters[0].GetMinimumValue() + ((filters[0].GetMaximumValue() - filters[0].GetMinimumValue()) / 2);
     info.Position = new Position(60, 45);
     info.Selection = new Selection(60);
     info.Selection.Width = 120;
     info.Selection.Height = 90;
     info.Image = Resources.Preview;
     processFilter(info);
 }