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

📄 oleregister3.pas

📁 是一个delphi的流程制作软件
💻 PAS
字号:
//========================= OLE UI UTILITIES ===================================
//
// This is a secondary form for the OleUIPasteSpecial component editor
// See OleRegister2
//
// Grahame Marsh
// Freeware for UNDU - you get it for free I make no promises
// gsmarsh@aol.com
//------------------------------------------------------------------------------

{$I OLE.INC}

unit OleRegister3;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, Buttons, ComCtrls,

  OleDlgs, OleConsts;

type
  TFormatForm = class(TForm)
    PageControl: TPageControl;
    GeneralTabSheet: TTabSheet;
    OKBtn: TBitBtn;
    AspectRadioGroup: TRadioGroup;
    GroupBox1: TGroupBox;
    GlobalCheckBox: TCheckBox;
    FileCheckBox: TCheckBox;
    StreamCheckBox: TCheckBox;
    StorageCheckBox: TCheckBox;
    GDICheckBox: TCheckBox;
    WMFCheckBox: TCheckBox;
    EMFCheckBox: TCheckBox;
    FormatComboBox: TComboBox;
    Label1: TLabel;
    TextEdit: TEdit;
    ResultEdit: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    LinkTabSheet: TTabSheet;
    GroupBox2: TGroupBox;
    Link1: TCheckBox;
    Link2: TCheckBox;
    Link3: TCheckBox;
    Link4: TCheckBox;
    Link5: TCheckBox;
    Link6: TCheckBox;
    Link7: TCheckBox;
    Link8: TCheckBox;
    GroupBox3: TGroupBox;
    PasteCheckBox: TCheckBox;
    LinkAnyCheckBox: TCheckBox;
    EnableIconCheckBox: TCheckBox;
  private
    FItem : TPasteEntryItem;
    FInfo : TListItems;
  public
    procedure Initialise;
    procedure Finalise;
    property Item : TPasteEntryItem read FItem write FItem;
    property Info : TListItems read FInfo write FInfo;
  end;

implementation

{$R *.DFM}
procedure TFormatForm.Initialise;

  procedure Setup (C : TCheckBox; I : integer);
  begin
    if Info[I].SubItems[1] = '' then
      C.Caption := '<unassigned>'
    else
      C.Caption := Info [I].SubItems[1];
    C.Checked := TOlePasteFormatOption(I) in Item.Options
  end;

begin
  FormatComboBox.Text := Item.Name;
  AspectRadioGroup.ItemIndex := ord (Item.Aspect) - 1;
  GlobalCheckbox.Checked := cmGlobal in Item.Medium;
  FileCheckbox.Checked := cmFile in Item.Medium;
  StreamCheckbox.Checked := cmStream in Item.Medium;
  StorageCheckbox.Checked := cmStorage in Item.Medium;
  GDICheckbox.Checked := cmGDI in Item.Medium;
  WMFCheckbox.Checked := cmMFPict in Item.Medium;
  EMFCheckbox.Checked := cmEnhMF in Item.Medium;
  ResultEdit.Text := Item.Result;
  TextEdit.Text := Item.Text;
  PasteCheckBox.Checked := pfPaste in Item.Options;
  LinkAnyCheckBox.Checked := pfLinkAnyType in Item.Options;
  EnableIconCheckBox.Checked := pfEnableIcon in Item.Options;
  Setup (Link1, 0);
  Setup (Link2, 1);
  Setup (Link3, 2);
  Setup (Link4, 3);
  Setup (Link5, 4);
  Setup (Link6, 5);
  Setup (Link7, 6);
  Setup (Link8, 7);
  FormatComboBox.Items.AddStrings (KnownClipboardFormats)
end;

procedure TFormatForm.Finalise;
begin
  Item.Name := FormatComboBox.Text;
  Item.Aspect := TClipAspect (AspectRadioGroup.ItemIndex);
  Item.Medium := [];
  if GlobalCheckbox.Checked then
    Item.Medium := Item.Medium + [cmGlobal];
  if FileCheckbox.Checked then
    Item.Medium := Item.Medium + [cmFile];
  if StreamCheckbox.Checked then
    Item.Medium := Item.Medium + [cmStream];
  if StorageCheckbox.Checked then
    Item.Medium := Item.Medium + [cmStorage];
  if GDICheckbox.Checked then
    Item.Medium := Item.Medium + [cmGDI];
  if WMFCheckbox.Checked then
    Item.Medium := Item.Medium + [cmMFPict];
  if EMFCheckbox.Checked then
    Item.Medium := Item.Medium + [cmEnhMF];
  Item.Result := ResultEdit.Text;
  Item.Text := TextEdit.Text;

  Item.Options := [];
  if PasteCheckBox.Checked then
    Item.Options := Item.Options + [pfPaste];
  if LinkAnyCheckBox.Checked then
    Item.Options := Item.Options + [pfLinkAnyType];
  if EnableIconCheckBox.Checked then
    Item.Options := Item.Options + [pfEnableIcon];
  if Link1.Checked then
    Item.Options := Item.Options + [pfLinkType1];
  if Link2.Checked then
    Item.Options := Item.Options + [pfLinkType2];
  if Link3.Checked then
    Item.Options := Item.Options + [pfLinkType3];
  if Link4.Checked then
    Item.Options := Item.Options + [pfLinkType4];
  if Link5.Checked then
    Item.Options := Item.Options + [pfLinkType5];
  if Link6.Checked then
    Item.Options := Item.Options + [pfLinkType6];
  if Link7.Checked then
    Item.Options := Item.Options + [pfLinkType7];
  if Link8.Checked then
    Item.Options := Item.Options + [pfLinkType8]
end;

end.

⌨️ 快捷键说明

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