-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathokno.m
148 lines (125 loc) · 4.97 KB
/
okno.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
% OKNO
%
% Otvori sa uvodne okno programu
%
% Dava na vyber:
%
% IDENTIFIKACIA - VYB_IDENT
% SYNTEZA REGULATORA - PARAM_VL2
% KONIEC - VYP_MENU
% Test,ci uz nie je spustenz PIDTOOL
if(isempty(findobj('Tag','pt'))==0)
fig = figure('Color','red',...
'Resize','off',...
'Numbertitle','off',...
'name',ptg_string(1,7,ptv_str_lang), ...
'Menubar',ptv_fig_menubar,...
'position',[100 100 315 120]);
% Clolourful effect
ptv_cfbcg = get(findobj('Tag','pt'),'UserData');
if(ptv_cfbcg==1)
ptf_cfbcg(gcf,2)
end
HT1= uicontrol(gcf,...
'Style','text',...
'position',[15 10 285 100],...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',[fgcolor],...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'String',ptg_string(2,3,ptv_str_lang));
HB1 = uicontrol(gcf,...
'Style','push',...
'Position',[45 20 90 25],...
'Fontsize',[11],...
'String',ptg_string(3,7,ptv_str_lang),...
'Fontweight','bold',...
'ForegroundColor','red',...
'CallBack','close all,okno');
HB2 = uicontrol(gcf,...
'Style','push',...
'Position',[175 20 90 25],...
'Fontsize',[11],...
'String',ptg_string(3,23,ptv_str_lang),...
'Fontweight','bold',...
'ForegroundColor','black',...
'CallBack','close');
else
% --- Koniec testu spustenia programu --- %
figure('Color','white',...
'Tag','pt',...
'Resize','off',...
'Numbertitle','off',...
'Menubar',ptv_fig_menubar,...
'Name',ptg_string(1,1,ptv_str_lang), ...
'position',[100 100 500 250]);
% Effect variable
set(findobj('Tag','pt'),'UserData',ptv_cfbcg);
% --- UIMENU PIDTOOL --- %
h=uimenu(gcf,'Label',ptg_string(7,1,ptv_str_lang));
uimenu(h,'Label',ptg_string(7,4,ptv_str_lang),'CallBack','if(J1==1),J2=1;zatv,else,J1=1;vyb_ident,end');
uimenu(h,'Label',ptg_string(7,3,ptv_str_lang),'CallBack','if(J1==1),J2=2;zatv,else,J1=1;param_vl2,end');
uimenu(h,'Label',ptg_string(7,5,ptv_str_lang),'CallBack','if(J1==1),J2=4;zatv,else,J1=1;filtracia,end');
uimenu(h,'Label',ptg_string(7,6,ptv_str_lang),'CallBack','if(J1==1),J2=3;zatv,else,J1=1;simul_param,end');
h2=uimenu(gcf,'Label',ptg_string(7,11,ptv_str_lang));
% Generovanie aktualneho zoznamu jazykov
h3=uimenu(h2,'Label',ptg_string(7,2,ptv_str_lang));
h22 = ptf_string_uimenu(h3,ptg_string_list);
if(isempty(ptv_cfbcg))
ptv_cfbcg = 0;
end
h4=uimenu(h2,'Label',ptg_string(7,12+ptv_cfbcg,ptv_str_lang),'CallBack','if(ptv_cfbcg),ptv_cfbcg=0;else,ptv_cfbcg=1;end,set(findobj(''Tag'',''pt''),''UserData'',ptv_cfbcg);set(h4,''Label'',ptg_string(7,12+ptv_cfbcg,ptv_str_lang))');
uimenu(h2,'Label',ptg_string(7,14,ptv_str_lang),'CallBack','dlog2html(''pt_dlog.html'',load(''pt_dlogid.txt''),ptv_str_lang,1);');
uimenu(h2,'Label',ptg_string(7,10,ptv_str_lang),'CallBack','pomoc(ptv_str_lang,fgcolor)');
uimenu(h2,'Label',ptg_string(7,9,ptv_str_lang),'CallBack','close(findobj(''NumberTitle'',''on'')),close(findobj(''Tag'',''ptt_plot''))');
uimenu(h2,'Label',ptg_string(7,8,ptv_str_lang),'CallBack','pt_shutdown,pt');
uimenu(h2,'Label',ptg_string(7,7,ptv_str_lang),'CallBack','pt_shutdown');
% --- Koniec - UIMENU PIDTOOL --- %
% --- Farba okna ---%
ptf_cfbcg(gcf,1)
% --- Koniec - Farba okna ---%
%--------------------------------------------------------------------------
HT3 = uicontrol(gcf,...
'Style','text',...
'ForegroundColor','blue',...
'BackgroundColor','blue',...
'Position',[110 180 300 50],...
'String','');
HT4 = uicontrol(gcf,...
'Style','text',...
'ForegroundColor','red',...
'BackgroundColor','white',...
'Position',[120 190 280 30],...
'Fontsize',[13],...
'Fontangle','italic',...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'String',ptg_string(1,1,ptv_str_lang));
%--------------------------------------------------------------------------
HB3 = uicontrol(gcf,...
'Style','push',...
'Position',[30,90,200,30],...
'Fontweight','bold',...
'String',ptg_string(3,4,ptv_str_lang),...
'Fontsize',[11],...
'ForegroundColor','blue',...
'CallBack','if(J1==1),J2=1;zatv,else,vyb_ident,end');
%--------------------------------------------------------------------------
HB4 = uicontrol(gcf,...
'Style','push',...
'Position',[270,90,200,30],...
'Fontsize',[11],...
'Fontweight','bold',...
'String',ptg_string(3,3,ptv_str_lang),...
'ForegroundColor','red',...
'CallBack','if(J1==1),J2=2;zatv,else,param_vl2,end');
%--------------------------------------------------------------------------
HB5 = uicontrol(gcf,...
'Style','push',...
'Position',[200 15 100 25],...
'Fontweight','bold',...
'String',ptg_string(3,5,ptv_str_lang),...
'ForegroundColor','black',...
'CallBack','vyp_menu');
end