Paste() 공개 정적인 메소드

public static Paste ( string text ) : void
text string
리턴 void
예제 #1
0
 private static void hook_KeyPressed(object sender, KeyPressedEventArgs e)
 {
     if (e.Key == BasicTeraData.Instance.HotkeysData.Paste.Key &&
         e.Modifier == BasicTeraData.Instance.HotkeysData.Paste.Value)
     {
         var text        = Clipboard.GetText();
         var pasteThread = new Thread(() => CopyPaste.Paste(text));
         pasteThread.Start();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.Reset.Key &&
              e.Modifier == BasicTeraData.Instance.HotkeysData.Reset.Value)
     {
         //Can't call directly NetworkController.Instance.Reset() => threading problem
         NetworkController.Instance.NeedToReset = true;
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ResetCurrent.Key &&
              e.Modifier == BasicTeraData.Instance.HotkeysData.ResetCurrent.Value)
     {
         //Can't call directly NetworkController.Instance.ResetCurrent() => threading problem
         NetworkController.Instance.NeedToResetCurrent = true;
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ClickThrou.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.ClickThrou.Value)
     {
         NetworkController.Instance.SwitchClickThrou();
     }
     foreach (
         var copy in
         BasicTeraData.Instance.HotkeysData.Copy.Where(
             copy => e.Key == copy.Key && e.Modifier == copy.Modifier))
     {
         //Can't copy directly, => threading problem
         NetworkController.Instance.NeedToCopy = copy;
     }
 }
예제 #2
0
 public static void CopyThread(StatsSummary stats, Skills skills, AbnormalityStorage abnormals,
                               bool timedEncounter, CopyKey copy)
 {
     if (BasicTeraData.Instance.HotDotDatabase == null)
     {
         return;                                               //no database loaded yet => no need to do anything
     }
     lock (_pasteLock)
     {
         var text = CopyPaste.Copy(stats, skills, abnormals, timedEncounter, copy);
         for (var i = 0; i < 3; i++)
         {
             try
             {
                 Clipboard.SetText(text.Item2);
                 break;
             }
             catch
             {
                 Thread.Sleep(100);
                 //Ignore
             }
         }
         CopyPaste.Paste(text.Item1);
     }
 }
예제 #3
0
 private static void hook_KeyPressed(object sender, KeyPressedEventArgs e)
 {
     if (e.Key == BasicTeraData.Instance.HotkeysData.Topmost.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.Topmost.Modifier)
     {
         Debug.WriteLine("Calling switch topmost");
         Instance.SwitchTopMost?.Invoke();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.Paste.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.Paste.Modifier)
     {
         var text        = Clipboard.GetText();
         var pasteThread = new Thread(() => CopyPaste.Paste(text));
         pasteThread.Start();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.Reset.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.Reset.Modifier)
     {
         //Can't call directly NetworkController.Instance.Reset() => threading problem
         PacketProcessor.Instance.NeedToReset = true;
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ResetCurrent.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.ResetCurrent.Modifier)
     {
         //Can't call directly NetworkController.Instance.ResetCurrent() => threading problem
         PacketProcessor.Instance.NeedToResetCurrent = true;
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ExcelSave.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.ExcelSave.Modifier)
     {
         //Can't call directly Export => threading problem
         PacketProcessor.Instance.NeedToExport = DataExporter.Dest.Excel | DataExporter.Dest.Manual;
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ClickThrou.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.ClickThrou.Modifier)
     {
         PacketProcessor.Instance.SwitchClickThrou();
     }
     foreach (var copy in BasicTeraData.Instance.HotkeysData.Copy.Where(copy => e.Key == copy.Hotkey.Key && e.Modifier == copy.Hotkey.Modifier))
     //Can't copy directly, => threading problem
     {
         PacketProcessor.Instance.NeedToCopy = copy;
     }
 }
예제 #4
0
 private static void hook_KeyPressed(object sender, KeyPressedEventArgs e)
 {
     if (e.Key == BasicTeraData.Instance.HotkeysData.Paste.Key &&
         e.Modifier == BasicTeraData.Instance.HotkeysData.Paste.Value)
     {
         var text        = Clipboard.GetText();
         var pasteThread = new Thread(() => CopyPaste.Paste(text));
         pasteThread.Start();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.Reset.Key &&
              e.Modifier == BasicTeraData.Instance.HotkeysData.Reset.Value)
     {
         NetworkController.Instance.Reset();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ResetCurrent.Key &&
              e.Modifier == BasicTeraData.Instance.HotkeysData.ResetCurrent.Value)
     {
         NetworkController.Instance.ResetCurrent();
     }
     else if (e.Key == BasicTeraData.Instance.HotkeysData.ClickThrou.Key && e.Modifier == BasicTeraData.Instance.HotkeysData.ClickThrou.Value)
     {
         NetworkController.Instance.SwitchClickThrou();
     }
     foreach (
         var copy in
         BasicTeraData.Instance.HotkeysData.Copy.Where(
             copy => e.Key == copy.Key && e.Modifier == copy.Modifier))
     {
         CopyPaste.Copy(DamageTracker.Instance.GetPlayerStats(), DamageTracker.Instance.TotalDamage,
                        DamageTracker.Instance.Interval, copy.Header, copy.Content, copy.Footer, copy.OrderBy,
                        copy.Order);
         var text        = Clipboard.GetText();
         var pasteThread = new Thread(() => CopyPaste.Paste(text));
         pasteThread.Start();
     }
 }
예제 #5
0
        public static void CopyThread(EntityInfo info, List <PlayerInfo> stats, AbnormalityStorage abnormals, long total, long partyDps, long firstHit, long lastHit, Entity currentBoss, bool timedEncounter, CopyKey copy)
        {
            var text = CopyPaste.Copy(info, stats, abnormals, total, partyDps, firstHit, lastHit, currentBoss, timedEncounter, copy.Header, copy.Content, copy.Footer, copy.OrderBy, copy.Order);

            CopyPaste.Paste(text);
        }