示例#1
0
        private void GroupMembersByGroupID64()
        {
            string result = General.Prompt.ShowDialog("Enter GroupName:", "Lookup Steam Group Members", false, null);

            if (result != null && result != string.Empty)
            {
                List <long> iDs = SteamIntegration.GetGroupMembers(result);

                StringBuilder sb = new StringBuilder();

                sb.Append("Results for lookup of membership of Steam Group:  " + result);
                sb.Append(Environment.NewLine);
                sb.Append(Environment.NewLine);

                foreach (long iD in iDs)
                {
                    sb.Append("Player SteamID64: " + iD.ToString() + " "
                              + SteamIntegration.GetPlayerName(iD) + Environment.NewLine);
                }

                sb.Append(Environment.NewLine);
                sb.Append(string.Format("Group contains {0} member(s).", iDs.Count));
                sb.Append(Environment.NewLine);

                MessageBox.Show(sb.ToString());
            }
        }
示例#2
0
        private void PlayerNameBySteamID64()
        {
            string result = General.Prompt.ShowDialog("Enter SteamID64:", "Lookup Steam Player Name", false, null);

            if (result != null && result != string.Empty)
            {
                MessageBox.Show(SteamIntegration.GetPlayerName(Convert.ToInt64(result)), "Result");
            }
        }
示例#3
0
        private void GroupID64ByGroupName()
        {
            string groupName = General.Prompt.ShowDialog("Enter GroupName:", "Lookup Steam GroupID64", false, null);

            if (groupName != null && groupName != string.Empty)
            {
                long?result = SteamIntegration.GetGroupID(groupName);
                MessageBox.Show((result != null ? result.ToString() : "No result."), "GroupID64:");
            }
        }
示例#4
0
        private void LoadProfiles()
        {
            var profile = new LaunchpadProfile
            {
                Name           = "Default profile",
                Id             = 0,
                LaunchpadCoord = new LaunchpadCoord(8, 7)
            };

            profile.AddButton(new ClickableButton
            {
                Name          = "Exit",
                X             = 0,
                Y             = 0,
                Color         = Color.DarkRed,
                ClickCallback = () =>
                {
                    Environment.Exit(0);
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "YouTube",
                X             = 0,
                Y             = 7,
                Color         = Color.Red,
                ClickCallback = () =>
                {
                    ApplicationIntegration.OpenWeb("https://youtube.com");
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "Twitter",
                X             = 1,
                Y             = 7,
                Color         = Color.MediumBlue,
                ClickCallback = () =>
                {
                    ApplicationIntegration.OpenWeb("https://twitter.com");
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "Calc",
                X             = 0,
                Y             = 6,
                Color         = Color.Beige,
                ClickCallback = () =>
                {
                    ApplicationIntegration.StartApp("calc.exe");
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "Minecraft",
                X             = 0,
                Y             = 4,
                Color         = Color.Green,
                ClickCallback = () =>
                {
                    ApplicationIntegration.StartApp(@"C:\Program Files (x86)\Minecraft Launcher\MinecraftLauncher.exe");
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "CS:GO",
                X             = 1,
                Y             = 4,
                Color         = Color.Yellow,
                ClickCallback = () =>
                {
                    SteamIntegration.StartApp(730);
                }
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "MusicPrev",
                X             = 5,
                Y             = 1,
                Color         = Color.LawnGreen,
                ClickCallback = MediaIntegration.Prev
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "MusicNext",
                X             = 6,
                Y             = 1,
                Color         = Color.LimeGreen,
                ClickCallback = MediaIntegration.Next
            });

            profile.AddButton(new ClickableButton
            {
                Name          = "MusicStop",
                X             = 7,
                Y             = 1,
                Color         = Color.DarkGreen,
                ClickCallback = MediaIntegration.PlayPause
            });

            _launchpadManager.AddProfile(profile);

            var profileTest = new LaunchpadProfile
            {
                Id             = 1,
                Name           = "Test profile",
                LaunchpadCoord = new LaunchpadCoord(8, 6)
            };

            profileTest.AddButton(new ClickableButton
            {
                Name          = "YouTube 2",
                X             = 0,
                Y             = 7,
                Color         = Color.Red,
                ClickCallback = () =>
                {
                    ApplicationIntegration.OpenWeb("https://youtube.com/lllibailll");
                }
            });

            _launchpadManager.AddProfile(profileTest);
        }
示例#5
0
        /// <summary>
        /// Main.
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            // Make a record of the starting time.
            DateTime operationStartTime = DateTime.Now;

            Logging.WriteLine(Application.ProductName + " - " + Application.ProductVersion);
#if DEBUG
            Logging.WriteLine("Mode=Debug");
#else
            Logging.WriteLine("Mode=Release");
#endif
            Logging.WriteLine("Part of HELLION.Explorer - https://github.com/CheeseJedi/HELLION.Explorer");

            // Process the command line arguments. If there's an issue (returned false) then exit.
            if (!ProcessCommandLineArguments(args))
            {
                return;
            }

            Logging.WriteLine("Loading save file...");
            if (!FileOpen())
            {
                Logging.WriteLine("Problem loading save file.");
                PauseIfDebuggerAttached();
                return;
            }
            Logging.WriteLine("Complete.");

            Logging.WriteLine("Querying Steam Public API for group membership...");
            string groupName = SteamIntegration.GetGroupName((long)groupID64);
            if (!RetrieveSteamGroupMembership())
            {
                Logging.WriteLine("Problem querying Steam.");
                PauseIfDebuggerAttached();
                return;
            }
            Logging.WriteLine("Complete.");
            Logging.WriteLine(string.Format("Steam Group {0} ({1}) has {2} member(s).",
                                            groupID64, groupName, groupMembers.Count));

            Logging.WriteLine("Building in-game player list...");
            // Build in-game character list containing only members of the steam group.
            BuildCrewList();
            Logging.WriteLine("Complete.");

            Logging.WriteLine("Building in-game vessel list...");
            // Build list of vessels whose names contain the specified prefix.
            BuildVesselList();
            Logging.WriteLine("Complete.");

            Logging.WriteLine("Processing vessel list...");
            ProcessVesselList();
            Logging.WriteLine("Complete.");

            // Save the changes.
            FileSave();

            TimeSpan timeElapsed = DateTime.Now - operationStartTime;

            Logging.WriteLine(string.Format("Operation completed in {0}.{1} second(s).",
                                            timeElapsed.Seconds, timeElapsed.Milliseconds));

            Logging.FlushBuffer();



#if DEBUG
            Console.WriteLine("Press enter to continue...");
            Console.ReadLine();
#endif
        }
示例#6
0
 /// <summary>
 /// Gets the list of members for the Steam Group.
 /// </summary>
 /// <returns></returns>
 internal static bool RetrieveSteamGroupMembership()
 {
     groupMembers = SteamIntegration.GetGroupMembers((long)groupID64);
     return((groupMembers.Count > 0) ? true : false);
 }