private void _admin_UpdatePack(CustomSpecialPack pack)
        {
            _pack = pack;
            SpecialPack_Item.Initialize("Offre spéciale !", pack.Price + " PP", "specialpack", pack.Infos.Replace("\\n", Environment.NewLine));
            SpecialPack_Item.Visibility = Visibility.Visible;

            SpecialPack_Item.btn_purchase.MouseLeftButtonDown += Btn_purchase_MouseLeftButtonDown;
        }
Exemplo n.º 2
0
        public CustomSpecialPackWindow(CustomSpecialPack pack)
        {
            InitializeComponent();
            LoadStyle();

            _pack = pack;
            LoadCustom();

            _interval = (pack.EndTime - DateTime.Now);
            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval   = TimeSpan.FromSeconds(1);
            timer.IsEnabled  = true;
            timer.Tick      += Timer_Tick;
            lbl_time.Content = string.Format("{0}h{1}m{2}s", _interval.Hours + 24 * _interval.Days, _interval.Minutes, _interval.Seconds);

            this.btn_buy.MouseLeftButtonDown += Btn_buy_MouseLeftButtonDown;

            this.MouseDown += Window_MouseDown;
        }
 private void Client_UpdateSpecialPack(CustomSpecialPack pack)
 {
     UpdatePack?.Invoke(pack);
 }