0001 function project_mgr(flag)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('flag', 'var') || isempty(flag)
0017 flag = false;
0018 else
0019 flag = true;
0020 end
0021
0022
0023
0024
0025 hidden_state = get(0, 'ShowHiddenHandles');
0026
0027
0028 set(0, 'ShowHiddenHandles', 'on');
0029 fig = findobj('Tag', 'project_mgr');
0030
0031 set(0, 'ShowHiddenHandles', hidden_state);
0032
0033 if isempty(fig)
0034 fig = openfig('project_mgr.fig');
0035 set(fig, 'HandleVisibility', 'callback');
0036 else
0037 figure(fig);
0038 return;
0039 end
0040
0041 H = guihandles(fig);
0042 H.figure = fig;
0043
0044 data = struct;
0045 data.H = H;
0046 data.flag = flag;
0047 data.project_file = '';
0048
0049
0050
0051
0052 data.pa_brain_fig = [];
0053 data.pa_fmri_fig = [];
0054 data.pa_biosemi_eeg_fig = [];
0055 data.pa_brainamp_eeg_fig = [];
0056 data.pa_yokogawa_meg_fig = [];
0057 data.pa_sbi_meg_fig = [];
0058 data.pa_yokogawa_meg_fig = [];
0059 data.pa_head_fig = [];
0060 data.pa_leadfield_fig = [];
0061 data.bayes_fig = [];
0062 data.current_fig = [];
0063
0064
0065 data.tools_fig = [];
0066
0067
0068 data.batch_fig = [];
0069 data.batch_builders = cell(0);
0070
0071
0072 guidata(fig, data);
0073
0074
0075 project_mgr_init_ix_for_check_model(fig);
0076
0077
0078 uname = vb_get_username;
0079 uname = strrep(uname, ' ', '');
0080
0081 last_open = [tempdir, 'vbmeg-', uname, '/project_file_loaded.mat'];
0082 if exist(last_open, 'file') == 2
0083 load(last_open, 'project_file');
0084 project_mgr_load_project_file(project_file, data, fig);
0085 end