• 大小: 37KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: C#  

资源简介

C#用户名密码登入程序,很适合初学者(不用连接数据库) 打开登录窗体,输入用户名、密码正确后,显示恭喜你登录成功 账号密码不正确,会textbox自动清空,再次输入 用户名admin,密码password (源代码已打包好)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {       
            string admin = this.textBox1.Text.Trim();
            string password = this.textBox2.Text.Trim();
            if ((admin==“admin“) && (password==“password“))
            {
                MessageBox.Show(“恭喜你登錄成功咯!!!“);
            }
            else
            {
                MessageBox.Show(“对不起!账号密码错误喔请重新输入!!!“ “confirm“);
                textBox1.Clear();
                textBox2.Clear();             
            }
            
        }

        private void button2_Click(object sender EventArgs e)
        {
            Application.Exit();
        }
    }
}

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

     文件       9728  2014-02-09 21:58  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件      24064  2014-02-09 21:58  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      14328  2014-02-09 21:47  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        490  2009-06-11 05:14  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       1117  2014-02-09 21:48  WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs

     文件       5776  2014-02-09 21:39  WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs

     文件       5814  2014-02-09 21:39  WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx

     文件        971  2014-02-09 21:58  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件        847  2014-02-09 21:45  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache

     文件       9728  2014-02-09 21:58  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe

     文件        180  2014-02-09 21:45  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources

     文件      24064  2014-02-09 21:58  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb

     文件        180  2014-02-09 15:10  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources

     文件        505  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Program.cs

     文件       1380  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs

     文件       2898  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs

     文件       5612  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx

     文件       1109  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs

     文件        249  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings

     文件       3759  2014-02-09 15:10  WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj

     文件        962  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1.sln

    ..A..H.     13824  2014-02-09 21:59  WindowsFormsApplication1\WindowsFormsApplication1.suo

     目录          0  2014-02-09 14:54  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TempPE

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1\bin

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1\obj

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1\Properties

     目录          0  2014-02-09 22:00  WindowsFormsApplication1\WindowsFormsApplication1

     目录          0  2014-02-09 22:00  WindowsFormsApplication1

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

评论

共有 条评论