Esempio n. 1
0
        /*
         * private PictureBox ReturnDebuff(int i)
         * {
         *  if (i > 12) return null;
         *
         *  switch (i)
         *  {
         *      case 1:
         *          return pB_debuff_1;
         *      case 2:
         *          return pB_debuff_2;
         *      case 3:
         *          return pB_debuff_3;
         *      case 4:
         *          return pB_debuff_4;
         *      case 5:
         *          return pB_debuff_5;
         *      case 6:
         *          return pB_debuff_6;
         *      case 7:
         *          return pB_debuff_7;
         *      case 8:
         *          return pB_debuff_8;
         *      case 9:
         *          return pB_debuff_9;
         *      case 10:
         *          return pB_debuff_10;
         *      case 11:
         *          return pB_debuff_11;
         *      case 12:
         *          return pB_debuff_12;
         *      default:
         *          return null;
         *  }
         * }
         */

        private void ProcessET()
        {
            if (!IsActive)
            {
                return;
            }

            var _et        = FFXIVHelpers.FetchEorzeaTime();
            var eorzeatime = @"ET " + _et.ToString("hh:mm");

            if (lbl_et.Disposing)
            {
                return;
            }
            if (!IsHandleCreated)
            {
                return;
            }

            try
            {
                if (InvokeRequired)
                {
                    lbl_et.Invoke((System.Action) delegate { lbl_et.Text = eorzeatime; });
                }
                else
                {
                    lbl_et.Text = eorzeatime;
                }
            }
            catch (InvalidOperationException ex)
            {
                if (IsHandleCreated)
                {
                    throw;
                }
                Console.WriteLine(ex.InnerException);
            }
        }
Esempio n. 2
0
        protected override void OnDataUpdate(object sender, EventArgs e)
        {
            if (!IsActive)
            {
                return;
            }

            var _et        = FFXIVHelpers.FetchEorzeaTime();
            var eorzeatime = _et.ToString("hh:mm tt");

            if (lbl_et_test.Disposing)
            {
                return;
            }
            if (!IsHandleCreated)
            {
                return;
            }

            try
            {
                if (InvokeRequired)
                {
                    lbl_et_test.Invoke((Action) delegate { lbl_et_test.Text = eorzeatime; });
                }
                else
                {
                    lbl_et_test.Text = eorzeatime;
                }
            }
            catch (InvalidOperationException ex)
            {
                if (IsHandleCreated)
                {
                    throw;
                }
                Console.WriteLine(ex.InnerException);
            }
        }