⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fm_make.m

📁 这是一个很适合研究和学习用的电力系统仿真软件
💻 M
📖 第 1 页 / 共 2 页
字号:
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color02, 'CData', ico2,'Callback',['fm_comp ' ...
                    'mdelae'],'Position',[0.9372 0.1826 0.0346 ...
                    0.0450], 'TooltipString','Delete','Tag', ...
               'PushbuttonDelAlgEq');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color02, 'CData', ico2,'Callback',['fm_comp ' ...
                    'mdelse'],'Position',[0.9372 0.0218 0.0346 ...
                    0.0450], 'TooltipString','Delete','Tag', ...
               'PushbuttonDelSerEq');

% Push buttons for manipulating variables
% ----------------------------------------------------------------------------------

% settings
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color02, 'CData', ico4,'Callback',['fm_comp ' ...
                    'xopen'],'Position',[0.1863 0.7550 0.0346 0.0450], ...
               'TooltipString','Settings','Tag','PushbuttonSettStateVar');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color02, 'CData', ico4,'Callback',['fm_comp ' ...
                    'sopen'],'Position',[0.5120 0.7550 0.0346 0.0450], ...
               'TooltipString','Settings','Tag','PushbuttonSettServiceVar');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color02, 'CData', ico4,'Callback',['fm_comp ' ...
                    'popen'],'Position',[0.6749 0.7550 0.0346 0.0450], ...
               'TooltipString','Settings','Tag','PushbuttonSettParameter');

% add
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico1,'Callback','[Buses.name, Buses.n] = fm_add(Buses.name, Buses.n,''ListboxBuses'',''EditTextVariable'');', ...
	'Position',[0.0906 0.7550 0.0346 0.0450],'TooltipString','Add','Tag','PushbuttonAddBus');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico1,'Callback','[State.name, State.n] = fm_add(State.name, State.n,''ListboxState'',''EditTextVariable'');', ...
	'Position',[0.2534 0.7550 0.0346 0.0450],'TooltipString','Add','Tag','PushbuttonAddState');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico1,'Callback','[Servc.name, Servc.n] = fm_add(Servc.name, Servc.n,''ListboxServiceVar'',''EditTextVariable'');', ...
	'Position',[0.5791 0.7550 0.0346 0.0450],'TooltipString','Add','Tag','PushbuttonAddServiceVar');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico1,'Callback','[Param.name, Param.n] = fm_add(Param.name,Param.n,''ListboxParameter'',''EditTextVariable'');', ...
	'Position',[0.7420 0.7550 0.0346 0.0450],'TooltipString','Add','Tag','PushbuttonAddParameter');

% delete
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[Buses.name, Buses.n] = fm_del(Buses.name, Buses.n,''ListboxBuses'');', ...
	'Position',[0.1252 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelBus');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[State.name, State.n] = fm_del(State.name, State.n,''ListboxState'');', ...
	'Position',[0.2880 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelState');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[Algeb.name, Algeb.n] = fm_del(Algeb.name, Algeb.n,''ListboxAlgebraic'');', ...
	'Position',[0.4509 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelAlgebVar');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[Servc.name, Servc.n] = fm_del(Servc.name, Servc.n,''ListboxServiceVar'');', ...
	'Position',[0.6137 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelServiceVar');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[Param.name, Param.n] = fm_del(Param.name,Param.n,''ListboxParameter'');', ...
	'Position',[0.7766 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelParameter');
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor',Theme.color02, ...
	'CData', ico2,'Callback','[Initl.name, Initl.n] = fm_del(Initl.name, Initl.n,''ListboxInitial'');', ...
	'Position',[0.9386 0.7550 0.0346 0.0450],'TooltipString','Delete','Tag','PushbuttonDelInitVar');

% Component properties
% ----------------------------------------------------------------------------------
h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ...
               Theme.color04, 'ForegroundColor',Theme.color03, ...
               'Position',[0.0235 0.940 0.1600 0.0450], 'Style', ...
               'frame','Tag','Frame1');
h(1) = uicontrol('Parent',h0,'Callback','fm_comp name','Units', ...
                 'normalized','BackgroundColor',Theme.color04, ...
                 'ForegroundColor',Theme.color07,'FontWeight','bold', ...
                 'Position',[0.0335  0.9472  0.1400  0.0300], ...
                 'Style','text','Tag','EditTextName');

% Edit strings (variables and equations)
% ----------------------------------------------------------------------------------
h(2) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color04, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color05, ...
                 'HorizontalAlignment','left', 'Position',[0.0235 ...
                    0.8524 0.9486 0.0382], 'String','','Style', ...
                 'edit','Tag','EditTextVariable');
h(3) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color04, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color05, ...
                 'HorizontalAlignment','left', 'Position',[0.0235 ...
                    0.5095 0.9486 0.0382], 'String','','Style', ...
                 'edit','Tag','EditTextEquation');

% Variable listboxes
% ----------------------------------------------------------------------------------
h(4) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color03, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color06, ...
                 'HorizontalAlignment','left', 'Position',[0.0235 ...
                    0.5981 0.1363 0.1569],'String','','Style', ...
                 'listbox','Tag','ListboxBuses','Value',1);
h(5) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color03, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color10, ...
                 'HorizontalAlignment','left', 'Position',[0.1863 ...
                    0.5981 0.1363 0.1569],'Style','listbox', ...
                 'String','','Tag','ListboxState','Value',1);
h(6) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color03, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color10, ...
                 'HorizontalAlignment','left', 'Position',[0.3492 ...
                    0.6335 0.1363 0.1215],'String','','Style', ...
                 'listbox','Tag','ListboxAlgebraic','Value',1);
h(7) = uicontrol('Parent',h0,'Units', 'normalized','Callback',['fm_comp ' ...
                    'serv'],'BackgroundColor',Theme.color03, ...
                 'FontName',Theme.font01,'ForegroundColor', ...
                 Theme.color10,'HorizontalAlignment','left', ...
                 'Position',[0.5120 0.6335 0.1363 0.1215], ...
                 'String',' ','Style','listbox','Tag', ...
                 'ListboxServiceVar','Value',1);
h(8) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color03, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color10, ...
                 'HorizontalAlignment','left', 'Position',[0.6749 ...
                    0.5981 0.1363 0.1569],'String','','Style', ...
                 'listbox','Tag','ListboxParameter','Value',1);
h(9) = uicontrol('Parent',h0,'Units', 'normalized', ...
                 'BackgroundColor',Theme.color03, 'FontName', ...
                 Theme.font01,'ForegroundColor',Theme.color10, ...
                 'HorizontalAlignment','left', 'Position',[0.8369 ...
                    0.6335 0.1363 0.1215],'String','','Style', ...
                 'listbox','Tag','ListboxInitial','Value',1);

% Equation listboxes
% ----------------------------------------------------------------------------------
h(10) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color03, 'Callback',['fm_comp ' ...
                    'mlistxe'],'FontName',Theme.font01, ...
                  'ForegroundColor',Theme.color10, ...
                  'HorizontalAlignment','left','Position',[0.0235 ...
                    0.3433 0.9137 0.1350], 'String','','Style', ...
                  'listbox','Tag','ListboxStateEquation','Value',1);
h(11) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color03, 'Callback',['fm_comp ' ...
                    'mlistae'],'FontName',Theme.font01, ...
                  'ForegroundColor',Theme.color10, ...
                  'HorizontalAlignment','left','Position',[0.0235 ...
                    0.1827 0.9137 0.1350], 'String','','Style', ...
                  'listbox','Tag','ListboxAlgebraicEquation','Value',1);
h(12) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color03, 'Callback',['fm_comp ' ...
                    'mlistse'],'FontName',Theme.font01, ...
                  'ForegroundColor',Theme.color10, ...
                  'HorizontalAlignment','left','Position',[0.0235 ...
                    0.0219 0.9137 0.1350], 'String','','Style', ...
                  'listbox','Tag', 'ListboxServiceEquation','Value',1);

% Popup menus for variables
% ----------------------------------------------------------------------------------
h(13) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color04,'Callback',['fm_comp ' ...
                    'mmenua'], 'ForegroundColor',Theme.color05, ...
                  'HorizontalAlignment','left','Position',[0.3492 ...
                    0.5981 0.1363 0.0354], 'String',' ','Style', ...
                  'popupmenu','Tag','PopupMenuAlgebraic','Value',1);
h(14) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color04,'Callback',['fm_comp ' ...
                    ' mmenus;'], 'ForegroundColor',Theme.color05, ...
                    'HorizontalAlignment','left','Position',[0.5120 ...
                    0.5981 0.1363 0.0354], 'String',' ','Style', ...
                    'popupmenu','Tag','PopupMenuService','Value',1);
h(15) = uicontrol('Parent',h0,'Units', 'normalized', ...
                  'BackgroundColor',Theme.color04,'Callback',['fm_comp ' ...
                    'mmenui'], 'ForegroundColor',Theme.color05, ...
                  'HorizontalAlignment','left','Position',[0.8369 ...
                    0.5981 0.1363 0.0354], 'String',' ','Style', ...
                  'popupmenu','Tag','PopupMenuInit','Value',1);

set(h0,'UserData',h)
if nargout > 0, fig = h0; end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -