Esempio n. 1
0
        public MessageForm( SteamContext context, Friend friendId, Settings sets)
        {
            InitializeComponent();

            this.context = context;
            this.FriendID = friendId;

            this.Text = friendId.PersonaName;

            settings = sets;

            foreach ( BeeKeeper bk in settings.BeeKeeper )
            {
                if ( bk.SteamID == ( ulong )FriendID.SteamID )
                {
                    foreach ( string str in bk.Entries )
                    {
                        txtResponses.Text += str + "\r\n";
                    }

                    checkBeeKeeper.Checked = bk.Enabled;

                    continue;
                }
            }

        }
Esempio n. 2
0
        public MessageForm(SteamContext context, Friend friendId, Settings sets)
        {
            InitializeComponent();

            this.context  = context;
            this.FriendID = friendId;

            this.Text = friendId.PersonaName;

            settings = sets;

            foreach (BeeKeeper bk in settings.BeeKeeper)
            {
                if (bk.SteamID == ( ulong )FriendID.SteamID)
                {
                    foreach (string str in bk.Entries)
                    {
                        txtResponses.Text += str + "\r\n";
                    }

                    checkBeeKeeper.Checked = bk.Enabled;

                    continue;
                }
            }
        }
Esempio n. 3
0
        public MainForm(SteamContext context)
        {
            try
            {
                sets = Settings.Load("settings.xml");

                if (sets == null)
                {
                    sets = new Settings();
                    sets.Save("settings.xml");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Unable to load settings!\n\n" + ex.ToString());
                sets = new Settings();
            }

            InitializeComponent();

            foreach (string str in sets.NameChanger)
            {
                txtNameChanger.Text += str + "\r\n";
            }

            chkNoEscape.Checked = sets.NoEscape;
            awayMessageBox.Text = sets.NoEscapeString;

            nameEntries = new List <NameEntry>();

            this.context = context;

            friendsList.SteamContext = context;

            txtPersonaName.Text = context.SteamFriends.GetPersonaName();

            for (int x = -2; x < ( int )(EPersonaState.k_EPersonaStateMax + 2); x++)
            {
                cmbState.Items.Add(( EPersonaState )x);
            }

            cmbState.SelectedIndex = ( int )(context.SteamFriends.GetPersonaState() + 2);

            for (int i = 0; i < context.SteamFriends.GetFriendCount(( int )EFriendFlags.k_EFriendFlagImmediate); ++i)
            {
                Friend friend = new Friend();

                CSteamID steamId    = context.SteamFriends.GetFriendByIndex(i, ( int )EFriendFlags.k_EFriendFlagImmediate);
                string   friendName = context.SteamFriends.GetFriendPersonaName(steamId);

                friend.SteamID     = steamId;
                friend.PersonaName = friendName;

                friendsList.Items.Add(friend);
            }

            friendsList.Sorted = true;
        }
Esempio n. 4
0
        public MainForm( SteamContext context )
        {
            try
            {
                sets = Settings.Load( "settings.xml" );

                if ( sets == null )
                {
                    sets = new Settings();
                    sets.Save( "settings.xml" );
                }
            }
            catch ( Exception ex )
            {
                MessageBox.Show( "Unable to load settings!\n\n" + ex.ToString() );
				sets = new Settings();
            }

            InitializeComponent();

            foreach ( string str in sets.NameChanger )
            {
                txtNameChanger.Text += str + "\r\n";
            }

            chkNoEscape.Checked = sets.NoEscape;
            awayMessageBox.Text = sets.NoEscapeString;

            nameEntries = new List<NameEntry>();

            this.context = context;

            friendsList.SteamContext = context;

            txtPersonaName.Text = context.SteamFriends.GetPersonaName();

            for ( int x = -2 ; x < ( int )( EPersonaState.k_EPersonaStateMax + 2 ) ; x++ )
                cmbState.Items.Add( ( EPersonaState )x );

            cmbState.SelectedIndex = ( int )( context.SteamFriends.GetPersonaState() + 2 );

            for ( int i = 0 ; i < context.SteamFriends.GetFriendCount( ( int )EFriendFlags.k_EFriendFlagImmediate ) ; ++i )
            {
                Friend friend = new Friend();

                CSteamID steamId = context.SteamFriends.GetFriendByIndex( i, ( int )EFriendFlags.k_EFriendFlagImmediate );
                string friendName = context.SteamFriends.GetFriendPersonaName( steamId );

                friend.SteamID = steamId;
                friend.PersonaName = friendName;

                friendsList.Items.Add( friend );
            }

            friendsList.Sorted = true;
        }
Esempio n. 5
0
        static void Main()
        {
            SteamContext context = new SteamContext();

            if (!context.Initialize())
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            Application.Run(new MainForm(context));
        }
Esempio n. 6
0
        static void Main()
        {
            SteamContext context = new SteamContext();

            if ( !context.Initialize() )
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault( false );


            Application.Run( new MainForm( context ) );
        }