Advertisement
mkv

foonip.exe

mkv
Sep 13th, 2011
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.13 KB | None | 0 0
  1. string[] s = System.Diagnostics.Process.GetProcessesByName("foobar2000")[0].MainWindowTitle.Split((char)0x266b);
  2. string[] t = { "Circle", "Album", "Artist", "Title", "Time" };
  3. int[] cn = { 14, 15, 11, 9, 8, 4, 6 };
  4. string[] c = new string[cn.Length];
  5. for (int a = 0; a < c.Length; a++)
  6.     c[a] = (char)3 + cn[a].ToString("D2");
  7. for (int a = 0; a < t.Length; a++)
  8.     if (t[a].Length > s[a].Length)
  9.         t[a] = t[a].Substring(0, s[a].Length);
  10.     else t[a] += c[0] + new string('═', s[a].Length - t[a].Length);
  11.  
  12. string str =
  13.     c[0] + "╔═" + c[1] + t[0] + c[0] + "═╦═" + c[1] + t[1] + c[0] + "═╦═" + c[1] + t[2] + c[0] + "═╦═" + c[1] + t[3] + c[0] + "═╦═" + c[1] + t[4] + c[0] + "═╗\n" +
  14.     c[0] + "║ " + c[2] + s[0] + c[0] + " ║ " + c[3] + s[1] + c[0] + " ║ " + c[4] + s[2] + c[0] + " ║ " + c[5] + s[3] + c[0] + " ║ " + c[6] + s[4] + c[0] + " ║\n" +
  15.     c[0] + "╚" +
  16.     new string('═', s[0].Length + 2) + '╩' +
  17.     new string('═', s[1].Length + 2) + '╩' +
  18.     new string('═', s[2].Length + 2) + '╩' +
  19.     new string('═', s[3].Length + 2) + '╩' +
  20.     new string('═', s[4].Length + 2) + "╝";
  21.  
  22. string last = str.Substring(str.LastIndexOf('\n') + 1);
  23. string foot = ",5T,4h,7i,8s ,9g,11l,10o,12r,13i,6o,5u,4s ,7/,8n,9p ,11b,10r,12o,13u,6g,5h,4t ,7t,8o ,9y,11o,10u ,12b,13y ,6a ,5s,4u,7b,8s,9i,11d,10i,12a,13r,6y ,5o,4f ,7#,8/,9G,11/,10T,12V,13 ,6E,5N,4T,7E,8R,9P,11R,10I,12S,13E,6S";
  24. string foots = "This glorious /np brought to you by a subsidiary of #/G/TV ENTERPRISES";
  25. foot = foot.Replace(',', (char)3) + c[0];
  26. if (foots.Length + 4 > last.Length - 3) {
  27.     str += "\n" + foot;
  28. } else {
  29.     int i = str.Length - (foots.Length + 4);
  30.     string bu = str.Substring(i + 1);
  31.     bool fork = str[i] == '╩';
  32.     str = str.Substring(0, i);
  33.     str += fork ? '╬' : '╦';
  34.     str += bu.Substring(0, bu.Length - 1) + "╣\n";
  35.     string pad = c[0] + new string(' ', last.Length - 4 - bu.Length);
  36.     str += pad + "║ " + foot + " ║\n";
  37.     str += pad + "╚═" + new string('═',foots.Length) + "═╝";
  38. }
  39. Application.DoEvents();
  40. Clipboard.Clear();
  41. Application.DoEvents();
  42. Clipboard.SetText(str + "\n");
  43. Application.DoEvents();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement