コード例 #1
0
ファイル: MainForm.Logic.cs プロジェクト: kyzmitch/Cip
 private void ApplyFilter(ImageFilter filter)
 {
     Raster raster = filter.ProcessRaster(UndoList[iCurrentIndexOfList], backgroundWorkerCip);
     if (raster != null)
     {
         this.IsNullRaster = false;
         if ((iCurrentIndexOfList + 1) < range)
         {
             UndoList[++iCurrentIndexOfList] = raster;
             iCurrentCountOfList = iCurrentIndexOfList + 1;
             this.currentBitmap = raster.ToBitmap();
             this.picBoxModifyed.Image = this.currentBitmap;
             this.CheckUndoToolStrip();
         }
         else
         {
             UndoList[range - 1] = raster;
             iCurrentCountOfList = range;
             iCurrentIndexOfList = range - 1;
             this.currentBitmap = raster.ToBitmap();
             this.picBoxModifyed.Image = this.currentBitmap;
             this.CheckUndoToolStrip();
         }
     }
     else
     {
         //MessageBox.Show("this method returns nothing");
         this.IsNullRaster = true;
     }
 }