CnPack Forum


 
Subject: CnRS232Dialog 可能的 Bug
Anykey
新警察
Rank: 1
手艺人


UID 42308
Digest Posts 1
Credits 32
Posts 8
点点分 32
Reading Access 10
Registered 2009-5-5
Status Offline
Post at 2009-5-27 10:45  Profile | Blog | P.M. 
CnRS232Dialog 可能的 Bug



QUOTE:


unit CnRS232Dialog;

{ TCnRS232Dlg }
// 窗体创建
procedure TCnRS232Dlg.FormCreate(Sender: TObject);
begin
  FCommConfig := TCnRS232Config.Create;
  FTimeouts := TCnRS232Timeouts.Create;

  //是否应该删除下面两行呢?
  WriteCommConfig;
  WriteCommTimeouts;

end;

不知道是不是我的调用方法不正确,如果不删除这两行,用下面的代码时,设置界面显示的是缺省值:


  CnRS232.CommName := 'COM1';
  CnRS232.ReadFromIni('.\CommPort.ini', CnRS232.CommName);
  CnRS232Dialog.CommConfig := CnRS232.CommConfig;
  CnRS232Dialog.Timeouts := CnRS232.Timeouts;
  if CnRS232Dialog.Execute then
  begin
    CnRS232.CommConfig := CnRS232Dialog.CommConfig;
    CnRS232.Timeouts := CnRS232Dialog.Timeouts;
  end;
  CnRS232.WriteToIni('.\CommPort.ini', CnRS232.CommName);





Life lies in Z-turn.
Top
 




All times are GMT++8, the time now is 2024-11-22 13:32

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008411 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP