资源简介
用Matlab GUI做的密码登陆框,喜欢的朋友可以试试!

代码片段和文件信息
function varargout = a2(varargin)
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @a2_OpeningFcn ...
‘gui_OutputFcn‘ @a2_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
function a2_OpeningFcn(hobject eventdata handles varargin)
handles.output = hobject;
javaframe = get(hobject ‘Javaframe‘);
javaframe.setFigureIcon(javax.swing.ImageIcon(‘同济大学.jpg‘));
axes(handles.axes1)
imshow(‘背景图片.jpg‘)
[num txt raw] = xlsread(‘user_information.xls‘);
if ~iscellstr(raw)
for i = 1 : 2
n(i) = isnumeric(raw{i});
end
raw{n} = num2str(raw{n});
end
global theif
theif = 0;
global vid
vid =-1;
global numofshot
numofshot=1;
handles.code = raw{21};
guidata(hobject handles);
function varargout = a2_OutputFcn(hobject eventdata handles)
varargout{1} = handles.output;
function login_user_Callback(hobject eventdata handles)
function login_user_CreateFcn(hobject eventdata handles)
if ispc
set(hobject ‘BackgroundColor‘ ‘white‘);
else
set(hobject ‘BackgroundColor‘ get(0 ‘defaultUicontrolBackgroundColor‘));
end
function log_Callback(hobject eventdata handles)
global theif
global vid
code =get(gcf‘userdata‘);
codes = handles.code;
if isequal(codes code)
delete(gcf);
figure
else
errordlg(‘密码错误!‘ ‘错误提示‘);
set(handles.login_code ‘string‘ ‘‘)
set(hobject ‘userdata‘ ‘‘)
theif = theif+1;
end
if theif>2
try
vid = videoinput(‘winvideo‘1);
vid_src=getselectedsource(vid);
data = getsnapshot(vid);
set(vid‘TriggerRepeat‘Inf);
set(vid‘framesPerTrigger‘1);
set(vid‘frameGrabInterval‘1);
vidRes = get(vid ‘VideoResolution‘);
nBands = get(vid ‘NumberOfBands‘);
frame = getsnapshot(vid);
global numofshot
str=[‘theif‘ num2str(numofshot)‘.jpg‘];
imwrite(framestr‘jpg‘);
numofshot=numofshot+1;
end
MailAddress = ‘****‘; %发件人的邮箱
password = ‘****‘; %邮箱密码
setpref(‘Internet‘‘E_mail‘MailAddress);
setpref(‘Internet‘‘SMTP_Server‘‘smtp.gmail.com‘);
setpref(‘Internet‘‘SMTP_Username‘MailAddress);
setpref(‘Internet‘‘SMTP_Password‘password);
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.auth‘‘true‘);
props.setProperty(‘mail.smtp.socketFactory.class‘ ‘javax.net.ssl.SSLSocketFactory‘);
props.setProperty(‘mail.smtp.socketFactory.port‘‘465‘);
subject = ‘****‘; %邮件标题
content1 = ‘****‘; %邮件内容
sender=‘****‘; %发飞信短信的手机号
password=‘****‘; %飞信密码
receiver=‘****‘; %接受短信手机号
content2=‘****‘; %短信内容
end
if theif == 3
url=[‘http://sms.api.bz/fetion.php?username=‘ sende
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 22671 2010-01-18 11:05 密码登陆框\a2.fig
文件 6863 2010-01-18 11:02 密码登陆框\a2.m
文件 35530 2009-10-22 23:05 密码登陆框\同济大学.jpg
文件 6818 2010-01-18 11:01 密码登陆框\a2.asv
文件 2404 2009-11-18 18:34 密码登陆框\button.jpg
文件 14108 2009-11-17 02:36 密码登陆框\背景图片.jpg
文件 13824 2009-11-03 00:29 密码登陆框\user_information.xls
文件 39122 2010-01-18 13:39 密码登陆框\theif8.jpg
目录 0 2010-01-18 10:42 密码登陆框
----------- --------- ---------- ----- ----
141340 9
- 上一篇:卫星导航信号电文的产生 matlab
- 下一篇:aloha.m
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论