void
| Ortam | Kullanılabilirlik |
|---|---|
| Engineering Studio | Kullanılmaz |
| Service Engine | Kullanılabilir |
| VBA | Kullanılabilir |
| VSTA | Kullanılabilir |
C#
private IDynPicture _zenonPicture;
private IElement _zenonElement;
void ThisProject_Active()
{
//Initialize the instance variable with the screen of name "Start"
_zenonPicture = this.DynPictures().Item("Start");
//Attach the event handler
_zenonPicture.Timer += new TimerEventHandler(_zenonPicture_Timer);
}
void _zenonPicture_Timer()
{
//This event is executed cyclicly, depending on the projects flash frequency
//Here it is used to animate a sample object in a very simple way
//NOTE: Refreshing an element too often might cause screen flickering, this
// is just for demonstration purposes.
_zenonElement = _zenonPicture.Elements().Item("test_object");
_zenonElement.BackColor = _zenonElement.BackColor - 1;
_zenonElement.Update();
}
void ThisProject_Inactive()
{
//Detach the event handler
_zenonPicture.Timer -= new TimerEventHandler(_zenonPicture_Timer);
FreeObjects();
}
VB.NET
Private _zenonPicture As IDynPicture
Private _zenonElement As IElement
Private Sub ThisProject_Active()
'Initialize the instance variable with the screen of name "Start"
_zenonPicture = Me.DynPictures().Item("Start")
'Attach the event handler
AddHandler _zenonPicture.Timer, AddressOf _zenonPicture_Timer
End Sub
Private Sub _zenonPicture_Timer()
'This event is executed cyclicly, depending on the projects flash frequency
'Here it is used to animate a sample object in a very simple way
'NOTE: Refreshing an element too often might cause screen flickering, this
' is just for demonstration purposes.
_zenonElement = _zenonPicture.Elements().Item("test_object")
_zenonElement.BackColor = _zenonElement.BackColor - 1
_zenonElement.Update()
End Sub
Private Sub ThisProject_Inactive()
'Detach the event handler
RemoveHandler _zenonPicture.Timer, AddressOf _zenonPicture_Timer
FreeObjects()
End SubBu konuda sorunuz mu var?SGE AI bu sayfaya ve ilgili yardım konularına dayanarak yanıtlar.
Bu sayfa, COPA-DATA zenon 16 çevrimiçi yardımının Türkçe çevirisidir. Menü ve ayar adları, programdaki gibi bulmanız için İngilizce bırakılmıştır.