/// <summary> /// Executable Caller /// </summary> /// <param name="args">Arguments</param> private static void Main(string[] args) { // .Loader sends empty args if (args != null) { // On Game Load CustomEvents.Game.OnGameLoad += eventArgs => { // If champion name does not equals Karma (class name) if (!ObjectManager.Player.ChampionName.Equals((typeof(Karma)).Name)) { return; } // Construct Karma var exec = new Karma(ObjectManager.Player); // Construct Menu Instances.Menu = exec.Menu(); // Add Menu to Main Menu Instances.Menu.AddToMainMenu(); }; } }
private static void OnLoad() { if (ObjectManager.GetLocalPlayer().ChampionName == "Karma") { Console.WriteLine("Karma Loaded."); var Karma = new Karma(); } }
public KarmaTrackInfo(KarmaLib.Song song, string mount) { string fidstr = String.Format("{0:x8}", song.Id); Uri = new SafeUri(String.Format("file://{0}/fids0/_{1}/{2}", mount, fidstr.Substring(0,5), fidstr.Substring(5))); karma_id = song.Id; AlbumTitle = song.Album; ArtistName = song.Artist; TrackTitle = song.Title; Genre = song.Genre; Duration = new TimeSpan(song.Duration * 1000L); PlayCount = (int) song.PlayCount; LastPlayed = song.LastPlayed; TrackCount = 0; TrackNumber = (int) song.TrackNumber; Year = song.Year; }
/// <summary> /// Executable Caller /// </summary> /// <param name="args">Arguments</param> private static void Main(string[] args) { // .Loader sends empty args if (args != null) { // On Game Load CustomEvents.Game.OnGameLoad += eventArgs => { // Construct Karma var exec = new Karma(ObjectManager.Player); // Construct Menu Instances.Menu = exec.Menu(); // Add Menu to Main Menu Instances.Menu.AddToMainMenu(); }; } }
private void OnFileUploaded(KarmaLib.Song song) { KarmaTrackInfo karma_track = new KarmaTrackInfo(song, mount_point); karma_track.PrimarySource = this; karma_track.Save(false); track_map[karma_track.TrackId] = karma_track; }