function varargout = slmlErrorMessage( varargin )
% SLMLERRORMESSAGE SLML Error Message for the CellOrganizer/Suite

% Author: Ivan E. Cao-Berg (icaoberg@cmu.edu)
% Created: September 17, 2007
% Last Update: March 2, 2008
%
% Copyright (C) 2008 Center for Bioimage Informatics/Murphy Lab
% Carnegie Mellon University
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published
% by the Free Software Foundation; either version 2 of the License,
% or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%
% For additional information visit http://murphylab.web.cmu.edu or
% send email to murphy@cmu.edu

% Edit the above text to modify the response to help slmlErrorMessage

% Last Modified by GUIDE v2.5 30-May-2008 16:57:59

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @slmlErrorMessage_OpeningFcn, ...
                   'gui_OutputFcn',  @slmlErrorMessage_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);

% if nargin && ischar(varargin{2})
%     gui_State.gui_Callback = str2func( varargin{2} );
% end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before slmlErrorMessage is made visible.
function slmlErrorMessage_OpeningFcn(hObject, eventdata, handles, varargin)
%set icon
axes(handles.error);
imshow('error.jpg', ...
    'InitialMagnification', 100 );

%set tool name
if isdeployed
    set( handles.slmlErrorMessage, ...
        'Name', 'SLML Suite Error Message' );
else
    set( handles.slmlErrorMessage, ...
        'Name', 'CellOrganizer Error Message' );
end

%open gui without input arguments
if length(varargin) >= 2
set( handles.errorID, ...
    'String', varargin{1} );
set( handles.errorMessage, ...
    'String', varargin{2} );
end

% Choose default command line output for slmlErrorMessage
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes slmlErrorMessage wait for user response (see UIRESUME)
% uiwait(handles.slmlerrormessage);


% --- Outputs from this function are returned to the command line.
function varargout = slmlErrorMessage_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in moreInformationButton.
function moreInformationButton_Callback(hObject, eventdata, handles)
slmlWebsite;
if isdeployed
    exit;
else
    close;
end

% --- Executes on button press in closeButton.
function closeButton_Callback(hObject, eventdata, handles)
if isdeployed
    exit;
else
    close;
end
