using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using ff14bot.AClasses;
using ff14bot.Helpers;

namespace QuestDev
{

    public class QuestDevTools : BotPlugin
    {
        public override void Pulse()
        {

        }

        public override void Dispose()
        {
            Logging.Write("Disposing of QuestDevTools");
            if (Dialog != null)
            {
                Dialog.Close();
                Dialog = null;
            }
        }

        public override string Author
        {
            get { return "Mastahg"; }
        }

        public override Version Version
        {
            get { return new Version(0, 0, 1); }
        }

        public override string Name
        {
            get { return "QuestDevTools"; }
        }

        public override void OnShutdown()
        {
            if (Dialog != null)
            {
                Dialog.Invoke((MethodInvoker)delegate() { Dialog.Close(); });
                Dialog = null;
            }
        }

        private Form1 Dialog;

        public override void OnEnabled()
        {
            if (Dialog == null || Dialog.IsDisposed)
            {
                Dialog = new Form1();
            }
            Dialog.Show();
        }
    }

}
