Archived
1
0

optimise files

This commit is contained in:
2025-11-25 20:14:10 +08:00
Unverified
parent bb4a37acc4
commit 4e148364a9
171 changed files with 6555 additions and 0 deletions

47
CS/19_5/Form1.cs Normal file
View File

@@ -0,0 +1,47 @@
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 _19_5
{
public partial class Form1 : Form
{
string[] imageURLs = Directory.GetFiles(@"C:\Users\BI\Pictures\Screenshots");
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.ImageLocation = imageURLs[0];
}
private void button1_Click(object sender, EventArgs e)
{
pictureBox1.ImageLocation = imageURLs[button1.ImageIndex];
if (button1.ImageIndex > 0)
{
--button1 .ImageIndex;
button2 .ImageIndex = button1 .ImageIndex +1;
}
}
private void button2_Click(object sender, EventArgs e)
{
pictureBox1.ImageLocation = imageURLs[button2.ImageIndex];
if (button1.ImageIndex < imageList1.Images.Count -1)
{
++button2.ImageIndex;
button1.ImageIndex = button2.ImageIndex - 1;
}
}
}
}