Exemplo n.º 1
0
        public void Evaluate(int SpreadMax)
        {
            if (this.FPinInGroups.PinIsChanged)
            {
                Collection <string> ids = new Collection <string>();
                for (int i = 0; i < this.FPinInGroups.SliceCount; i++)
                {
                    string id;
                    this.FPinInGroups.GetString(i, out id);
                    ids.Add(id);
                }

                Collection <Group> groups = api.GetGroups(ids);
                this.FPinOutName.SliceCount        = groups.Count;
                this.FPinOutTypes.SliceCount       = groups.Count;
                this.FPinOutDescription.SliceCount = groups.Count;

                string tmp = Path.GetTempPath();

                for (int i = 0; i < groups.Count; i++)
                {
                    this.FPinOutName.SetString(i, groups[i].Name);
                    this.FPinOutTypes.SetString(i, groups[i].Type);
                    this.FPinOutDescription.SetString(i, groups[i].Description);
                }
            }
        }
Exemplo n.º 2
0
        public void Evaluate(int SpreadMax)
        {
            if (this.FPinInAppKey.PinIsChanged || this.FPinInSecret.PinIsChanged)
            {
                this.ClearAPI();
                string appkey;
                string appsec;

                this.FPinInAppKey.GetString(0, out appkey);
                this.FPinInSecret.GetString(0, out appsec);

                if (appkey != "" && appsec != "")
                {
                    api.ApplicationKey       = appkey;
                    api.IsDesktopApplication = true;
                    api.Secret = appsec;
                    api.ConnectToFacebook();

                    this.FInvalidate = true;
                }
            }

            if (this.FInvalidate)
            {
                IList <string> frids = api.GetFriendIds();
                this.FPinOutFriends.SliceCount = frids.Count;
                for (int i = 0; i < frids.Count; i++)
                {
                    this.FPinOutFriends.SetString(i, frids[i]);
                }

                IList <Group> grpids = api.GetGroups();
                this.FPinOutGroups.SliceCount = grpids.Count;
                for (int i = 0; i < grpids.Count; i++)
                {
                    this.FPinOutGroups.SetString(i, grpids[i].GroupId);
                }


                this.FInvalidate = false;
            }
        }