コード例 #1
0
        void MnuFloorReflectionClick(object sender, System.EventArgs e)
        {
        	if (this.selectedImage == null)
                return;

            frmFR bfDLG = new frmFR();
            bfDLG.FloorReflection = Effects.FloorReflectionFilter;
            DialogResult result = bfDLG.ShowDialog();

            if (result == DialogResult.OK)
            {
            	Effects.FloorReflectionFilter = bfDLG.FloorReflection;
            	
            	Bitmap oldImg = this.SelectedImage;            
            	this.selectedImage = Effects.FloorReflection(this.SelectedImage);

                oldImg.Dispose();
            	
                this.picBoxMain.Invalidate();
                bfDLG.Dispose();
                // Gargabge Collection
                System.GC.Collect();
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: xuchuansheng/GenXSource
        private void btnFloorReflection_Click(object sender, EventArgs e)
        {
            frmFR bf = new frmFR();

            DialogResult res = bf.ShowDialog();
            Application.DoEvents();

            if (res != DialogResult.OK)
                return;

            Application.DoEvents();

            if (Program.Photo != null)
            {
                try
                {
                    undoHelper.FloorReflection = Effects2.FloorReflectionFilter;
                    Effects2.FloorReflectionFilter = bf.FloorReflection;

                    FilterEffects();

                }
                catch { }
            }
        }