function varargout = RAGui(varargin)
% RAGUI M-file for RAGui.fig
%      RAGUI, by itself, creates a new RAGUI or raises the existing
%      singleton*.
%
%      H = RAGUI returns the handle to a new RAGUI or the handle to
%      the existing singleton*.
%
%      RAGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in RAGUI.M with the given input arguments.
%
%      RAGUI('Property','Value',...) creates a new RAGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before RAGui_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to RAGui_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

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

% Last Modified by GUIDE v2.5 23-Jun-2010 16:45:41

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @RAGui_OpeningFcn, ...
                   'gui_OutputFcn',  @RAGui_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
% End initialization code - DO NOT EDIT


% --- Executes just before RAGui is made visible.
function RAGui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to RAGui (see VARARGIN)

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

% popup window if you close the gui
set(handles.figure1,'CloseRequestFcn',@closeGUI);

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes RAGui wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = RAGui_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 save1_Liquidity2_pushButton.
function save1_Liquidity2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Liquidity2, legend_plot1_Liquidity2);


% --- Executes on button press in save1_Liquidity1_pushButton.
function save1_Liquidity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Liquidity1, legend_plot1_Liquidity1);


% --- Executes on button press in save2_Liquidity1_pushButton.
function save2_Liquidity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Liquidity1, legend_plot2_Liquidity1);


% --- Executes on button press in save4_Liquidity1_pushButton.
function save4_Liquidity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Liquidity1, legend_plot4_Liquidity1);


% --- Executes on button press in save3_Liquidity1_pushButton.
function save3_Liquidity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Liquidity1, legend_plot3_Liquidity1);


% --- Executes on button press in save1_Credit2_pushButton.
function save1_Credit2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Credit2, legend_plot1_Credit2);


% --- Executes on button press in save1_Credit1_pushButton.
function save1_Credit1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Credit1, legend_plot1_Credit1);


% --- Executes on button press in save2_Credit1_pushButton.
function save2_Credit1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Credit1, legend_plot2_Credit1);


% --- Executes on button press in save4_Credit1_pushButton.
function save4_Credit1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Credit1, legend_plot4_Credit1);


% --- Executes on button press in save3_Credit1_pushButton.
function save3_Credit1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Credit1, legend_plot3_Credit1);


% --- Executes on button press in save1_Yield2_pushButton.
function save1_Yield2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Yield2, legend_plot1_Yield2);


% --- Executes on button press in save1_Yield1_pushButton.
function save1_Yield1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Yield1, legend_plot1_Yield1);


% --- Executes on button press in save2_Yield1_pushButton.
function save2_Yield1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Yield1, legend_plot2_Yield1);


% --- Executes on button press in save4_Yield1_pushButton.
function save4_Yield1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Yield1, legend_plot4_Yield1);


% --- Executes on button press in save3_Yield1_pushButton.
function save3_Yield1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Yield1, legend_plot3_Yield1);


% --- Executes on button press in save1_Equity1_pushButton.
function save1_Equity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Equity1, legend_plot1_Equity1);


% --- Executes on button press in save2_Equity1_pushButton.
function save2_Equity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Equity1, legend_plot2_Equity1);


% --- Executes on button press in save4_Equity1_pushButton.
function save4_Equity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Equity1, legend_plot4_Equity1);


% --- Executes on button press in save3_Equity1_pushButton.
function save3_Equity1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Equity1, legend_plot3_Equity1);


% --- Executes on button press in save1_Equity2_pushButton.
function save1_Equity2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Equity2, legend_plot1_Equity2);


% --- Executes on button press in save1_FX2_pushButton.
function save1_FX2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_FX2, legend_plot1_FX2);


% --- Executes on button press in save2_FX2_pushButton.
function save2_FX2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_FX2, legend_plot2_FX2);


% --- Executes on button press in save4_FX2_pushButton.
function save4_FX2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_FX2, legend_plot4_FX2);


% --- Executes on button press in save3_FX2_pushButton.
function save3_FX2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_FX2, legend_plot3_FX2);


% --- Executes on button press in save1_FX1_pushButton.
function save1_FX1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_FX1, legend_plot1_FX1);


% --- Executes on button press in save2_FX1_pushButton.
function save2_FX1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_FX1, legend_plot2_FX1);


% --- Executes on button press in save4_FX1_pushButton.
function save4_FX1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_FX1, legend_plot4_FX1);


% --- Executes on button press in save3_FX1_pushButton.
function save3_FX1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_FX1, handles.legend_plot3_FX1);


% --- Executes on button press in save1_Em2_pushButton.
function save1_Em2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Em2, handles.legend_plot1_Em2);


% --- Executes on button press in save2_Em2_pushButton.
function save2_Em2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Em2, handles.legend_plot2_Em2);


% --- Executes on button press in save4_Em2_pushButton.
function save4_Em2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Em2, handles.legend_plot4_Em2);

% --- Executes on button press in save3_Em2_pushButton.
function save3_Em2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Em2, handles.legend_plot3_Em2);


% --- Executes on button press in save1_Em1_pushButton.
function save1_Em1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Em1, handles.legend_plot1_Em1);


% --- Executes on button press in save2_Em1_pushButton.
function save2_Em1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Em1, handles.legend_plot2_Em1);


% --- Executes on button press in save4_Em1_pushButton.
function save4_Em1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Em1, handles.legend_plot4_Em1);


% --- Executes on button press in save3_Em1_pushButton.
function save3_Em1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Em1, handles.legend_plot3_Em1);


% --- Executes on button press in save1_Commodity_pushButton.
function save1_Commodity_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Commodity, handles.legend_plot1_Commodity);


% --- Executes on button press in save2_Commodity_pushButton.
function save2_Commodity_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Commodity, handles.legend_plot2_Commodity);


% --- Executes on button press in save4_Commodity_pushButton.
function save4_Commodity_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Commodity, handles.legend_plot4_Commodity);


% --- Executes on button press in save3_Commodity_pushButton.
function save3_Commodity_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Commodity, handles.legend_plot3_Commodity);


% --- Executes on button press in save1_Risk2_pushButton.
function save1_Risk2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Risk2, handles.legend_plot1_Risk2);


% --- Executes on button press in save2_Risk2_pushButton.
function save2_Risk2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Risk2, handles.legend_plot2_Risk2);


% --- Executes on button press in save4_Risk2l_pushButton.
function save4_Risk2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Risk2, handles.legend_plot4_Risk2);


% --- Executes on button press in save3_Risk2_pushButton.
function save3_Risk2_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Risk2, handles.legend_plot3_Risk2);


% --- Executes on button press in save1_Risk1_pushButton.
function save1_Risk1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Risk1, handles.legend_plot1_Risk1);


% --- Executes on button press in save2_Risk1_pushButton.
function save2_Risk1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Risk1, handles.legend_plot2_Risk1);


% --- Executes on button press in save4_Risk1l_pushButton.
function save4_Risk1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes4_Risk1, handles.legend_plot4_Risk1);


% --- Executes on button press in save3_Risk1_pushButton.
function save3_Risk1_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Risk1, handles.legend_plot3_Risk1);


% --- Executes on button press in save1_Contribution_pushButton.
function save1_Contribution_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes1_Contribution, handles.legend_plot1_Contribution);


% --- Executes on button press in save3_Contribution_pushButton.
function save3_Contribution_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Contribution, handles.legend_plot3_Contribution);


% --- Executes on button press in save1_Overall_pushButton.
function save1_Overall_pushButton_Callback(hObject, eventdata, handles)
RASavePlot(handles.axes1_Overall, handles.legend_plot1_Overall);


% --- Executes on button press in save2_Overall_pushButton.
function save2_Overall_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes2_Overall, handles.legend_plot2_Overall);


% --- Executes on button press in save3_Overall_pushButton.
function save3_Overall_pushButton_Callback(hObject, eventdata, handles)
%RASavePlot(handles.axes3_Overall, handles.legend_plot3_Overall);


% --- Executes on button press in run_pushbutton.
function run_pushbutton_Callback(hObject, eventdata, handles)
% hObject    handle to run_pushbutton (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



% handle all the graphics !
axes(handles.axes1_Overall)
    title('Risk Overall Correlation','FontSize',12,'FontWeight','b','Color','blue');
    %creates a vector from 0 to 10, [0 1 2 3 . . . 10]
    x = 0:10;
    %creates a vector [0 1 4 9 . . . 100]
    y = x.^2;
    plot(x,y);
    handles.legend_plot1_Overall = legend('data');
    guidata(hObject, handles);
        
axes(handles.axes2_Overall)
     title('Risk Overall Correlation','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_Overall = legend('data');
     
axes(handles.axes4_Overall)
     title('Risk Overall Correlation','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot4_Overall = legend('data');
     
axes(handles.axes1_Contribution)
     title('Gewichtung der Komponenten zu Risk Over All (in %)','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Contribution = legend('data');
     
axes(handles.axes2_Contribution)
     title('Amount','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_Contribution = legend('data');

axes(handles.axes4_Contribution)
     title('Amount','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot4_Contribution = legend('data');
     
axes(handles.axes1_Risk1)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Risk1 = legend('data');
   
axes(handles.axes2_Risk1)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_Risk1 = legend('data');
     
axes(handles.axes3_Risk1)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_Risk1 = legend('data');
     
axes(handles.axes4_Risk1)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot4_Risk1 = legend('data');
     
axes(handles.axes1_Risk2)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Risk2 = legend('data');
     
axes(handles.axes2_Risk2)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Risk2 = legend('data');
     
axes(handles.axes3_Risk2)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_Risk2 = legend('data');
     
axes(handles.axes4_Risk2)
     title('Risk Overall','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot4_Risk2 = legend('data');
     
axes(handles.axes1_Equity1)
     title('Equity','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Equity1 = legend('data');
     
axes(handles.axes2_Equity1)
     title('Equity','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_Equity1 = legend('data');
     
axes(handles.axes3_Equity1)
     title('Equity','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_Equity1 = legend('data');
     
axes(handles.axes4_Equity1)
     title('Equity','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot4_Equity1 = legend('data');
     
axes(handles.axes1_Equity2)
     title('Equity','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot1_Equity2 = legend('data');
     
axes(handles.axes1_Commodity)
     title('Commodity','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot1_Commodity = legend('data');
     
axes(handles.axes2_Commodity)
     title('Commodity','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Commodity = legend('data');

axes(handles.axes3_Commodity)
     title('Commodity','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_Commodity = legend('data');
     
axes(handles.axes4_Commodity)
     title('Commodity','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot4_Commodity = legend('data');
     
axes(handles.axes1_Yield1)
     title('Yield','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot1_Yield1 = legend('data');
     
axes(handles.axes2_Yield1)
     title('Yield','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_Yield1 = legend('data');
     
axes(handles.axes3_Yield1)
     title('Yield','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot3_Yield1 = legend('data');
     
axes(handles.axes4_Yield1)
     title('Yield','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot4_Yield1 = legend('data');
     
axes(handles.axes1_Yield2)
     title('Yield','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot1_Yield2 = legend('data');
     
axes(handles.axes1_Em1)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot1_Em1 = legend('data');
     
axes(handles.axes2_Em1)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Em1 = legend('data');
     
axes(handles.axes3_Em1)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot3_Em1 = legend('data');
     
axes(handles.axes4_Em1)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot4_Em1 = legend('data');
     
axes(handles.axes1_Em2)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot1_Em2 = legend('data');
     
axes(handles.axes2_Em2)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Em2 = legend('data');
     
axes(handles.axes3_Em2)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot3_Em2 = legend('data');
     
axes(handles.axes4_Em2)
     title('Emerging Markets','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot4_Em2 = legend('data');
     
axes(handles.axes1_Credit1)
     title('Credit','FontSize',12,'FontWeight','b','Color','blue');   
     %handles.legend_plot1_Credit1 = legend('data');
     
axes(handles.axes2_Credit1)
     title('Credit','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Credit1 = legend('data');
     
axes(handles.axes3_Credit1)
     title('Credit','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_Credit1 = legend('data');
     
axes(handles.axes4_Credit1)
     title('Credit','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot4_Credit1 = legend('data');
     
axes(handles.axes1_Credit2)
     title('Credit','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Credit2 = legend('data');
     
axes(handles.axes1_FX1)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_FX1 = legend('data');
     
axes(handles.axes2_FX1)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot2_FX1 = legend('data');
     
axes(handles.axes3_FX1)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');    
     %handles.legend_plot3_FX1 = legend('data');
     
axes(handles.axes4_FX1)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot4_FX1 = legend('data');
     
axes(handles.axes1_FX2)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');   
     %handles.legend_plot1_FX2 = legend('data');
     
axes(handles.axes2_FX2)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot2_FX2 = legend('data');
     
axes(handles.axes3_FX2)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot3_FX2 = legend('data');
     
axes(handles.axes4_FX2)
     title('Foreign Exchange','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot4_FX2 = legend('data');
     
axes(handles.axes1_Liquidity1)
     title('Liquidity','FontSize',12,'FontWeight','b','Color','blue');
     %handles.legend_plot1_Liquidity1 = legend('data');
     
axes(handles.axes2_Liquidity1)
     title('Liquidity','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot2_Liquidity1 = legend('data');
     
axes(handles.axes3_Liquidity1)
     title('Liquidity','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot3_Liquidity1 = legend('data');
     
axes(handles.axes4_Liquidity1)
     title('Liquidity','FontSize',12,'FontWeight','b','Color','blue');  
     %handles.legend_plot4_Liquidity1 = legend('data');

axes(handles.axes1_Liquidity2)
     title('Liquidity','FontSize',12,'FontWeight','b','Color','blue'); 
     %handles.legend_plot1_Liquidity2 = legend('data');
     
guidata(hObject, handles);


% --- Executes on button press in close_pushbutton.
function close_pushbutton_Callback(hObject, eventdata, handles)
close(gcf); 


function closeGUI(src,evnt)
%src is the handle of the object generating the callback (the source of the event)
%evnt is the The event data structure (can be empty for some callbacks)
selection = questdlg('Do you want to close the GUI?',...
                     'Close Request Function',...
                     'Yes','No','Yes');
switch selection,
   case 'Yes',
    delete(gcf)
   case 'No'
     return
end


% --- Executes on button press in loaddata_pushbutton.
function loaddata_pushbutton_Callback(hObject, eventdata, handles)
conn = database('MacroDatabase', '', '');
set(handles.loaddata_text1,'BackGroundColor','green');
set(handles.loaddata_text2,'String','Successful');
