Exemplo n.º 1
0
        public async Task HostServerAsync([Name("game_id")] string gameId = null, Privacy privacy = Privacy.Public)
        {
            if (_games.ReservedUsers.ContainsKey(Context.User.Id))
            {
                await Context.Channel.SendMessageAsync(Format.Warning("You are already in a server.")).ConfigureAwait(false);

                return;
            }

            if (_games.ReservedChannels.ContainsKey(Context.Channel.Id))
            {
                await Context.Channel.SendMessageAsync(Format.Warning("This channel is already dedicated to a server.")).ConfigureAwait(false);

                return;
            }

            if (Check.NotNull(gameId))
            {
                if (!_games.Games.ContainsKey(gameId))
                {
                    await Context.Channel.SendMessageAsync(Format.Warning("Unable to initialize a server for the specified game mode.")).ConfigureAwait(false);

                    return;
                }
            }

            await _games.CreateServerAsync(Context.User, Context.Channel, gameId, privacy).ConfigureAwait(false);
        }
Exemplo n.º 2
0
        private string RemoveName(string response)
        {
            var s = new Main.Session(null, null, response);

            Privacy.Remove(s);
            return(s.Response);
        }
Exemplo n.º 3
0
        private void postBtn_Click(object sender, EventArgs e)
        {
            if (Privacy.Text == "")
            {
                Privacy.Focus();
                MessageBox.Show("Select Pravicy Level");
            }
            else
            {
                post     ps = new post();
                DateTime no = DateTime.Now;

                if (addPicPost.Visible == false && Text22.Text != "")
                {
                    ps.write_in_database_photo_text(login.me.Id, Text22.Text, no.ToString(), Privacy.Text, pos.image, idtag);
                }
                else if (addPicPost.Visible == false && Text22.Text == "")
                {
                    ps.write_in_database_photo(login.me.Id, no.ToString(), Privacy.Text, pos.image, idtag);
                }
                else if (addPicPost.Visible == true && Text22.Text != "")
                {
                    ps.write_in_database_text(login.me.Id, Text22.Text, no.ToString(), Privacy.Text, idtag);
                }



                this.Hide();
            }
        }
Exemplo n.º 4
0
        private void but_anonlog_Click(object sender, EventArgs e)
        {
            CustomMessageBox.Show("This is beta, please confirm the output file");
            using (OpenFileDialog ofd = new OpenFileDialog())
            {
                ofd.Filter = "tlog or bin/log|*.tlog;*.bin;*.log";

                if (ofd.ShowDialog() == DialogResult.OK)
                {
                    var ext = Path.GetExtension(ofd.FileName).ToLower();
                    if (ext == ".bin")
                    {
                        ext = ".log";
                    }
                    using (SaveFileDialog sfd = new SaveFileDialog())
                    {
                        sfd.DefaultExt = ext;
                        sfd.FileName   = Path.GetFileNameWithoutExtension(ofd.FileName) + "-anon" + ext;
                        if (sfd.ShowDialog() == DialogResult.OK)
                        {
                            Privacy.anonymise(ofd.FileName, sfd.FileName);
                        }
                    }
                }
            }
        }
Exemplo n.º 5
0
        public ActionResult <string> Post([FromBody] LoginForm loginForm)
        {
            if (ModelState.IsValid)
            {
                var userRep = new UserReposotory();
                loginForm.password = Privacy.GetHashedPassword(loginForm.password);

                if (!userRep.IsSet(loginForm))
                {
                    return(BadRequest("неверный логин или пароль"));
                }

                var user = userRep.GetUser(loginForm);

                var response = new {
                    access_token = Privacy.GetToken(user),
                    user_name    = user.name
                };

                return(new JsonResult(response));
            }
            else
            {
                return(BadRequest());
            }
        }
Exemplo n.º 6
0
 public TextTag(string Author, Privacy Privacy, string Id, long Timestamp)
 {
     author = Author;
     privacy = Privacy; 
     id = Id;
     timestamp = Timestamp;
 }
Exemplo n.º 7
0
        public static void SendAlertApproved(Privacy privacy)
        {
            PCMSDBContext db      = new PCMSDBContext();
            SmtpClient    client  = initClient();
            MailMessage   message = initMail(privacy.OWNER);

            message.Subject = "[PCMS] 고객개인정보 승인 완료";
            string template = File.ReadAllText(System.Web.Hosting.HostingEnvironment.MapPath("~/Template/ApprovedEmail.html"));

            try
            {
                message.Body = Engine.Razor.RunCompile(template, Guid.NewGuid().ToString(), typeof(Privacy), privacy);
                db.Userlogs.Add(new Userlog {
                    useremail = message.To.ToString(), reqtype = @"Email", url = message.Subject, parameters = message.Body
                });
                client.Send(message);
            }
            catch (Exception e)
            {
                log.Error(e);
            }

            message.Dispose();
            db.SaveChanges();
        }
Exemplo n.º 8
0
        public TemplateConstructor(Privacy privacy, IList <IVariable> parameters, IList <IVariable> secondaryParameters)
        {
            this.privacy = privacy;

            this.codeBlock  = new TemplateCodeBlock();
            this.indent     = "\t";
            this.parameters = new List <IVariable>();

            SortedList <string, IVariable> sortedParameters = new SortedList <string, IVariable>();

            foreach (IVariable parameter in parameters)
            {
                sortedParameters.Add(parameter.InstanceName, parameter);
            }

            foreach (IVariable parameter in sortedParameters.Values)
            {
                this.parameters.Add(parameter);
            }

            if (secondaryParameters != null && secondaryParameters.Count > 0)
            {
                sortedParameters.Clear();
                foreach (IVariable secondaryParameter in secondaryParameters)
                {
                    sortedParameters.Add(secondaryParameter.InstanceName, secondaryParameter);
                }

                foreach (IVariable parameter in sortedParameters.Values)
                {
                    this.parameters.Add(parameter);
                }
            }
        }
Exemplo n.º 9
0
        public void Insert()
        {
            //Get guids for data in the database so that things load properly
            Privacy privacy = LoadPrivacy();
            Status  status  = LoadStatus();
            User    user    = LoadUser();

            Project project = new Project()
            {
                Id            = Guid.Parse("11112222-3333-4444-5555-666677778888"),
                Name          = "Test",
                Challenges    = "Test",
                Collaborators = "Test",
                DateCreated   = DateTime.Now,
                Description   = "Test",
                Environment   = "Test",
                Filepath      = "Test",
                FuturePlans   = "Test",
                Image         = "Test",
                LastUpdated   = DateTime.Now,
                Location      = "Test",
                Purpose       = "Test",
                SoftwareUsed  = "Test",
                PrivacyId     = privacy.Id,
                StatusId      = status.Id,
                UserId        = user.Id,
            };

            int rowsInserted = project.Insert();

            Assert.IsTrue(rowsInserted == 1);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Handles the Click event of the Terms_Privacy control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
        private void Terms_Privacy_Click(object sender, RoutedEventArgs e)
        {
            BaseController.PreviousPage = this;
            Privacy page = new Privacy();

            this.NavigationService.Navigate(page);
        }
 private void InitializeFields()
 {
     this.firstPrivacy = new Privacy
     {
         PageContent = "Some page content here",
     };
 }
Exemplo n.º 12
0
        private string RemoveToken(string query)
        {
            var s = new Main.Session(query, null, null);

            Privacy.Remove(s);
            return(s.Url);
        }
Exemplo n.º 13
0
        /// <summary>
        /// 以Tag和UserName为约束条件来筛选网址数据
        /// </summary>
        /// <param name="tag"></param>
        /// <param name="privacy"></param>
        /// <param name="pageIndex"></param>
        /// <param name="count"></param>
        /// <param name="orderBy"></param>
        /// <returns></returns>

        public DataTable GetByTags(string tag, Privacy privacy, int pageIndex, int count, OrderBy orderBy)
        {
            using (Database db = DatabaseFactory.CreateDatabase("bookmark"))
            {
                string sql;
                if (privacy == Privacy.PUBLIC)
                {
                    sql = string.Format("select top {0} * from [Favors] where [Tag]= '{3}' and  [Username]=@Username and [Privacy]=0 and [FavorID] not in(select top {1} [FavorID] from [Favors] where [Tag]='{3}' and  [Username]=@Username  and [Privacy]=0 order by [FavorID] {2}) order by [FavorID] {2}",
                                        count,
                                        pageIndex * count,
                                        orderBy == OrderBy.ASC ? "asc" : "desc",
                                        tag);
                }
                else
                {
                    sql = string.Format("select top {0} * from [Favors] where [Tag]= '{3}'and [Username]=@Username  and [FavorID] not in(select top {1} [FavorID] from [Favors] where [Tag]='{3}' and  [Username]=@Username order by [FavorID] {2}) order by [FavorID] {2}",
                                        count,
                                        pageIndex * count,
                                        orderBy == OrderBy.ASC ? "asc" : "desc",
                                        tag);
                }
                //可以用来测试的字符串: '新我的链接,编程技术,jQuery'
                //查询返回数据集
                return(db.Execute <DataTable>(sql, new DbParameter[] {
                    db.CreateParameter("@Username", User.Username)
                }));
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// Gets some properties for a specific party privacy.
        /// </summary>
        /// <param name="privacy">The desired party privacy.</param>
        public PartyPrivacy(Privacy privacy)
        {
            switch (privacy)
            {
            case Privacy.Public:
            {
                PartyType                = "Public";
                InviteRestriction        = "AnyMember";
                OnlyLeaderFriendsCanJoin = false;
                PresencePermission       = "Anyone";
                InvitePermission         = "Anyone";
                AcceptingMembers         = true;
                break;
            }

            case Privacy.Friends:
            {
                PartyType                = "FriendsOnly";
                InviteRestriction        = "LeaderOnly";
                OnlyLeaderFriendsCanJoin = true;
                PresencePermission       = "Leader";
                InvitePermission         = "Leader";
                AcceptingMembers         = false;
                break;
            }

            case Privacy.FriendsAllowFriendsOfFriends:
            {
                PartyType                = "FriendsOnly";
                InviteRestriction        = "AnyMember";
                OnlyLeaderFriendsCanJoin = false;
                PresencePermission       = "Anyone";
                InvitePermission         = "AnyMember";
                AcceptingMembers         = true;
                break;
            }

            case Privacy.Private:
            {
                PartyType                = "Private";
                InviteRestriction        = "LeaderOnly";
                OnlyLeaderFriendsCanJoin = true;
                PresencePermission       = "Noone";
                InvitePermission         = "Leader";
                AcceptingMembers         = false;
                break;
            }

            case Privacy.PrivateAllowFriendsOfFriends:
            {
                PartyType                = "Private";
                InviteRestriction        = "AnyMember";
                OnlyLeaderFriendsCanJoin = false;
                PresencePermission       = "Noone";
                InvitePermission         = "AnyMember";
                AcceptingMembers         = false;
                break;
            }
            }
        }
        public override void OnEnter()
        {
            var dialog = Privacy.ShowDefaultConsentDialog(dismissible.Value);

            dialog.Dismissed += Dialog_Dismissed;
            dialog.Completed += Dialog_Completed;
        }
Exemplo n.º 16
0
        public static void SendAlertPfizerLink(Privacy privacy)
        {
            PCMSDBContext db      = new PCMSDBContext();
            SmtpClient    client  = initClient();
            MailMessage   message = initMail(Status.SettingType.PfizerLinkAlert);

            message.Subject = "[PCMS:알림] 화이자링크 신청이 등록되었습니다.";
            string template = File.ReadAllText(System.Web.Hosting.HostingEnvironment.MapPath("~/Template/PfizerLinkEmail.html"));

            try
            {
                message.Body = Engine.Razor.RunCompile(template, Guid.NewGuid().ToString(), typeof(Privacy), privacy);
                db.Userlogs.Add(new Userlog {
                    useremail = message.To.ToString(), reqtype = @"Email", url = message.Subject, parameters = message.Body
                });
                client.Send(message);
                privacy.LINK_ALERTED    = true;
                db.Entry(privacy).State = System.Data.Entity.EntityState.Modified;
            }
            catch (Exception e)
            {
                log.Error(e);
            }

            message.Dispose();
            db.SaveChanges();
        }
 public CreateOrUpdateCatalogCommand(long catalogId, string name, long userId, Privacy visibility)
 {
     CatalogId = catalogId;
     Name = name;
     UserId = userId;
     Visibility = visibility;
 }
Exemplo n.º 18
0
 public User()
 {
     Registrations = new List <Registration>();
     Walks         = new List <Walk>();
     Friends       = new List <string>();
     Privacy       = Privacy.PRIVATE;
 }
Exemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SetRequestMessage"/> class.
        /// </summary>
        /// <param name="version">The version.</param>
        /// <param name="messageId">The message id.</param>
        /// <param name="requestId">The request id.</param>
        /// <param name="contextName">The context name.</param>
        /// <param name="variables">The variables.</param>
        /// <param name="privacy">The privacy provider.</param>
        /// <param name="maxMessageSize">Size of the max message.</param>
        public SetRequestMessage(VersionCode version, int messageId, int requestId, OctetString contextName, IList <Variable> variables, IPrivacyProvider privacy, int maxMessageSize)
        {
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }

            if (contextName == null)
            {
                throw new ArgumentNullException(nameof(contextName));
            }

            if (version != VersionCode.V3)
            {
                throw new ArgumentException("Only v3 is supported.", nameof(version));
            }

            Version    = version;
            Privacy    = privacy ?? throw new ArgumentNullException(nameof(privacy));
            Header     = new Header(new Integer32(messageId), new Integer32(maxMessageSize), privacy.ToSecurityLevel() | Levels.Reportable, new Integer32((int)SecurityModel.Tsm));
            Parameters = SecurityParameters.Empty;

            var pdu = new SetRequestPdu(
                requestId,
                variables);
            var contextEngineId = OctetString.Empty;

            Scope = new Scope(contextEngineId, contextName, pdu);

            Privacy.ComputeHash(Version, Header, Parameters, Scope);
            _bytes = this.PackMessage(null).ToBytes();
        }
Exemplo n.º 20
0
        /// <summary>
        /// 获取用户网址列表
        /// </summary>
        /// <param name="privacy">获取公开图片还是全部图片</param>
        /// <param name="pageIndex">页码,从0开始</param>
        /// <param name="count">每页条数</param>
        /// <param name="orderBy">按时间顺序还是逆序</param>
        /// <returns>将每行数据放到Hashtable中</returns>
        public DataTable GetList(Privacy privacy, int pageIndex, int count, OrderBy orderBy)
        {
            using (Database db = DatabaseFactory.CreateDatabase("bookmark"))
            {
                string sql;
                if (privacy == Privacy.PUBLIC)
                {
                    sql = string.Format("select top {0} * from [Favors] where [Username]=@Username and [Privacy]=0 and [FavorID] not in(select top {1} [FavorID] from [Favors] where  [Username]=@Username and [Privacy]=0 order by [FavorID] {2}) order by [FavorID] {2}",
                                        count,
                                        pageIndex * count,
                                        orderBy == OrderBy.ASC ? "asc" : "desc");

                    //sql = string.Format("select * from [Favors] where [Username]=@Username and [FavorID] order by [FavorID] {2} limit {1},{0}",
                    //       count,
                    //       pageIndex * count,
                    //       orderBy == OrderBy.ASC ? "asc" : "desc");
                }
                else
                {
                    sql = string.Format("select top {0} * from [Favors] where [Username]=@Username and [FavorID] not in(select top {1} [FavorID] from [Favors] where  [Username]=@Username order by [FavorID] {2}) order by [FavorID] {2}",
                                        count,
                                        pageIndex * count,
                                        orderBy == OrderBy.ASC ? "asc" : "desc");
                }
                //查询返回数据集
                return(db.Execute <DataTable>(sql, new DbParameter[] {
                    db.CreateParameter("@Username", User.Username)
                }));
            }
        }
Exemplo n.º 21
0
        private void initObjectModels()
        {
            // initializing footer objects
            terms         = new Terms(browser);
            privacy       = new Privacy(browser);
            security      = new Security(browser);
            status        = new Status(browser);
            help          = new Help(browser);
            footerLogo    = new pageObjectModels.footer.Logo(browser);
            contactGitHub = new ContactGitHub(browser);
            api           = new API(browser);
            training      = new Training(browser);
            shop          = new Shop(browser);
            footerBlog    = new pageObjectModels.footer.Blog(browser);
            about         = new About(browser);

            // initializing explore objects
            integrations = new Integrations(browser);
            showcases    = new Showcases(browser);
            trending     = new Trending(browser);

            // initializing header objects
            headerLogo = new pageObjectModels.header.Logo(browser);
            personal   = new Personal(browser);
            openSource = new OpenSource(browser);
            business   = new Business(browser);
            explore    = new Explore(browser);
            pricing    = new Pricing(browser);
            headerBlog = new pageObjectModels.header.Blog(browser);
            support    = new Support(browser);
            searchBar  = new pageObjectModels.header.SearchBar(browser);
            signIn     = new SignIn(browser);
            signUp     = new SignUp(browser);

            // initializing main objects
            signUpUsername  = new SignUpUsername(browser);
            signUpEmail     = new SignUpEmail(browser);
            signUpPassword  = new SignUpPassword(browser);
            signUpSubmit    = new SignUpSubmit(browser);
            signUpForGitHub = new SignUpForGitHubButton(browser);

            // initializing pricing objects
            joinGitHubForFree    = new JoinGitHubForFree(browser);
            upgradeAccount       = new UpgradeAccount(browser);
            createOrganization   = new CreateOrganization(browser);
            startEnterpriseTrial = new StartEnterpriseTrial(browser);

            // initializing blog objects
            featured      = new Featured(browser);
            allPosts      = new AllPosts(browser);
            newFeatures   = new NewFeatures(browser);
            engineering   = new Engineering(browser);
            enterprise    = new Enterprise(browser);
            conferences   = new Conferences(browser);
            meetups       = new Meetups(browser);
            newHires      = new NewHires(browser);
            watercooler   = new Watercooler(browser);
            blogSearchBar = new pageObjectModels.blog.SearchBar(browser);
        }
Exemplo n.º 22
0
 /// <summary>Return string representation of the object.</summary>
 /// <returns>String representation of the class values.</returns>
 public override string ToString()
 {
     return(string.Format(
                "Reportable {0} Authenticated {1} Privacy {2}",
                Reportable.ToString(),
                Authentication.ToString(),
                Privacy.ToString()));
 }
Exemplo n.º 23
0
        public ActionResult modify(Privacy privacy)
        {
            Privacy item = privacyService.findPrivacy(privacy);

            ViewBag.item = item;

            return(View("~/Views/LegalNotice/Privacy/modify.cshtml"));
        }
Exemplo n.º 24
0
 public static bool HaveAccess(this UserDTO user, Privacy privacy)
 {
     if (privacy == Privacy.Public || (privacy == Privacy.FriendsOnly && user.IsFriend()))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 25
0
 public ActionResult list(Privacy privacy)
 {
     searchService.setSearchSession(Request, Session);
     searchService.setPagination(privacy, 20, privacyService.findAllCount(privacy));
     ViewBag.list       = privacyService.findAll(privacy);
     ViewBag.pagination = privacy;
     return(View("~/Views/LegalNotice/Privacy/list.cshtml"));
 }
Exemplo n.º 26
0
 public bool HaveAccess(Privacy privacy)
 {
     if (privacy == BodyArchitect.Service.V2.Model.Privacy.Public || (privacy == BodyArchitect.Service.V2.Model.Privacy.FriendsOnly && IsFriend))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 27
0
 public TextTag(TextTag copyTag, Privacy newPrivacy)
 {
     // copy everything except for privacy
     author = copyTag.author;
     id = copyTag.id;
     timestamp = copyTag.timestamp;
     privacy = newPrivacy;
 }
Exemplo n.º 28
0
        public TemplateConstructor(IList <IVariable> parameters)
        {
            this.parameters = parameters;

            this.privacy   = Privacy.Public;
            this.codeBlock = new TemplateCodeBlock();
            this.indent    = "\t";
        }
Exemplo n.º 29
0
 public long Create(string catalogName, string description, Privacy privacy)
 {
     return Call<long>("create", new
     {
         Name = catalogName,
         Description = description,
         Privacy = privacy
     });
 }
Exemplo n.º 30
0
        private static Privacy LoadPrivacy()
        {
            PrivacyList privacies = new PrivacyList();

            privacies.Load();
            Privacy privacy = privacies.FirstOrDefault(p => p.Description == "Public");

            return(privacy);
        }
Exemplo n.º 31
0
 public UsmConfig()
 {
     this._engineId             = string.Empty;
     this._securityName         = string.Empty;
     this._authenticationType   = Authentication.None;
     this._authenticationSecret = string.Empty;
     this._privacyType          = Privacy.None;
     this._privacySecret        = string.Empty;
 }
 public TextDescriptor(double X, double Y, double W, double H, Privacy P, string T, string Content, string FF, double FS, string FW, string FD, System.Windows.Media.Color FC) : base(X, Y, W, H,P,T)
 {
     fontFamily = FF;
     fontSize = FS;
     fontWeight = FW;
     fontDecoration = FD;
     content = Content;
     fontColor = FC;
 }
Exemplo n.º 33
0
 public void ResetAll()
 {
     General.ResetDefaultValue();
     Playback.ResetDefaultValue();
     ClosedCaption.ResetDefaultvalue();
     Privacy.ResetDefaultValue();
     Server.ResetDefaultValue();
     Thumbnail.ResetDefaultValue();
 }
Exemplo n.º 34
0
        public RedirectToRouteResult modifyProc(Privacy privacy)
        {
            var sanitizer = new HtmlSanitizer();

            privacy.contents = sanitizer.Sanitize(privacy.contents);
            privacy.uptId    = System.Web.HttpContext.Current.User.Identity.Name;
            privacyService.updatePrivacy(privacy);
            return(RedirectToAction("list"));
        }
 public CanvasContentDescriptor(double X, double Y, double W, double H, Privacy P, string T)
 {
     x = X;
     y = Y;
     w = W;
     h = H;
     privacy = P;
     target = T;
 }
Exemplo n.º 36
0
 public ImageTag(string Author, Privacy Privacy, string Id, bool IsBackground, long Timestamp, string ResourceIdentity, int ZIndex = 0)
 {
     author = Author;
     privacy = Privacy; 
     id = Id;
     isBackground = IsBackground;
     zIndex = ZIndex;
     resourceIdentity = ResourceIdentity;
     timestamp = Timestamp;
 }
Exemplo n.º 37
0
 public UploadPhoto(Guid id, Guid user, Stream file, string filename, string contenttype, Privacy privacy, ICommandSender bus)
 {
     Id = id;
     UserId = user;
     File = file;
     Filename = filename;
     ContentType = contenttype;
     Privacy = privacy;
     Bus = bus;
 }
Exemplo n.º 38
0
 public ActionResult Edit(Guid id, Privacy p)
 {
     try
     {
         // TODO: Add update logic here
         p.Update();
         return(RedirectToAction("Index"));
     }
     catch { return(View(p)); }
 }
 public VisualizedPowerpointContent(int s, double x, double y, double w, double h, Privacy p, string t)
 {
     Slide = s;
     X = x;
     Y = y;
     Width = w;
     Height = h;
     Privacy = p;
     Target = t;
 }
        private RemoteFile(int id, string filename, string title, long size, int categoryId, bool active, int userId, Privacy privacy)
            : base(filename, title, privacy)
        {
            Id = id;
            Size = size;
            Active = active;

            this.userId = userId;

            this.categoryId = categoryId;
        }
Exemplo n.º 41
0
 public ImageTag(ImageTag copyTag, Privacy newPrivacy)
 {
     // copy everything except privacy
     author = copyTag.author;
     id = copyTag.id;
     isBackground = copyTag.isBackground;
     zIndex = copyTag.zIndex;
     timestamp = copyTag.timestamp;
     resourceIdentity = copyTag.resourceIdentity;
     privacy = newPrivacy;
 }
        public static void ApplyPrivacyStyling(this FrameworkElement element, ContentBuffer contentBuffer, string target, Privacy newPrivacy)
        {
            if ((!Globals.conversationDetails.Permissions.studentCanWorkPublicly && !Globals.isAuthor) || (target == "notepad"))
            {
                element.RemovePrivacyStyling(contentBuffer); 
                return;
            }
            if (newPrivacy != Privacy.Private)
            {
                element.RemovePrivacyStyling(contentBuffer); 
                return;
            }

            ApplyShadowEffect(element, contentBuffer, Colors.Black);
        }
Exemplo n.º 43
0
 /// <remarks/>
 public void UpdateMembershipPrivacyAsync(string accountName, System.Guid sourceInternal, string sourceReference, Privacy newPrivacy, object userState) {
     if ((this.UpdateMembershipPrivacyOperationCompleted == null)) {
         this.UpdateMembershipPrivacyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateMembershipPrivacyOperationCompleted);
     }
     this.InvokeAsync("UpdateMembershipPrivacy", new object[] {
                 accountName,
                 sourceInternal,
                 sourceReference,
                 newPrivacy}, this.UpdateMembershipPrivacyOperationCompleted, userState);
 }
Exemplo n.º 44
0
 public ContactData AddColleague(string accountName, string colleagueAccountName, string group, Privacy privacy, bool isInWorkGroup) {
     object[] results = this.Invoke("AddColleague", new object[] {
                 accountName,
                 colleagueAccountName,
                 group,
                 privacy,
                 isInWorkGroup});
     return ((ContactData)(results[0]));
 }
Exemplo n.º 45
0
 /// <remarks/>
 public void AddColleagueAsync(string accountName, string colleagueAccountName, string group, Privacy privacy, bool isInWorkGroup) {
     this.AddColleagueAsync(accountName, colleagueAccountName, group, privacy, isInWorkGroup, null);
 }
Exemplo n.º 46
0
        public bool EditAlbum(long albumId, string title, long? groupId = null, Privacy privacy = null)
        {
            VkErrors.ThrowIfNullOrEmpty(() => title);
            VkErrors.ThrowIfNumberIsNegative(() => albumId);
            VkErrors.ThrowIfNumberIsNegative(() => groupId);

            var parameters = new VkParameters {
                { "group_id", groupId },
                { "album_id", albumId },
                { "title", title },
                { "privacy", privacy }
            };

            return _vk.Call("video.editAlbum", parameters);
        }
Exemplo n.º 47
0
 public MembershipData AddMembership(string accountName, MembershipData membershipInfo, string group, Privacy privacy) {
     object[] results = this.Invoke("AddMembership", new object[] {
                 accountName,
                 membershipInfo,
                 group,
                 privacy});
     return ((MembershipData)(results[0]));
 }
Exemplo n.º 48
0
 public void UpdateColleaguePrivacy(string accountName, string colleagueAccountName, Privacy newPrivacy) {
     this.Invoke("UpdateColleaguePrivacy", new object[] {
                 accountName,
                 colleagueAccountName,
                 newPrivacy});
 }
Exemplo n.º 49
0
 /// <remarks/>
 public void AddLinkAsync(string accountName, string name, string url, string group, Privacy privacy, object userState) {
     if ((this.AddLinkOperationCompleted == null)) {
         this.AddLinkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddLinkOperationCompleted);
     }
     this.InvokeAsync("AddLink", new object[] {
                 accountName,
                 name,
                 url,
                 group,
                 privacy}, this.AddLinkOperationCompleted, userState);
 }
Exemplo n.º 50
0
 /// <remarks/>
 public void AddLinkAsync(string accountName, string name, string url, string group, Privacy privacy) {
     this.AddLinkAsync(accountName, name, url, group, privacy, null);
 }
Exemplo n.º 51
0
 public QuickLinkData AddLink(string accountName, string name, string url, string group, Privacy privacy) {
     object[] results = this.Invoke("AddLink", new object[] {
                 accountName,
                 name,
                 url,
                 group,
                 privacy});
     return ((QuickLinkData)(results[0]));
 }
Exemplo n.º 52
0
 /// <remarks/>
 public void AddMembershipAsync(string accountName, MembershipData membershipInfo, string group, Privacy privacy, object userState) {
     if ((this.AddMembershipOperationCompleted == null)) {
         this.AddMembershipOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddMembershipOperationCompleted);
     }
     this.InvokeAsync("AddMembership", new object[] {
                 accountName,
                 membershipInfo,
                 group,
                 privacy}, this.AddMembershipOperationCompleted, userState);
 }
Exemplo n.º 53
0
 /// <remarks/>
 public void AddMembershipAsync(string accountName, MembershipData membershipInfo, string group, Privacy privacy) {
     this.AddMembershipAsync(accountName, membershipInfo, group, privacy, null);
 }
Exemplo n.º 54
0
 /// <remarks/>
 public void UpdateMembershipPrivacyAsync(string accountName, System.Guid sourceInternal, string sourceReference, Privacy newPrivacy) {
     this.UpdateMembershipPrivacyAsync(accountName, sourceInternal, sourceReference, newPrivacy, null);
 }
Exemplo n.º 55
0
 /// <summary>
 /// Se produit lorsque le flux XMPP est ferm�
 /// </summary>
 /// <param name="sender">Objet parent</param>
 private void xmppOnClose(object sender)
 {
     if (_bookmarks != null)
     {
         _bookmarks.Dispose();
         _bookmarks = null;
     }
     if (_privacy != null)
     {
         _privacy.Dispose();
         _privacy = null;
     }
     if (_identity != null)
     {
         _identity.Dispose();
         _identity = null;
     }
     if (_roster != null)
     {
         _roster.Dispose();
         _roster = null;
     }
     if (_presence != null)
     {
         _presence.Dispose();
         _presence = null;
     }
     if (_queries != null)
     {
         _queries.Dispose();
         _queries = null;
     }
     OnDisconnected();
 }
Exemplo n.º 56
0
 /// <remarks/>
 public void UpdateColleaguePrivacyAsync(string accountName, string colleagueAccountName, Privacy newPrivacy) {
     this.UpdateColleaguePrivacyAsync(accountName, colleagueAccountName, newPrivacy, null);
 }
Exemplo n.º 57
0
 /// <remarks/>
 public void UpdateColleaguePrivacyAsync(string accountName, string colleagueAccountName, Privacy newPrivacy, object userState) {
     if ((this.UpdateColleaguePrivacyOperationCompleted == null)) {
         this.UpdateColleaguePrivacyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateColleaguePrivacyOperationCompleted);
     }
     this.InvokeAsync("UpdateColleaguePrivacy", new object[] {
                 accountName,
                 colleagueAccountName,
                 newPrivacy}, this.UpdateColleaguePrivacyOperationCompleted, userState);
 }
Exemplo n.º 58
0
 public void UpdateMembershipPrivacy(string accountName, System.Guid sourceInternal, string sourceReference, Privacy newPrivacy) {
     this.Invoke("UpdateMembershipPrivacy", new object[] {
                 accountName,
                 sourceInternal,
                 sourceReference,
                 newPrivacy});
 }
Exemplo n.º 59
0
 /// <summary>
 /// Se produit lorsque le flux XMPP est disponible
 /// </summary>
 /// <param name="sender">Objet parent</param>
 private void xmppOnLogin(object sender)
 {
     Jabber.xmpp.DiscoInfo = Queries.getDiscoInfo();
     xmppDiscoServer();
     _queries = new Queries();
     _privacy = new Privacy();
     _bookmarks = new Bookmarks();
     _identity = new Identity(xmpp.MyJID);
     _identity.retrieve();
     _roster = new Roster();
     _presence = new nJim.Presence();
     OnConnected();
     xmpp.RequestRoster();
 }
Exemplo n.º 60
0
 /// <remarks/>
 public void AddColleagueAsync(string accountName, string colleagueAccountName, string group, Privacy privacy, bool isInWorkGroup, object userState) {
     if ((this.AddColleagueOperationCompleted == null)) {
         this.AddColleagueOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddColleagueOperationCompleted);
     }
     this.InvokeAsync("AddColleague", new object[] {
                 accountName,
                 colleagueAccountName,
                 group,
                 privacy,
                 isInWorkGroup}, this.AddColleagueOperationCompleted, userState);
 }