function varargout = zobraz_vysledky_checkmark(varargin)
% ZOBRAZ_VYSLEDKY_CHECKMARK M-file for zobraz_vysledky_checkmark.fig
%      ZOBRAZ_VYSLEDKY_CHECKMARK, by itself, creates a new ZOBRAZ_VYSLEDKY_CHECKMARK or raises the existing
%      singleton*.
%
%      H = ZOBRAZ_VYSLEDKY_CHECKMARK returns the handle to a new ZOBRAZ_VYSLEDKY_CHECKMARK or the handle to
%      the existing singleton*.
%
%      ZOBRAZ_VYSLEDKY_CHECKMARK('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in ZOBRAZ_VYSLEDKY_CHECKMARK.M with the given input arguments.
%
%      ZOBRAZ_VYSLEDKY_CHECKMARK('Property','Value',...) creates a new ZOBRAZ_VYSLEDKY_CHECKMARK or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before zobraz_vysledky_checkmark_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to zobraz_vysledky_checkmark_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 zobraz_vysledky_checkmark

% Last Modified by GUIDE v2.5 12-Dec-2009 12:03:42

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @zobraz_vysledky_checkmark_OpeningFcn, ...
                   'gui_OutputFcn',  @zobraz_vysledky_checkmark_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 zobraz_vysledky_checkmark is made visible.
function zobraz_vysledky_checkmark_OpeningFcn(hObject, eventdata, handles, varargin)

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

% Update handles structure
guidata(hObject, handles);


% --- Outputs from this function are returned to the command line.
function varargout = zobraz_vysledky_checkmark_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 selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns listbox1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox1


% --- Executes during object creation, after setting all properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

%*************************************************************
% vysledky zpracovane z checkmarku
load vysledek_checkmark
fid = fopen('vysledky.txt', 'w');

pocet = size(vysledek_checkmark,2);                 % pocet provedenych testu

for j=1:pocet
    
vypis{j} = ['Soubor - ' vysledek_checkmark(j).jmeno_vodoznaku  '      NCC - ' num2str(vysledek_checkmark(j).NCC) '   Shoda - ' num2str(vysledek_checkmark(j).result)];

fprintf(fid,'\n Soubor - %s, NCC - %c, Shoda - %d', vysledek_checkmark(j).jmeno_vodoznaku, vysledek_checkmark(j).NCC, vysledek_checkmark(j).result); 
% zapsani do souboru a zaokrouhleni na 3 des. mista

end
    set(findobj('Tag','listbox1'),'String', vypis);
    fclose(fid);


%*************************************************************

% --- Executes on button press in ulozitdata.
function ulozitdata_Callback(hObject, eventdata, handles)



% --- Executes during object creation, after setting all properties.
function figure1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


