PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/Stock Calculator/SharedFiles/LogInDetails.m

http://stock-shock-source.googlecode.com/
MATLAB | 150 lines | 51 code | 33 blank | 66 comment | 4 complexity | 703ef1031b6ef1f4cb0a995613f33e98 MD5 | raw file
  1. function varargout = LogInDetails(varargin)
  2. % LOGINDETAILS M-file for LogInDetails.fig
  3. % LOGINDETAILS, by itself, creates a new LOGINDETAILS or raises the existing
  4. % singleton*.
  5. %
  6. % H = LOGINDETAILS returns the handle to a new LOGINDETAILS or the handle to
  7. % the existing singleton*.
  8. %
  9. % LOGINDETAILS('CALLBACK',hObject,eventData,handles,...) calls the local
  10. % function named CALLBACK in LOGINDETAILS.M with the given input arguments.
  11. %
  12. % LOGINDETAILS('Property','Value',...) creates a new LOGINDETAILS or raises the
  13. % existing singleton*. Starting from the left, property value pairs are
  14. % applied to the GUI before LogInDetails_OpeningFunction gets called. An
  15. % unrecognized property name or invalid value makes property application
  16. % stop. All inputs are passed to LogInDetails_OpeningFcn via varargin.
  17. %
  18. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  19. % instance to run (singleton)".
  20. %
  21. % See also: GUIDE, GUIDATA, GUIHANDLES
  22. % Copyright 2002-2003 The MathWorks, Inc.
  23. % Edit the above text to modify the response to help LogInDetails
  24. % Last Modified by GUIDE v2.5 15-Feb-2007 16:52:45
  25. % Begin initialization code - DO NOT EDIT
  26. gui_Singleton = 1;
  27. gui_State = struct('gui_Name', mfilename, ...
  28. 'gui_Singleton', gui_Singleton, ...
  29. 'gui_OpeningFcn', @LogInDetails_OpeningFcn, ...
  30. 'gui_OutputFcn', @LogInDetails_OutputFcn, ...
  31. 'gui_LayoutFcn', [] , ...
  32. 'gui_Callback', []);
  33. if nargin && ischar(varargin{1})
  34. gui_State.gui_Callback = str2func(varargin{1});
  35. end
  36. if nargout
  37. [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  38. else
  39. gui_mainfcn(gui_State, varargin{:});
  40. end
  41. % End initialization code - DO NOT EDIT
  42. % --- Executes just before LogInDetails is made visible.
  43. function LogInDetails_OpeningFcn(hObject, eventdata, handles, varargin)
  44. % This function has no output args, see OutputFcn.
  45. % hObject handle to figure
  46. % eventdata reserved - to be defined in a future version of MATLAB
  47. % handles structure with handles and user data (see GUIDATA)
  48. % varargin command line arguments to LogInDetails (see VARARGIN)
  49. % Choose default command line output for LogInDetails
  50. handles.output = hObject;
  51. % Update handles structure
  52. guidata(hObject, handles);
  53. % UIWAIT makes LogInDetails wait for user response (see UIRESUME)
  54. uiwait(handles.figure1);
  55. % --- Outputs from this function are returned to the command line.
  56. function varargout = LogInDetails_OutputFcn(hObject, eventdata, handles)
  57. % varargout cell array for returning output args (see VARARGOUT);
  58. % hObject handle to figure
  59. % eventdata reserved - to be defined in a future version of MATLAB
  60. % handles structure with handles and user data (see GUIDATA)
  61. % Get default command line output from handles
  62. global username password
  63. varargout{1} = username;
  64. varargout{2} = password;
  65. clear username
  66. clear password
  67. function password_Callback(hObject, eventdata, handles)
  68. % hObject handle to password (see GCBO)
  69. % eventdata reserved - to be defined in a future version of MATLAB
  70. % handles structure with handles and user data (see GUIDATA)
  71. % Hints: get(hObject,'String') returns contents of password as text
  72. % str2double(get(hObject,'String')) returns contents of password as a double
  73. global username password
  74. username = get(handles.username,'String');
  75. password = get(handles.password,'String');
  76. % --- Executes during object creation, after setting all properties.
  77. function password_CreateFcn(hObject, eventdata, handles)
  78. % hObject handle to password (see GCBO)
  79. % eventdata reserved - to be defined in a future version of MATLAB
  80. % handles empty - handles not created until after all CreateFcns called
  81. % Hint: edit controls usually have a white background on Windows.
  82. % See ISPC and COMPUTER.
  83. if ispc
  84. set(hObject,'BackgroundColor','white');
  85. else
  86. set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
  87. end
  88. function username_Callback(hObject, eventdata, handles)
  89. % hObject handle to username (see GCBO)
  90. % eventdata reserved - to be defined in a future version of MATLAB
  91. % handles structure with handles and user data (see GUIDATA)
  92. % Hints: get(hObject,'String') returns contents of username as text
  93. % str2double(get(hObject,'String')) returns contents of username as a double
  94. global username password
  95. username = get(handles.username,'String');
  96. password = get(handles.password,'String');
  97. % --- Executes during object creation, after setting all properties.
  98. function username_CreateFcn(hObject, eventdata, handles)
  99. % hObject handle to username (see GCBO)
  100. % eventdata reserved - to be defined in a future version of MATLAB
  101. % handles empty - handles not created until after all CreateFcns called
  102. % Hint: edit controls usually have a white background on Windows.
  103. % See ISPC and COMPUTER.
  104. if ispc
  105. set(hObject,'BackgroundColor','white');
  106. else
  107. set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
  108. end
  109. % --- Executes on button press in ok.
  110. function ok_Callback(hObject, eventdata, handles)
  111. % hObject handle to ok (see GCBO)
  112. % eventdata reserved - to be defined in a future version of MATLAB
  113. % handles structure with handles and user data (see GUIDATA)
  114. global username password
  115. username = get(handles.username,'String');
  116. password = get(handles.password,'String');
  117. close(handles.figure1);