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

📄 iledspiralcomponenteditor.pas

📁 iocopm3.04源码,一套很好的工控开发工具
💻 PAS
字号:
{*******************************************************}
{                                                       }
{       TiLedSpiralComponentEditor                      }
{                                                       }
{       Copyright (c) 1997,2003 Iocomp Software         }
{                                                       }
{*******************************************************}
{$I iInclude.inc}

{$ifdef iVCL}unit  iLedSpiralComponentEditor;{$endif}
{$ifdef iCLX}unit QiLedSpiralComponentEditor;{$endif}

interface

uses
  {$I iIncludeUsesForms.inc}

  {$IFDEF iVCL} iComponentEditorForm,  iTypes,  iLedSpiral,{$ENDIF}
  {$IFDEF iCLX}QiComponentEditorForm, QiTypes, QiLedSpiral,{$ENDIF}

  {$IFDEF iVCL}  StdCtrls,  ExtCtrls,  Controls,  ComCtrls, Classes,  iComponentEditorThemePanel,  iComponentEditorButtonPanel,  iEditorBasicComponents,  iOPCBrowserPanel,  iAboutPanel,
  iCheckBox, iComponent, iVCLComponent, iCustomComponent, iRadioGroup;{$ENDIF}
  {$IFDEF iCLX} QStdCtrls, QExtCtrls, QControls, QComCtrls, Classes, QiComponentEditorThemePanel, QiComponentEditorButtonPanel, QiEditorBasicComponents, QiOPCBrowserPanel, QiAboutPanel;{$ENDIF}

type
  TiLedSpiralComponentEditorForm = class(TiComponentEditorForm)
    PageControl: TiComponentEditorPageControl;
    GeneralTabSheet: TTabSheet;
    BorderStyleRadioGroup: TiComponentEditorRadioGroup;
    BackGroundColorPicker: TiComponentEditorColorPicker;
    Label5: TLabel;
    Label8: TLabel;
    Label1: TLabel;
    Label6: TLabel;
    PositionEdit: TiComponentEditorEdit;
    PositionMaxEdit: TiComponentEditorEdit;
    PositionMinEdit: TiComponentEditorEdit;
    Label2: TLabel;
    Label29: TLabel;
    CurrentMaxEdit: TiComponentEditorEdit;
    CurrentMinEdit: TiComponentEditorEdit;
    TransparentCheckBox: TiComponentEditorCheckBox;
    AboutTabSheet: TTabSheet;
    iComponentEditorButtonPanel1: TiComponentEditorButtonPanel;
    ThemeTabSheet: TTabSheet;
    iComponentEditorThemePanel: TiComponentEditorThemePanel;
    OPCTabSheet: TTabSheet;
    iOPCBrowserPanel: TiOPCBrowserPanel;
    iAboutPanel1: TiAboutPanel;
    DesignTabSheet: TTabSheet;
    DesignPageControl: TiComponentEditorPageControl;
    DesignGeneralTabSheet: TTabSheet;
    DesignSectionsTabSheet: TTabSheet;
    Label7: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    SectionCountUpDown: TiUpDown;
    SectionColor1Picker: TiComponentEditorColorPicker;
    SectionColor2Picker: TiComponentEditorColorPicker;
    SectionColor3Picker: TiComponentEditorColorPicker;
    SectionEnd1Edit: TiComponentEditorEdit;
    SectionEnd2Edit: TiComponentEditorEdit;
    SectionCountEdit: TiComponentEditorEdit;
    StyleRadioGroup: TiComponentEditorRadioGroup;
    SegmentGroupBox: TGroupBox;
    Label3: TLabel;
    Label14: TLabel;
    Label16: TLabel;
    SegmentSizeUpDown: TiUpDown;
    SegmentWidthUpDown: TiUpDown;
    SegmentCountUpDown: TiUpDown;
    SegmentSizeEdit: TiComponentEditorEdit;
    SegmentWidthEdit: TiComponentEditorEdit;
    SegmentCountEdit: TiComponentEditorEdit;
    Label15: TLabel;
    Label34: TLabel;
    Label35: TLabel;
    OuterRadiusUpDown: TiUpDown;
    RangeDegreesUpDown: TiUpDown;
    StartDegreesUpDown: TiUpDown;
    OuterRadiusEdit: TiComponentEditorEdit;
    RangeDegreesEdit: TiComponentEditorEdit;
    StartDegreesEdit: TiComponentEditorEdit;
    ShowOffSegmentsCheckBox: TiComponentEditorCheckBox;
    AutoSizeCheckBox: TiComponentEditorCheckBox;
    Label4: TLabel;
    OuterMarginUpDown: TiUpDown;
    OuterMarginEdit: TiComponentEditorEdit;
    Label76: TLabel;
    UpdateFrameRateUpDown: TiUpDown;
    UpdateFrameRateEdit: TiComponentEditorEdit;
    AutoFrameRateCheckBox: TiComponentEditorCheckBox;
  protected
    procedure CreateThemeInstance; override;
    procedure CopyPropertiesToForm     (Component: TWinControl); override;
    procedure CopyPropertiesToComponent(Component: TWinControl); override;
  end;

var
  iLedSpiralComponentEditorForm: TiLedSpiralComponentEditorForm;

implementation

{$R *.dfm}
//****************************************************************************************************************************************************
procedure TiLedSpiralComponentEditorForm.CreateThemeInstance;
begin
  iThemeInstance := TiLedSpiral.Create(Self);
end;
//****************************************************************************************************************************************************
procedure TiLedSpiralComponentEditorForm.CopyPropertiesToForm(Component: TWinControl);
var
  iLedSpiral : TiLedSpiral;
begin
  iLedSpiral := Component as TiLedSpiral;

  PositionEdit.AsFloat               := iLedSpiral.Position;
  PositionMaxEdit.AsFloat            := iLedSpiral.PositionMax;
  PositionMinEdit.AsFloat            := iLedSpiral.PositionMin;
  CurrentMaxEdit.AsFloat             := iLedSpiral.CurrentMax;
  CurrentMinEdit.AsFloat             := iLedSpiral.CurrentMin;
  OuterRadiusEdit.AsInteger          := iLedSpiral.OuterRadius;
  StartDegreesEdit.AsInteger         := iLedSpiral.StartDegrees;
  RangeDegreesEdit.AsInteger         := iLedSpiral.RangeDegrees;
  OuterMarginEdit.AsInteger          := iLedSpiral.OuterMargin;
  AutoFrameRateCheckBox.AsBoolean    := iLedSpiral.AutoFrameRate;
  UpdateFrameRateEdit.AsInteger      := iLedSpiral.UpdateFrameRate;

  ShowOffSegmentsCheckBox.AsBoolean  := iLedSpiral.ShowOffSegments;
  BackGroundColorPicker.Color        := iLedSpiral.BackGroundColor;
  TransparentCheckBox.AsBoolean      := iLedSpiral.Transparent;
  AutoSizeCheckBox.AsBoolean         := iLedSpiral.AutoSize;

  StyleRadioGroup.AsInteger          := ord(iLedSpiral.Style);
  BorderStyleRadioGroup.AsInteger    := ord(iLedSpiral.BorderStyle);

  SegmentCountEdit.AsInteger         := iLedSpiral.SegmentCount;
  SegmentSizeEdit.AsInteger          := iLedSpiral.SegmentSize;
  SegmentWidthEdit.AsInteger         := iLedSpiral.SegmentWidth;

  SectionCountEdit.AsInteger         := iLedSpiral.SectionCount;
  SectionColor1Picker.Color          := iLedSpiral.SectionColor1;
  SectionColor2Picker.Color          := iLedSpiral.SectionColor2;
  SectionColor3Picker.Color          := iLedSpiral.SectionColor3;
  SectionEnd1Edit.AsFloat            := iLedSpiral.SectionEnd1;
  SectionEnd2Edit.AsFloat            := iLedSpiral.SectionEnd2;

  UpLoadOPCProperties(iLedSpiral, iOPCBrowserPanel);
end;
//****************************************************************************************************************************************************
procedure TiLedSpiralComponentEditorForm.CopyPropertiesToComponent(Component: TWinControl);
var
  iLedSpiral : TiLedSpiral;
begin
  iLedSpiral := Component as TiLedSpiral;

  iLedSpiral.Position        := PositionEdit.AsFloat;
  iLedSpiral.PositionMax     := PositionMaxEdit.AsFloat;
  iLedSpiral.PositionMin     := PositionMinEdit.AsFloat;
  iLedSpiral.CurrentMax      := CurrentMaxEdit.AsFloat;
  iLedSpiral.CurrentMin      := CurrentMinEdit.AsFloat;
  iLedSpiral.OuterRadius     := OuterRadiusEdit.AsInteger;
  iLedSpiral.StartDegrees    := StartDegreesEdit.AsInteger;
  iLedSpiral.RangeDegrees    := RangeDegreesEdit.AsInteger;
  iLedSpiral.OuterMargin     := OuterMarginEdit.AsInteger;
  iLedSpiral.AutoFrameRate   := AutoFrameRateCheckBox.AsBoolean;
  iLedSpiral.UpdateFrameRate := UpdateFrameRateEdit.AsInteger;

  iLedSpiral.ShowOffSegments := ShowOffSegmentsCheckBox.AsBoolean;
  iLedSpiral.BackGroundColor := BackGroundColorPicker.Color;
  iLedSpiral.Transparent     := TransparentCheckBox.AsBoolean;
  iLedSpiral.AutoSize        := AutoSizeCheckBox.AsBoolean;

  iLedSpiral.Style           := TiLedSpiralStyle(StyleRadioGroup.AsInteger);
  iLedSpiral.BorderStyle     := TiBevelStyle(BorderStyleRadioGroup.AsInteger);

  iLedSpiral.SegmentCount    := SegmentCountEdit.AsInteger;
  iLedSpiral.SegmentSize     := SegmentSizeEdit.AsInteger;
  iLedSpiral.SegmentWidth    := SegmentWidthEdit.AsInteger;

  iLedSpiral.SectionCount    := SectionCountEdit.AsInteger;
  iLedSpiral.SectionColor1   := SectionColor1Picker.Color;
  iLedSpiral.SectionColor2   := SectionColor2Picker.Color;
  iLedSpiral.SectionColor3   := SectionColor3Picker.Color;
  iLedSpiral.SectionEnd1     := SectionEnd1Edit.AsFloat;
  iLedSpiral.SectionEnd2     := SectionEnd2Edit.AsFloat;

  DownLoadOPCProperties(iLedSpiral, iOPCBrowserPanel);
end;
//****************************************************************************************************************************************************
end.

⌨️ 快捷键说明

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