123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "FrmEmptyCameraF.h"
- #include "AppGlobalF.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma link "cxContainer"
- #pragma link "cxControls"
- #pragma link "cxEdit"
- #pragma link "cxGraphics"
- #pragma link "cxLabel"
- #pragma link "cxLookAndFeelPainters"
- #pragma link "cxLookAndFeels"
- #pragma link "dxSkinsCore"
- #pragma link "dxSkinBlack"
- #pragma link "dxSkinBlue"
- #pragma resource "*.dfm"
- TFrmEmptyCamera *FrmEmptyCamera = NULL;
- //---------------------------------------------------------------------------
- __fastcall TFrmEmptyCamera::TFrmEmptyCamera(TComponent* Owner, TXCctv *ACctv, bool AAutoPlay)
- : TForm(Owner)
- {
- FPlay = false;
- FAutoPlay = AAutoPlay;
- FConHandle = 0;
- FInstalled = false;
- InitCamera(ACctv, FAutoPlay);
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::Connect()
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::Disconnect()
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::CameraRelease()
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::InitCamera(TXCctv *ACctv, bool AAutoPlay/*=true*/)
- {
- FAutoPlay = AAutoPlay;
- if (!ACctv)
- {
- FId = "";
- FGroup = "";
- FName = "-Empty-";
- FStreamingType = "";
- FViewAddress = "";
- FFullAddress = "";
- PnlCamera->Caption = "-Empty-";
- DisplayName(" ");
- FInstalled = false;
- try
- {
- String sImageFile = ExtractFilePath(Application->ExeName) + "\\image\\vmscam.bmp";
- ImgNoData->Picture->LoadFromFile(sImageFile);
- ImgNoData->Align = alClient;
- ImgNoData->Visible = true;
- DisplayName("-Empty-");
- //PnlName->Visible = false;
- }
- catch(Exception &e)
- {
- // ImgNoData->Visible = false;
- }
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::DisplayName(String AName)
- {
- PnlName->Caption = " " + FName;
- PnlName->Visible = true;
- PnlName->Refresh();
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::TmrPlayTimer(TObject *Sender)
- {
- TmrStop->Enabled = false;
- TmrPlay->Enabled = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TFrmEmptyCamera::TmrStopTimer(TObject *Sender)
- {
- TmrPlay->Enabled = false;
- TmrStop->Enabled = false;
- }
- //---------------------------------------------------------------------------
|