Ejemplo n.º 1
0
        internal void instances_callback(int code)
        {
            switch (code)
            {
            case 283:
                if (Settings.TrackerEnabled && Settings.AutoTracker && mainForm.TrackerFormLoaded)
                {
                    mainForm.TrackerForm.new_tracker(1);
                }
                return;

            case 581:
                if (Settings.TrackerEnabled && Settings.AutoTracker && mainForm.TrackerFormLoaded)
                {
                    mainForm.TrackerForm.new_tracker(2);
                }
                return;

            case 598:
                if (Settings.TrackerEnabled && Settings.AutoTracker && mainForm.TrackerFormLoaded)
                {
                    mainForm.TrackerForm.new_tracker(3);
                }
                return;

            case 639:
                if (Settings.TrackerEnabled && Settings.AutoTracker && mainForm.TrackerFormLoaded)
                {
                    mainForm.TrackerForm.new_tracker(4);
                }
                return;

            default:
                break;
            }
            if (isRoulette && Settings.RouletteTips)
            {
                Task.Factory.StartNew(() =>
                {
                    var instance = Data.GetInstance(code);
                    var roulette = Data.GetRoulette(queueCode);
                    if (instance.Tips != null)
                    {
                        mainForm.Show_DutyTips(roulette.Name, instance.Name, instance.Tips, instance.Macro);
                    }
                    else if (instance.Macro != null)
                    {
                        var respond = LMessageBox.Dialog($"已通过[{roulette.Name}]进入<{instance.Name}>副本区域,是否复制该副本可用的宏?", $"DFA:<{instance.Name}> 简易攻略", MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
                        if (respond == DialogResult.Yes)
                        {
                            this.Invoke(() => { Clipboard.SetDataObject(instance.Macro, true); });
                        }
                    }
                });
            }
        }
Ejemplo n.º 2
0
 internal void instances_callback(int code)
 {
     if (Settings.copyMacro)
     {
         Task.Factory.StartNew(() =>
         {
             var instance = Data.GetInstance(code);
             if (instance.Macro != null)
             {
                 var respond = LMessageBox.Dialog(Localization.GetText("ui-settings-copymacro-dialog-text", instance.Name), Localization.GetText("ui-settings-copymacro-dialog-title"), MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
                 if (respond == DialogResult.Yes)
                 {
                     this.Invoke(() => { Clipboard.SetDataObject(instance.Macro, true); });
                 }
             }
         });
     }
 }