简易的照片浏览器
来源:互联网 发布:js每天定时执行 编辑:程序博客网 时间:2024/06/10 06:35
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace 照片浏览器
...{
public partial class Form1 : Form
...{
public Form1()
...{
InitializeComponent();
}
//添加照片
private void button1_Click(object sender, EventArgs e)
...{
openFileDialog1.ShowDialog();
string[] files = openFileDialog1.FileNames;
for (int i = 0; i < files.Length; i++)
...{
listBox1.Items.Add(files[i].ToString());
}
}
//选中照片并显示
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
...{
string path = listBox1.SelectedItem.ToString();
//方法一
pictureBox1.ImageLocation = path;
//方法二
//pictureBox1.Image = Image.FromFile(path);
}
//上一张
private void button2_Click(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex < 1)
listBox1.SelectedIndex = listBox1.Items.Count-1;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = --i;
}
}
//下一张
private void button3_Click_1(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex > listBox1.Items.Count-2)
listBox1.SelectedIndex = 0;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = ++i;
}
}
//时钟设置
private void timer1_Tick(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex > listBox1.Items.Count - 2)
listBox1.SelectedIndex = 0;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = ++i;
}
}
//自动播放
private void checkBox1_CheckedChanged(object sender, EventArgs e)
...{
timer1.Enabled = !timer1.Enabled;
}
private void pictureBox1_Click(object sender, EventArgs e)
...{
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace 照片浏览器
...{
public partial class Form1 : Form
...{
public Form1()
...{
InitializeComponent();
}
//添加照片
private void button1_Click(object sender, EventArgs e)
...{
openFileDialog1.ShowDialog();
string[] files = openFileDialog1.FileNames;
for (int i = 0; i < files.Length; i++)
...{
listBox1.Items.Add(files[i].ToString());
}
}
//选中照片并显示
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
...{
string path = listBox1.SelectedItem.ToString();
//方法一
pictureBox1.ImageLocation = path;
//方法二
//pictureBox1.Image = Image.FromFile(path);
}
//上一张
private void button2_Click(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex < 1)
listBox1.SelectedIndex = listBox1.Items.Count-1;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = --i;
}
}
//下一张
private void button3_Click_1(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex > listBox1.Items.Count-2)
listBox1.SelectedIndex = 0;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = ++i;
}
}
//时钟设置
private void timer1_Tick(object sender, EventArgs e)
...{
if (listBox1.SelectedIndex > listBox1.Items.Count - 2)
listBox1.SelectedIndex = 0;
else
...{
int i = listBox1.SelectedIndex;
listBox1.SelectedIndex = ++i;
}
}
//自动播放
private void checkBox1_CheckedChanged(object sender, EventArgs e)
...{
timer1.Enabled = !timer1.Enabled;
}
private void pictureBox1_Click(object sender, EventArgs e)
...{
}
}
}
- 简易的照片浏览器
- Java 实现的简易浏览器
- CSS3 简易照片墙
- LCUI:实现一个简易的 照片查看器
- android的简易浏览器的设计实现
- 弄个简易浏览器的小结!
- SwingWorker实现的简易图片浏览器
- UIWebView控件的简易浏览器小案例
- 自己写的安卓简易浏览器
- 创建自己的图片浏览器-简易版本
- 基于Qt-Creator的简易浏览器
- Android程序:简易浏览器的实现(WebView)
- 基于Cef的简易浏览器开发(CefSharp)
- 34.UIWebView(做一个简易的浏览器)
- 基于duilib的多标签简易浏览器
- Qt 实现的简易本地图片浏览器
- 基于Cef的简易浏览器开发(CefSharp)
- Java 实现的简易浏览器(Think浏览器的实现)
- Orace常用函数
- 第十七課 文法
- 生活猛地转变
- 过滤非法字符的简单方法
- oracle中处理日期大全
- 简易的照片浏览器
- oracle-crontab与oracle job在执行时间上的差异
- 几个搞笑的皇族死法
- 控件中嵌入资源
- 【简单】子网划分与子网掩码计算
- 水晶报表自定义参数传递个人示例代码
- 非常6+1抽奖系统
- 如何在win2k上为IIS服务器配置SSL服务!
- word不能保存, 不能另存, 保存按钮 另存菜单不可用 的解决方法