Exemplo n.º 1
0
 internal static void RequestWarrant(CaseData data)
 {
     GameFiber.StartNew(delegate
     {
         "Requesting warrant".AddLog();
         data.WarrantApprovedDate = TimeCheckObject.RandomTimeCreator().ToLocalTime();
         Evid_War_TimeChecker.AddObject(new TimeCheckObject(TimeCheckObject.Type.Warrant, "Warrant", data.WarrantApprovedDate));
         "Warrant submitted".AddLog();
         data.WarrantSubmitted = true;
         LtFlash.Common.Serialization.Serializer.SaveItemToXML(data, Main.CDataPath);
     });
 }
Exemplo n.º 2
0
        private void StartCountdown()
        {
            lab_return_but.Hide();

            _sw.Start();
            GameFiber.StartNew(delegate
            {
                var txt = 0f;
                for (var i = 0f; i < 1f; i = i + MathHelper.GetRandomSingle(0.01f, 0.10f))
                {
                    lab_progress_bar.Value = i;

                    var remainder = IsDivisibleByFour(txt);
                    var text      = "Sending Request";
                    if (remainder == 0.25f)
                    {
                        text = "Sending Request.";
                    }
                    else if (remainder == 0.50f)
                    {
                        text = "Sending Request..";
                    }
                    else if (remainder == 0.75f)
                    {
                        text = "Sending Request...";
                    }

                    lab_sending_lbl.Text = text;
                    txt++;

                    GameFiber.Sleep(MathHelper.GetRandomInteger(0500, 1000));
                }
                lab_progress_bar.Hide();
                lab_progress_bar.Value = 1f;

                foreach (var data in _eList)
                {
                    if (!data.Collected)
                    {
                        continue;
                    }
                    data.TestingFinishTime = TimeCheckObject.RandomTimeCreator().ToLocalTime();
                    Evid_War_TimeChecker.AddObject(new TimeCheckObject(TimeCheckObject.Type.Evidence, data.Name, data.TestingFinishTime));
                }

                Serializer.SaveItemToXML <List <EvidenceData> >(_eList, Main.EDataPath);

                lab_sending_lbl.Text = "Request Sent!";
                _sw.Stop();
                lab_return_but.Show();
            });
        }