private void RotateAllImages(PixbufRotation Rotate) { TreeIter iterdoc, iterimg; if (!ImageList.GetIterFirst(out iterdoc)) { return; } progresswork.Text = "Обработка изображений..."; int CountDoc, CountImg; CalculateImages(out CountDoc, out CountImg); progresswork.Adjustment.Upper = (double)CountImg; MainClass.WaitRedraw(); do { if (!ImageList.IterChildren(out iterimg, iterdoc)) { continue; } do { Pixbuf pix = (Pixbuf)ImageList.GetValue(iterimg, 5); ImageList.SetValue(iterimg, 5, pix.RotateSimple(Rotate)); pix.Dispose(); pix = (Pixbuf)ImageList.GetValue(iterimg, 4); ImageList.SetValue(iterimg, 4, pix.RotateSimple(Rotate)); pix.Dispose(); progresswork.Adjustment.Value++; MainClass.WaitRedraw(); }while(ImageList.IterNext(ref iterimg)); }while(ImageList.IterNext(ref iterdoc)); OnZoomFitActionActivated(null, null); progresswork.Text = "Ok"; progresswork.Fraction = 0; }
private void RotateAllImages(PixbufRotation Rotate) { TreeIter iterdoc, iterimg; if(!ImageList.GetIterFirst(out iterdoc)) return; progresswork.Text = "Обработка изображений..."; int CountDoc, CountImg; CalculateImages(out CountDoc, out CountImg); progresswork.Adjustment.Upper = (double) CountImg; MainClass.WaitRedraw(); do { if(!ImageList.IterChildren(out iterimg, iterdoc)) continue; do { Pixbuf pix = (Pixbuf) ImageList.GetValue(iterimg, 5); ImageList.SetValue(iterimg, 5, pix.RotateSimple(Rotate)); pix.Dispose(); pix = (Pixbuf) ImageList.GetValue(iterimg, 4); ImageList.SetValue(iterimg, 4, pix.RotateSimple(Rotate)); pix.Dispose(); progresswork.Adjustment.Value++; MainClass.WaitRedraw(); }while(ImageList.IterNext(ref iterimg)); }while(ImageList.IterNext(ref iterdoc)); OnZoomFitActionActivated(null, null); progresswork.Text = "Ok"; progresswork.Fraction = 0; }