资源简介
用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
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论