bc... []

MainForm.cs ( File view )

  • By maninwest 2015-02-09
  • View(s):26
  • Download(s):0
  • Point(s): 1
			using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ColorTransformApp
{

    public partial class MainForm : Form
    {

        private Bitmap sourceBitmap;
        private Bitmap resultBitmap;

        public MainForm()
        {

            InitializeComponent();
        
}

        private void openImageToolStripMenuItem_Click(object sender, EventArgs e)
        {

            if (openImageDialog.ShowDialog() == DialogResult.OK)
            {

                sourceBitmap = new Bitmap(openImageDialog.FileName);
                pbxSource.Image = sourceBitmap;
                pbxSource.Height = sourceBitmap.Height;
                pbxSource.Width = sourceBitmap.Width;
                pbxResult.Height = sourceBitmap.Height;
                pbxResult.Width = sourceBitmap.Width;
                pbxResult.Left = pbxSource.Left + sourceBitmap.Width + 20;
                pbxResult.Image = sourceBitmap;
            
}
        
}

        private void getGrayscaleToolStripMenuItem_Click(object sender, EventArgs e)
        {

            if (sourceBitmap != null)
            {

                ColorToGrayscle ctg = new ColorToGrayscle(sourceBitmap, tbrR.Value * 0.01, tbrG.Value * 0.01, tbrB.Value * 0.01);
                resultBitmap = ctg.GetGrayscale();
                pbxResult.Image = resultBitmap;
            
}
        
}
    
}

}
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
ColorTransformApp.sln941.00 B2009-01-26 08:44
ColorTransformApp.suo17.00 kB2009-01-26 09:11
01.96 kB
01.96 kB
01.96 kB
ColorTransformApp.exe12.50 kB2009-01-26 09:12
ColorTransformApp.vshost.exe13.99 kB2009-01-26 09:13
ColorToGrayscle.cs1.76 kB2009-01-26 09:10
ColorTransformApp.csproj3.72 kB2009-01-26 09:02
MainForm.cs1.50 kB2009-01-26 09:12
MainForm.Designer.cs9.13 kB2009-01-26 09:05
MainForm.resx6.07 kB2009-01-26 09:05
Program.cs512.00 B2009-01-26 08:44
01.96 kB
AssemblyInfo.cs1.43 kB2009-01-26 08:44
Resources.Designer.cs2.80 kB2009-01-26 08:44
Resources.resx5.48 kB2009-01-26 08:44
Settings.Designer.cs1.08 kB2009-01-26 08:44
Settings.settings249.00 B2009-01-26 08:44
...

MainForm.cs (27.34 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D