protected override void OnApplyTemplate() { LayoutRoot = GetTemplateChild(nameof(LayoutRoot)) as AspectView; Texture = GetTemplateChild(nameof(Texture)) as Image; Overlay = GetTemplateChild(nameof(Overlay)) as Border; Subtitle = GetTemplateChild(nameof(Subtitle)) as TextBlock; Button = GetTemplateChild(nameof(Button)) as FileButton; Timer = GetTemplateChild(nameof(Timer)) as SelfDestructTimer; Button.Click += Button_Click; _templateApplied = true; if (_message != null) { UpdateMessage(_message); } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_TimeLeft = reader.ReadInt(); m_ShowTimeLeft = reader.ReadBool(); m_Running = reader.ReadBool(); if ( m_Running ) { if ( m_TimeLeft <= 0 ) Delete(); else { m_Timer = new SelfDestructTimer( this ); } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_TimeLeft = reader.ReadInt(); m_ShowTimeLeft = reader.ReadBool(); m_Running = reader.ReadBool(); if (m_Running) { if (m_TimeLeft <= 0) { Delete(); } else { m_Timer = new SelfDestructTimer(this); } } }