advanced file viewer initial commit
This commit is contained in:
58
advancedpictureviewer/Form1.cs
Normal file
58
advancedpictureviewer/Form1.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace advancedpictureviewer
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
Bitmap bitmap1;
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
openFileDialog1.ShowDialog();
|
||||
bitmap1 = (Bitmap)Bitmap.FromFile(openFileDialog1.FileName);
|
||||
pictureBox1.Image = bitmap1;
|
||||
fileSizeLabel.Text = openFileDialog1.FileName.Length.ToString();
|
||||
}
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void toolButton_FlipX_Click(object sender, EventArgs e)
|
||||
{
|
||||
bitmap1.RotateFlip(RotateFlipType.RotateNoneFlipX);
|
||||
pictureBox1.Image = bitmap1;
|
||||
}
|
||||
|
||||
private void toolButton_FlipY_Click(object sender, EventArgs e)
|
||||
{
|
||||
bitmap1.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
pictureBox1.Image = bitmap1;
|
||||
}
|
||||
|
||||
private void toolButton_RotY_Click(object sender, EventArgs e)
|
||||
{
|
||||
bitmap1.RotateFlip(RotateFlipType.Rotate270FlipNone);
|
||||
pictureBox1.Image = bitmap1;
|
||||
}
|
||||
|
||||
private void toolButton_RotL_Click(object sender, EventArgs e)
|
||||
{
|
||||
bitmap1.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
||||
pictureBox1.Image = bitmap1;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user