コード例 #1
0
 private void ActionResult(string result)
 {
     LblAction.Text    = result;
     LblAction.Visible = true;
     ActionTimer.Start();
     RefreshEnabledButtons();
 }
コード例 #2
0
        public void AddDelayedAction(Action action, float deltaTimeSeconds)
        {
            var actionTimer = new ActionTimer(action, deltaTimeSeconds);

            actionTimer.Start();
            _activeTimers.Add(actionTimer);
        }
コード例 #3
0
        public static void Test(string input)
        {
            int minuteDelay = 10;

            WorldServer.Instance.OnClients(x => x.Character.Notification("Pour des raisons de maintenance, le serveur va être redémarré dans " + minuteDelay + " minutes. Merci de votre compréhension."));

            ActionTimer action = new ActionTimer((minuteDelay * 60000) / 2,
                                                 new Action(() => {
                WorldServer.Instance.OnClients(x => x.Character.Notification("Pour des raisons de maintenance, le serveur va être redémarré dans "
                                                                             + minuteDelay / 2
                                                                             + " minutes. Merci de votre compréhension."));
            }),
                                                 false);

            action.Start();


            action = new ActionTimer(minuteDelay * 60000,
                                     new Action(() => {
                SaveTask.Save();
                Environment.Exit(0);
            }),
                                     false);

            action.Start();
        }
コード例 #4
0
 void OnUsedCallback_Elapsed(object sender, ElapsedEventArgs e)
 {
     OnUsedCallback.Dispose();
     Character.Client.Send(new InteractiveUseEndedMessage((uint)Record.ElementId, Skill.Id));
     this.Collect();
     UpdateState(StatedElementStatesType.Unactive);
     GrowCallback.Start();
 }
コード例 #5
0
 public ChatFormBob(BridgeForm bf)
 {
     InitializeComponent();
     Bridge = bf;
     ActionTimer.Start();
     DecryptBtn.Enabled = false;
     EncryptBtn.Enabled = false;
 }
コード例 #6
0
    public void Down(PointerEventData eventData)
    {
        IsActive = true;
        SwiperTimer.Reset();
        SwiperTimer.Start();
        currentPointerID = eventData.pointerId;

        currPos       =
            lastPos   =
                start = GetCurrentPointerPosition();
    }
コード例 #7
0
    // Use this for initialization
    void Start()
    {
        if (DestoryObject)
        {
            timer = new ActionTimer(TimeToExpire, ExpireSelf);
        }
        else
        {
            timer = new ActionTimer(TimeToExpire, DisableSelf);
        }

        timer.Reset();
        timer.Start();
    }
コード例 #8
0
        private void InitializeDrawElements()
        {
            var itemDescriptor = GuiSystem.GetSkinItemDescriptor <TextBoxSkinItemDescriptor>();

            _border = new NinePatchSprite(itemDescriptor.SkinTexture, itemDescriptor.NormalRectangle, itemDescriptor.Border);

            _spriteText = new SpriteText(itemDescriptor.NormalFont);
            _spriteText.HorizontalAlignment = HorizontalAlignment.Left;

            _cursorAnimatorTimer = new ActionTimer(OnCursorAnimateTick, 0.5f, true);
            _cursorAnimatorTimer.Start();

            _inputController = new StringInputController(InputType.AlphaNumeric);
        }
コード例 #9
0
 public ChatFormAlice(BridgeForm bf)
 {
     InitializeComponent();
     primeNumbers = new List <int> {
         367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
         439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,
         509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593,
         599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
         661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743,
         751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827,
         829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911
     };
     ActionTimer.Start();
     Bridge             = bf;
     DecryptBtn.Enabled = false;
     EncryptBtn.Enabled = false;
 }
コード例 #10
0
            public MemoryCell(Random rSeed, Context.SEAContext.DoHandler doCallback, ref StringBuilder key)
            {
                id   = MyId.NewId(rSeed.Next());
                cell = new StringBuilder(CELL_LENGHT, CELL_LENGHT);
                id.AppendTo(ref key);
                id.AppendTo(ref cell);
                cell.Append(FLAG_VOID);
                id.AppendTo(ref cell);

                cell.Length    = CELL_LENGHT;
                this.doCommand = doCallback;

                reader = new Reader();
                writer = new Writer();

                listener = new ActionTimer();
                listener.Start(Translate);
            }
コード例 #11
0
        public static void Fight() // ajout de la notification delai avec le timer
        {
            var guilds = GuildArenaRecord.GuildsArena.Take(GuildArenaRecord.GuildsArena.Count / 2);

            foreach (var guild in guilds.ToArray())
            {
                var clients = WorldServer.Instance.GetOnlineClients().FindAll(x => x.Character.Guild.Id == guild.FirstGuildId || x.Character.Guild.Id == guild.SecondGuildId);

                foreach (var client in clients)
                {
                    client.SendRaw(RawDataManager.GetRawData("gvgtimer"));
                }
                guild.RemoveElement();
            }

            ActionTimer timer = new ActionTimer(MINUTES_BEFORE_GVG_START * 60000, StartFighting, false);

            timer.Start();
        }
コード例 #12
0
 public static void CheckTheDay()
 {
     if (IsFightDay)
     {
         foreach (var fightTime in FIGHT_TIMES)
         {
             if (DateTime.Now.Hour <= fightTime.Hour && DateTime.Now.Minute <= fightTime.Minutes)
             {
                 DateTime    fightDateTime = DateTime.Today.AddHours(fightTime.Hour).AddMinutes(fightTime.Minutes);
                 var         delay         = (DateTime.Now - fightDateTime);
                 ActionTimer timer         = new ActionTimer((int)-delay.TotalMilliseconds, Fight, false);
                 timer.Start();
             }
         }
     }
     if (SortNeeded)
     {
         Sort();
     }
 }
コード例 #13
0
        public void StartTransition()
        {
            var from = GetScreenByName(TransitioningOut);
            var to   = GetScreenByName(TransitioningIn);

            TransitionTimer.TimeLimit = TransitionDuration;
            TransitionTimer.Reset();
            TransitionTimer.Start();

            //to.rotation = Quaternion.identity;
            to.gameObject.SetActive(true);

            toStart             = CurrentTransitionIsBack ? new Vector2(-Screen.width, 0) : new Vector2(Screen.width, 0);
            toEnd               = new Vector2(0, 0);
            to.anchoredPosition = toStart;

            toRotate   = CurrentTransitionIsBack ? rotateLeft : rotateRight;
            fromRotate = !CurrentTransitionIsBack ? rotateLeft : rotateRight;

            fromStart = new Vector2(0, 0);
            fromEnd   = CurrentTransitionIsBack ? new Vector2(Screen.width, 0) : new Vector2(-Screen.width, 0);
        }
コード例 #14
0
        private void SetupTimer()
        {
            if (ActionTimer == null)
            {
                ActionTimer = new DispatcherTimer {
                    Interval = TimeSpan.FromMilliseconds(150)
                };
                ActionTimer.Tick += ActionTimer_Tick;
            }

            ActionTimer.Start();


            if (CaptionTimer == null)
            {
                CaptionTimer = new DispatcherTimer {
                    Interval = TimeSpan.FromMilliseconds(250)
                };
                CaptionTimer.Tick += CaptionTimer_Tick;
            }

            CaptionTimer.Start();
        }
コード例 #15
0
        private static bool GiftXPModifier(Character character, SubareaRecord subarea, int hours)
        {
            if (character.Map.SubArea.ExperienceRate >= 20)
            {
                character.Reply("L'experience de la zone est déja a son maximum!");

                return(false);
            }

            int    rate = character.Map.SubArea.ExperienceRate;
            string msg  = string.Format("Le multiplicateur d'experience de la zone {0} passe de x{1} a x{2} pendant {3}h !  merci a {4}!", character.Map.SubArea.Name, rate, rate + 1, hours, character.Name);

            WorldServer.Instance.OnClients(x => x.Character.Notification(msg));
            character.Map.SubArea.ExperienceRate += 1;
            character.UpdateServerExperience(character.Map.SubArea.ExperienceRate);

            MapRecord map = character.Map;

            ActionTimer timer = new ActionTimer(3600000 * hours, new Action(() => { map.SubArea.ExperienceRate -= 1; }), false);

            timer.Start();

            return(true);
        }
コード例 #16
0
ファイル: WaitTask.cs プロジェクト: trommlbomml/bombrush
 public void Start()
 {
     _timer.Start();
 }
コード例 #17
0
ファイル: KeepAliveModule.cs プロジェクト: nikes/Link
 private void OnOnlineAnnounce(object sender, PacketEventArgs e)
 {
     Timer.Start(0, 10000);
 }
コード例 #18
0
 public void Start()
 {
     OnBeforeStart();
     SetActionTimerInterval();
     ActionTimer.Start();
 }
コード例 #19
0
 public void Start()
 {
     actionTimer.Start();
 }
コード例 #20
0
        //  [StartupInvoke("Notification Module", StartupInvokePriority.Modules)]
        public static void Initialize()
        {
            ActionTimer timer = new ActionTimer(Interval * 1000 * 60, DisplayNotif, true);

            timer.Start();
        }