📄 fm_main.m
字号:
'Tag','View');
h2 = uimenu('Parent',h1, ...
'Callback','fm_stat', ...
'Label','Static Report', ...
'Tag','ToolStat', ...
'Accelerator','v');
h2 = uimenu('Parent',h1, ...
'Callback','fm_matrx', ...
'Label','Sparse Matrix Visualization', ...
'Tag','ViewSparseMenu', ...
'Accelerator','m');
%h2 = uimenu('Parent',h1, ...
% 'Callback','fm_vstab', ...
% 'Label','View Node Sensitivity', ...
% 'Tag','ViewEA');
h2 = uimenu('Parent',h1, ...
'Callback','fm_plotfig', ...
'Label','Plotting Utilities', ...
'Tag','ViewPlot', ...
'Separator','on', ...
'Accelerator','w');
h2 = uimenu('Parent',h1, ...
'Callback','fm_wind(-1)', ...
'Label','Plot wind speeds', ...
'Tag','ViewWind');
% Menu Options
h1 = uimenu('Parent',h0, ...
'Label','Options', ...
'Tag','Options');
h2 = uimenu('Parent',h1, ...
'Callback','fm_hist', ...
'Label','History', ...
'Tag','ToolHist', ...
'Accelerator','h');
h2 = uimenu('Parent',h1, ...
'Callback','fm_themefig', ...
'Label','Themes', ...
'Tag','OptionsTh', ...
'Separator','on');
h2 = uimenu('Parent',h1, ...
'Callback','fm_tviewer', ...
'Label','Text Viewer', ...
'Tag','OptionsTV');
% Menu Help
h1 = uimenu('Parent',h0, ...
'Label','Help', ...
'Tag','uimenu2');
h2 = uimenu('Parent',h1, ...
'Callback','fm_about', ...
'Label','About PSAT', ...
'Tag','Subuimenu3');
h2 = uimenu('Parent',h1, ...
'Callback','web(''http://thunderbox.uwaterloo.ca/~fmilano'');', ...
'Label','PSAT website', ...
'Tag','UWLink', ...
'Separator','on');
h2 = uimenu('Parent',h1, ...
'Callback','web(''http://groups.yahoo.com/group/psatforum'');', ...
'Label','PSAT Forum', ...
'Tag','YahooLink');
h2 = uimenu('Parent',h1, ...
'Label','Feedback', ...
'Tag','MailLink');
h3 = uimenu('Parent',h2, ...
'Callback','web(''mailto:fmilano@thunderbox.uwaterloo.ca'');', ...
'Label','fmilano@thunderbox.uwaterloo.ca', ...
'Tag','MailUW');
h3 = uimenu('Parent',h2, ...
'Callback','web(''mailto:fmilano@ind-cr.uclm.es'');', ...
'Label','fmilano@ind-cr.uclm.es', ...
'Tag','MailUCLM');
h3 = uimenu('Parent',h2, ...
'Callback','web(''mailto:psatforum@yahoo.com'');', ...
'Label','psatforum@yahoo.com', ...
'Tag','MailYahoo');
h2 = uimenu('Parent',h1, ...
'Callback','fm_enter(Path.psat,Settings.version,Settings.date)', ...
'Label','Splash Window', ...
'Tag','SplashPSAT');
h2 = uimenu('Parent',h1, ...
'Callback','fm_clock', ...
'Label','Clock', ...
'Tag','ClockMenu', ...
'Separator','on');
h2 = uimenu('Parent',h1, ...
'Callback','fm_warranty', ...
'Label','No Warranty', ...
'Tag','WarMenu', ...
'Separator','on');
h2 = uimenu('Parent',h1, ...
'Callback','fm_license', ...
'Label','GNU License', ...
'Tag','LicMenu');
% general pushbuttons
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color03, ...
'Callback','fm_set lf', ...
'FontWeight','bold', ...
'ForegroundColor',Theme.color09, ...
'Position',[0.35345 0.26324 0.16379 0.068536], ...
'String','Power Flow', ...
'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_setting', ...
'Position',[0.7968 0.26324 0.16379 0.068536], ...
'String','Settings', ...
'Tag','Pushbutton5');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set opensys', ...
'Position',[0.57512 0.18847 0.16379 0.068536], ...
'String','Load System', ...
'Tag','Pushbutton4', ...
'UserData','[ ]');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_cpf(''main'');', ...
'Position',[0.35345 0.18847 0.16379 0.068536], ...
'String','Continuation PF', ...
'Tag','Pushbutton3');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color03, ...
'Callback','fm_int', ...
'FontWeight','bold', ...
'ForegroundColor',Theme.color09, ...
'Position',[0.57389 0.26324 0.16379 0.068536], ...
'String','Time Domain', ...
'Tag','Pushbutton2');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_plotfig', ...
'Position',[0.7968 0.18847 0.16379 0.068536], ...
'String','Plot', ...
'Tag','Pushbutton6');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set close', ...
'Position',[0.7968 0.11371 0.16379 0.068536], ...
'String','Close', ...
'Tag','PushClose');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set savesys', ...
'Position',[0.57512 0.11371 0.16379 0.068536], ...
'String','Save System', ...
'Tag','Pushbutton10');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set opf', ...
'Position',[0.35345 0.11371 0.16379 0.068536], ...
'String','Optimal PF', ...
'Tag','Pushbutton9');
% PSAT logo
h1 = axes('Parent',h0, ...
'CreateFcn','Hdl.axes = gca;', ...
'Units','normalized', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',Theme.color04, ...
'ColorOrder',Settings.color, ...
'HandleVisibility','on', ...
'HitTest','off', ...
'Layer','top', ...
'Position',[0.0406404 0.1152265 0.2536946 0.22429907], ...
'Tag','Axes1', ...
'XColor',Theme.color03, ...
'XLim',[0.5 190.5], ...
'XLimMode','manual', ...
'XTickLabelMode','manual', ...
'XTickMode','manual', ...
'YColor',Theme.color03, ...
'YDir','reverse', ...
'YLim',[0.5 140.5], ...
'YLimMode','manual', ...
'YTickLabelMode','manual', ...
'YTickMode','manual', ...
'ZColor',[0 0 0]);
a = fm_mat('main_logo');
try
a = imresize(a,[190 140],'bilinear',11);
catch
% imresize is not available!!!
end
if ispc, set(h1,'XColor',[126 157 185]/255,'YColor',[126 157 185]/255), end
h2 = image('Parent',h1, ...
'CData',a, ...
'Tag','Axes1Image1', ...
'XData',[0 190], ...
'YData',[0 140]);
color1 = [0 0 0];
color2 = [0 0.503 0];
if sum(Theme.color02) < 1
color1 = [1 1 1];
color2 = [0 1 0];
end
h1 = text(10,20,'PSAT');
set(h1, ...
'Color',color1, ...
'FontSize',12, ...
'FontWeight','bold', ...
'FontName','Times')
h1 = text(10,130,Settings.date);
set(h1, ...
'Color',color2, ...
'FontSize', 9, ...
'FontWeight','bold', ...
'FontName','Times')
h1 = text(10,110,['Version ',Settings.version]);
set(h1, ...
'Color',color2, ...
'FontSize', 9, ...
'FontWeight','bold', ...
'FontName','Times')
% frame and general settings
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'ForegroundColor',Theme.color03, ...
'Position',[0.04064 0.35358 0.91872 0.57125], ...
'Enable', 'inactive', ...
'Style','frame', ...
'Tag','Frame1');
%h1 = uicontrol('Parent',h0, ...
% 'Units','normalized', ...
% 'BackgroundColor',Theme.color02, ...
% 'Callback','fm_set setpert', ...
% 'Position',[0.41749 0.74143-0.025 0.15764 0.042056], ...
% 'String','Set Perturbation File', ...
% 'Tag','Pushbutton8');
%h1 = uicontrol('Parent',h0, ...
% 'Units','normalized', ...
% 'BackgroundColor',Theme.color02, ...
% 'Callback','fm_set setdata', ...
% 'Position',[0.41749 0.85514-0.025 0.15764 0.042056], ...
% 'String','Set Data File', ...
% 'Tag','Pushbutton7');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.098522 0.7601 0.13547 0.028037], ...
'String','Perturbation File', ...
'Style','text', ...
'Tag','StaticText10');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.098522 0.8738 0.13547 0.028037], ...
'String','Data File', ...
'Style','text', ...
'Tag','StaticText9');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'ForegroundColor',Theme.color03, ...
'Enable', 'inactive', ...
'Position',[0.098522 0.7180 0.4766 0.038941], ...
'Style','frame', ...
'Tag','FramePert');
if ispc, set(h1,'Style','edit'), end
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'ForegroundColor',Theme.color03, ...
'Enable', 'inactive', ...
'Position',[0.098522 0.8317 0.4766 0.038941], ...
'Style','frame', ...
'Tag','FrameData');
if ispc, set(h1,'Style','edit'), end
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'CreateFcn','if ~isempty(File.pert) & ~strcmp(File.pert,''pert''), set(gcbo,''String'',File.pert); end', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color07, ...
'Enable', 'inactive', ...
'HorizontalAlignment','left', ...
'Position',[0.105 0.722 0.46 0.03], ...
'Style','text', ...
'TooltipString',[Path.pert,File.pert], ...
'Tag','EditText10');
if strcmp('@ ',File.pert(1:min(end,2)))
set(h1,'ForegroundColor',[0 0 0.592])
end
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'CreateFcn','if ~isempty(File.data), set(gcbo,''String'',File.data); end', ...
'Enable', 'inactive', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color07, ...
'HorizontalAlignment','left', ...
'TooltipString',[Path.data,File.data], ...
'Position',[0.105 0.8357 0.46 0.03], ...
'Style','text', ...
'Tag','EditText9');
if ~isempty(findstr(File.data,'(mdl)'))
set(h1,'ForegroundColor',[0 0.592 0])
end
if strcmp('@ ',File.data(1:min(end,2)))
set(h1,'ForegroundColor',[0 0 0.592])
end
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.dynmit = fval(gcbo,Settings.dynmit);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.3940 0.096059 0.038941], ...
'String',num2str(Settings.dynmit), ...
'Style','edit', ...
'Tag','EditText8');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.098522 0.6385 0.13547 0.028037], ...
'String','Command Line', ...
'Style','text', ...
'Tag','StaticText10');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','fm_set command', ...
'FontName',Theme.font01, ...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -