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

📄 fm_about.m

📁 这是一个很适合研究和学习用的电力系统仿真软件
💻 M
字号:
function fig = fm_about(varargin)
% FM_ABOUT display information about the current
%         PSAT version
%
% FM_ABOUT()
%
%Author:    Federico Milano
%Date:      11-Nov-2002
%Update:    10-Feb-2003
%Update:    29-Jul-2003
%Version:   1.0.3
%
%E-mail:    fmilano@thunderbox.uwaterloo.ca
%Web-site:  http://thunderbox.uwaterloo.ca/~fmilano
%
% Copyright (C) 2002-2006 Federico Milano

global Settings Fig Path Theme

if nargin

  if ~exist('Fig'), Fig.about = 0, end
  if ~Fig.about
    Fig.about = findobj(get(0,'Children'),'FileName','fm_about');
  end
  switch varargin{1}

  case 'aboutdown'

    h = get(Fig.about,'Userdata');
    ph = get(h,'Position');
    pos = get(Fig.about,'CurrentPoint');
    for i = 1:length(h)
      ph1 = ph{i}(1);
      ph2 = ph{i}(2);
      ph3 = ph{i}(1) + ph{i}(3);
      ph4 = ph{i}(2) + ph{i}(4);

      if pos(1) > ph1 & pos(2) > ph2  & pos(1) < ph3 & pos(2) < ph4
        switch i
        case 1, web('mailto:fmilano@thunderbox.uwaterloo.ca');
        case 2, web('http://thunderbox.uwaterloo.ca/~fmilano');
        case 3, web('http://groups.yahoo.com/group/psatforum');
        case 4, web('mailto:psatforum@yahoogroups.com');
        case 5, web('mailto:fmilano@ind-cr.uclm.es');
        case 6, web('mailto:psatforum@yahoo.com');
        end
        break
      end

    end

  case 'aboutmove'

    h = get(Fig.about,'Userdata');
    ph = get(h,'Position');
    pos = get(Fig.about,'CurrentPoint');
    px = 1;

    if pos(1) > 0.3 & pos(1) < 0.9
      for i = 1:length(h)
        ph2 = ph{i}(2);
        ph4 = ph{i}(2) + ph{i}(4);
        if pos(2) > ph2 & pos(2) < ph4
          set(Fig.about,'Pointer','custom');
          set(h,'ForegroundColor',[0 0 0]);
          set(h(i),'ForegroundColor',[1 1 0]);
          px = 0;
          break
        end
      end
    end

    if px
      set(Fig.about,'Pointer','ibeam');
      set(Fig.about,'Pointer','arrow');
      set(h,'ForegroundColor',[0 0 0]);
    end

  case 'keyesc'

    tasto = get(gcf,'CurrentCharacter');
    if (double(tasto) == 13 | double(tasto) == 27), close(gcf); end

  end
  return
end

fontname = 'times';
grey = [0.725 0.725 0.725];
if Fig.about > 0, figure(Fig.about), return, end

load finger

h0 = figure('Color',Theme.color01, ...
  'Units', 'normalized', ...
  'Colormap',[], ...
  'CreateFcn','Fig.about = gcf;', ...
  'DeleteFcn','Fig.about = 0;', ...
  'FileName','fm_about', ...
  'KeyPressFcn','fm_about keyesc', ...
  'MenuBar','none', ...
  'Name',['About PSAT'], ...
  'NumberTitle','off', ...
  'PaperPosition',[18 180 576 432], ...
  'PaperType','A4', ...
  'PaperUnits','points', ...
  'PointerShapeCData',finger, ...
  'Position',sizefig(0.35,0.45), ...
  'Resize','on', ...
  'ToolBar','none', ...
  'WindowButtonDownFcn','fm_about aboutdown', ...
  'WindowButtonMotionFcn','fm_about aboutmove');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'Enable', 'inactive', ...
  'BackgroundColor',grey, ...
  'ForegroundColor',Theme.color03, ...
  'Position',[0.05  0.05  0.9  0.9], ...
  'String','fmilano@epsl.die.unige.it', ...
  'Style','frame', ...
  'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',14, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.703 0 0], ...
  'ListboxTop',0, ...
  'Position',[0.1      0.7382     0.8     0.14163], ...
  'String','PSAT', ...
  'Style','text', ...
  'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.251 0 0.251], ...
  'ListboxTop',0, ...
  'Position',[0.1      0.6382     0.8     0.14163], ...
  'String','Power System Analysis Toolbox', ...
  'Style','text', ...
  'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'ListboxTop',0, ...
  'Position',[0.1     0.55+0.075     0.8    0.07], ...
  'String',['Version ',Settings.version], ...
  'Style','text', ...
  'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'ListboxTop',0, ...
  'Position',[0.1     0.48+0.075      0.8       0.07], ...
  'String',Settings.date, ...
  'Style','text', ...
  'Tag','StaticText4');
h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'ListboxTop',0, ...
  'Position',[0.1     0.39+0.075     0.8     0.09], ...
  'String','(c) 2002-2006 Federico Milano', ...
  'Style','text', ...
  'Tag','StaticText3');
%h1 = uicontrol('Parent',h0, ...
%               'Units', 'normalized', ...
%               'BackgroundColor',Theme.color03, ...
%               'Callback','close(gcf);', ...
%               'FontWeight','bold', ...
%               'ForegroundColor',Theme.color09, ...
%               'ListboxTop',0, ...
%               'Position',[0.35  0.08  0.3  0.075], ...
%               'String','Ok', ...
%               'Tag','Pushbutton1');

h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.1 0.355 0.2 0.075], ...
  'String','E-mail:', ...
  'Style','text', ...
  'Tag','StaticText3');

h(1) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.365+0.005 0.6 0.05], ...
  'String','fmilano@thunderbox.uwaterloo.ca', ...
  'Style','text', ...
  'Tag','StaticText3');

h(5) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.315+0.005 0.6 0.05], ...
  'String','fmilano@ind-cr.uclm.es', ...
  'Style','text', ...
  'Tag','StaticText3');

h(6) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.265+0.005 0.6 0.05], ...
  'String','psatforum@yahoo.com', ...
  'Style','text', ...
  'Tag','StaticText3');

h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.1 0.175 0.2 0.075], ...
  'String','Website:', ...
  'Style','text', ...
  'Tag','StaticText3');

h(2) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.185+0.005 0.6 0.05], ...
  'String','http://thunderbox.uwaterloo.ca/~fmilano', ...
  'Style','text', ...
  'Tag','StaticText2');

h1 = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'FontName',fontname, ...
  'FontSize',11, ...
  'FontWeight','bold', ...
  'ForegroundColor',[0.0 0.0 0.502], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.1 0.1 0.2 0.075], ...
  'String','Forum:', ...
  'Style','text', ...
  'Tag','StaticText3');

h(3) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.11+0.005 0.6 0.05], ...
  'String','http://groups.yahoo.com/group/psatforum', ...
  'Style','text', ...
  'Tag','StaticText2');

h(4) = uicontrol('Parent',h0, ...
  'Units', 'normalized', ...
  'BackgroundColor',grey, ...
  'Enable','inactive', ...
  'FontName','Helvetica', ...
  'ForegroundColor',[0 0 0], ...
  'HorizontalAlignment','left', ...
  'ListboxTop',0, ...
  'Position',[0.3 0.06+0.005 0.6 0.05], ...
  'String','psatforum@yahoogroups.com', ...
  'Style','text', ...
  'Tag','StaticText2');


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

⌨️ 快捷键说明

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