advanced file viewer initial commit

This commit is contained in:
2024-02-09 11:51:10 +00:00
parent c3d33a227a
commit 0818f79406
12 changed files with 864 additions and 0 deletions

View 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;
}
}
}