0001 function varargout = TimeUnit(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010 gui_Singleton = 1;
0011 gui_State = struct('gui_Name', mfilename, ...
0012 'gui_Singleton', gui_Singleton, ...
0013 'gui_OpeningFcn', @TimeUnit_OpeningFcn, ...
0014 'gui_OutputFcn', @TimeUnit_OutputFcn, ...
0015 'gui_LayoutFcn', [] , ...
0016 'gui_Callback', []);
0017 if nargin && ischar(varargin{1})
0018 gui_State.gui_Callback = str2func(varargin{1});
0019 end
0020
0021 if nargout
0022 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0023 else
0024 gui_mainfcn(gui_State, varargin{:});
0025 end
0026
0027
0028
0029
0030 function TimeUnit_OpeningFcn(hObject, eventdata, handles, varargin)
0031 handles.output = hObject;
0032 guidata(hObject, handles);
0033
0034
0035
0036 function varargout = TimeUnit_OutputFcn(hObject, eventdata, handles)
0037
0038 varargout{1} = handles.output;
0039
0040 function InsertManuallyEdit_Callback(hObject, eventdata, handles)
0041
0042
0043 function InsertManuallyEdit_CreateFcn(hObject, eventdata, handles)
0044 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0045 set(hObject,'BackgroundColor','white');
0046 end
0047
0048
0049 function ChooseUipanel_SelectionChangeFcn(hObject, eventdata, handles)
0050
0051
0052 function OKPushbutton_Callback(hObject, eventdata, handles)
0053 IMedit=get(handles.InsertManuallyEdit, 'String');
0054 if strcmp(IMedit,'Or Insert manually')
0055 hSelectedObj=get(handles.ChooseUipanel, 'SelectedObject');
0056 selectedObjTag=get(hSelectedObj, 'Tag');
0057 switch selectedObjTag
0058 case 'DonotshowRadio'
0059 SelectString='NShow';
0060 case 'SecondRadio'
0061 SelectString='s';
0062 case 'MinuteRadio'
0063 SelectString='m';
0064 case 'HourRadio'
0065 SelectString='h';
0066 case 'NoRadio'
0067 SelectString='NO';
0068 end
0069 else
0070 SelectString=IMedit;
0071 end
0072 setappdata(0,'SelectString',SelectString)
0073 close(TimeUnit)