This repository was archived by the owner on Feb 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkspaceGUI.m
More file actions
61 lines (54 loc) · 2.48 KB
/
WorkspaceGUI.m
File metadata and controls
61 lines (54 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function varargout = WorkspaceGUI(varargin)
% WORKSPACEGUI M-file for WorkspaceGUI.fig generated using MATLAB's Guide
%__________________________________________________________________________
% USAGE: varargout = WorkspaceGUI(varargin)
%
% INPUT: none
%
% OUPUT: varargout = {'now','xx'},where xx is the hours, as a string
% varargout = '', which is the selected time option
%__________________________________________________________________________
% 1 - INITIALIZATION CODE - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @WorkspaceGUI_OpeningFcn, ...
'gui_OutputFcn', @WorkspaceGUI_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
% 2 - EXECUTES JUST BEFORE WORKSPACEGUI IS MADE VISIBLE.
function WorkspaceGUI_OpeningFcn(hObject,eventdata,handles,varargin)
set(handles.figure1,'Name','Date option');
uiwait(handles.figure1);
% 3 - OUTPUTS FROM THIS FUNCTION ARE RETURNED TO THE COMMAND LINE.
function varargout = WorkspaceGUI_OutputFcn(hObject,eventdata,handles)
varargout{1} = handles.output;
close(handles.figure1);
% 4 - CALLBACKS FOR UICONTROLS AND FIGURE
% 4.1 - Executes when "Use dates as selected" is pressed
function selected_Callback(hObject, eventdata, handles)
handles.output = '';
guidata(hObject,handles);
uiresume;
% 4.2 - Executes when "Use actual date and time" is pressed
function actual_Callback(hObject, eventdata, handles)
hrs = get(handles.hours,'String');
handles.output = {'now',hrs};
guidata(hObject,handles);
uiresume;
% 4.3 - Callbacks for hours edit box, this is generated by MATLAB: Do not
% remove or function will not operate correctly
function hours_Callback(hObject, eventdata, handles)
function hours_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'),...
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end