• 大小: 2.7MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-04
  • 语言: C#
  • 标签: VS2013  C#  .NET4.5  相册  

资源简介

VS2013 C#制作的简单相册 结构代码简单 适合初学者

资源截图

代码片段和文件信息

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 photo
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

       
        public int i=(-1);
        public int t = (-1);
        private void toolStripButton1_Click(object sender EventArgs e)
        {//读取背景图片名
            List back = new List();
            load ob = new load();
            back= ob.FAF(“back“);
            string[] bk=new string[50];
            back.CopyTo(bk);                
            if(i>=back.Count)
            {
                i=0;                                
            }
            try { this.BackgroundImage = Image.FromFile(“back\\“+bk[i]); }
            catch { }
            i++;
            }

        private void toolStripButton4_Click(object sender EventArgs e)
        {
            this.Close();
        }

        private void toolStripButton2_Click(object sender EventArgs e)
        {
            List back = new List();
            load ob = new load();
            back = ob.FAF(“photo“);
            string[] bk = new string[50];
            back.CopyTo(bk); 
          
            if(t<=0)
           { t = back.Count; }
            t--;
            try { pictureBox1.Image = Image.FromFile(“photo\\“ + bk[t]); }
            catch { }
        }

        private void toolStripButton3_Click(object sender EventArgs e)
        {
             List back = new List();
            load ob = new load();
            back= ob.FAF(“photo“);
            string[] bk=new string[50];
            back.CopyTo(bk);                
            if(t>=back.Count-1)
            {
                t=(-1);
            }
           t++;
            try { pictureBox1.Image = Image.FromFile(“photo\\“ + bk[t]); }
            catch { }    
            }

        private void frmMain_SizeChanged(object sender EventArgs e)
        {
            pictureBox1.Width = this.Width / 100 * 54;
        }

        private void toolStripButton5_Click(object sender EventArgs e)
        {
            pictureBox1.Image = null;
        }

       
        }
        }







 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2014-06-03 10:21  photo\photo\App.config

     文件     183021  2014-06-03 10:11  photo\photo\bin\Debug\back\back1.jpg

     文件     164431  2014-06-03 14:12  photo\photo\bin\Debug\back\e604114dce925aeaf6656f8e5b8deb67.jpg

     文件     213673  2014-06-03 16:34  photo\photo\bin\Debug\photo\17413727c69c7925fa1aa1014699fcab.jpg

     文件      69773  2014-06-03 16:55  photo\photo\bin\Debug\photo\3fb8bf32fb56e4b40f21ebd650ef4453.jpg

     文件       7156  2014-06-03 16:55  photo\photo\bin\Debug\photo\5b22ff6b0b0a8a73b7f60ab38aba2b4c.jpg

     文件     721359  2014-06-03 16:34  photo\photo\bin\Debug\photo\8bac4ae13d8eb82e36a424c350c96ce4.jpg

     文件     224256  2014-06-04 09:14  photo\photo\bin\Debug\photo.exe

     文件        187  2014-06-03 10:21  photo\photo\bin\Debug\photo.exe.config

     文件      30208  2014-06-04 09:14  photo\photo\bin\Debug\photo.pdb

     文件      24224  2014-06-04 12:07  photo\photo\bin\Debug\photo.vshost.exe

     文件        187  2014-06-03 10:21  photo\photo\bin\Debug\photo.vshost.exe.config

     文件        490  2012-06-06 02:06  photo\photo\bin\Debug\photo.vshost.exe.manifest

     文件       4536  2014-06-03 10:47  photo\photo\button\backchang.png

     文件       3973  2014-06-03 10:48  photo\photo\button\close.png

     文件     164431  2014-06-03 14:12  photo\photo\button\e604114dce925aeaf6656f8e5b8deb67.jpg

     文件       3990  2014-06-03 10:46  photo\photo\button\Left.png

     文件       3739  2014-06-03 10:45  photo\photo\button\right.png

     文件       4175  2014-06-04 09:13  photo\photo\button\star.png

     文件       2484  2014-06-04 09:14  photo\photo\Form1.cs

     文件       9171  2014-06-04 09:14  photo\photo\Form1.Designer.cs

     文件     322129  2014-06-04 09:14  photo\photo\Form1.resx

     文件        632  2014-06-04 08:49  photo\photo\load.cs

     文件       4286  2014-06-03 08:53  photo\photo\logo.ico

     文件       1417  2014-06-03 12:21  photo\photo\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6955  2014-06-03 15:14  photo\photo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        827  2014-06-04 12:07  photo\photo\obj\Debug\photo.csproj.FileListAbsolute.txt

     文件        977  2014-06-04 09:14  photo\photo\obj\Debug\photo.csproj.GenerateResource.Cache

     文件       2145  2014-06-03 10:52  photo\photo\obj\Debug\photo.csprojResolveAssemblyReference.cache

     文件     224256  2014-06-04 09:14  photo\photo\obj\Debug\photo.exe

............此处省略42个文件信息

评论

共有 条评论