Exemplo n.º 1
0
        private int ScoreRB(
            Round round,
            Player starter,
            Player backup)
        {
            var starterPts = RushingStats(
                starter,
                round,
                "RB");
            int pts;

            if (starterPts > 0)
            {
                pts            = starterPts;
                starter.Points = pts;
                Contributors.Add(starter);
            }
            else
            {
                pts = RushingStats(
                    backup,
                    round,
                    "RB");
                backup.Points = pts;
                Contributors.Add(backup);
            }
            return(pts);
        }
Exemplo n.º 2
0
        private int ScoreRec(
            Round round,
            Player starter,
            Player backup)
        {
            var starterPts = ReceivingStats(
                starter,
                round,
                string.Empty);
            int pts;

            if (starterPts > 0)
            {
                pts            = starterPts;
                starter.Points = pts;
                Contributors.Add(starter);
            }
            else
            {
                pts = ReceivingStats(
                    backup,
                    round,
                    string.Empty);
                backup.Points = pts;
                Contributors.Add(backup);
            }
            return(pts);
        }
Exemplo n.º 3
0
 public bool AddPerson(IPerson person)
 {
     if (person is IContributor contributor)
     {
         Contributors.Add(contributor);
     }
     return(true);
 }
Exemplo n.º 4
0
 public void Add_ProjectContributor(ProjectContributor model)
 {
     if (!Contributors.Any(c => c.UserId == model.UserId))
     {
         Contributors.Add(model);
         AddDomainEvent(new ProjectJoinedDomainEvent {
             ProjectContributor = model, Avatar = this.Avatar, Name = this.Avatar
         });
     }
 }
Exemplo n.º 5
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.UserId == UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoinedEvent {
             Contributor = contributor
         });
     }
 }
Exemplo n.º 6
0
        public void AddContributor(ProjectContributor contributor)
        {
            if (!Contributors.Any(v => v.UserId == contributor.UserId))
            {
                Contributors.Add(contributor);

                AddDomainEvent(new ProjectJoinedEvent {
                    Contributor = contributor, Avatar = Avatar, Company = Company, Introduction = Introduction
                });
            }
        }
Exemplo n.º 7
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.UserId == UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoinedEvent {
             Company      = this.Company,
             Introduction = this.Introduction,
             contributor  = contributor
         });
     }
 }
Exemplo n.º 8
0
        public void AddContributor(ProjectContributors contributors)
        {
            if (Contributors.All(v => v.UserId != UserId))
            {
                Contributors.Add(contributors);

                AddDomainEvent(new ProjectJoinedEvent()
                {
                    Contributors = contributors
                });
            }
        }
Exemplo n.º 9
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (!Contributors.Any(v => v.Id == contributor.Id))
     {
         this.AddDomainEvent(new ProjectJoinedEvent {
             Contributor    = contributor
             , Company      = this.Company
             , Introduction = this.Introduction
             , Avatar       = this.Avatar
         });
         Contributors.Add(contributor);
     }
 }
Exemplo n.º 10
0
        public void TwitchClient_OnMessageReceived(Object sender, OnMessageReceivedArgs e)
        {
            String cleanMessage = e.ChatMessage.Message.Trim(' ', Data.InvisibleCharacter);

            String[] tokens = cleanMessage.Split(' ');

            if (tokens.Length < 4)
            {
                CurrentStage = JimboxStage.None;
                return;
            }

            if (IsTop(tokens))
            {
                // Differentiate between top and bottom.
                if (CurrentStage == JimboxStage.Mouth)
                {
                    // We are at the bottom and have completed the jimbox.
                    CurrentStage = JimboxStage.Bottom;
                    Contributors.Add(e.ChatMessage.DisplayName);
                    SpoolSuccessMessage();
                    Border = null;
                    Contributors.Clear();
                }
                else
                {
                    // We just started a new jimbox.
                    CurrentStage = JimboxStage.Top;
                    Border       = tokens[0];
                    Contributors.Clear();
                    Contributors.Add(e.ChatMessage.DisplayName);
                }
            }
            else if (CurrentStage == JimboxStage.Top && IsEyes(tokens))
            {
                CurrentStage = JimboxStage.Eyes;
                Contributors.Add(e.ChatMessage.DisplayName);
            }
            else if (CurrentStage == JimboxStage.Eyes && IsMouth(tokens))
            {
                CurrentStage = JimboxStage.Mouth;
                Contributors.Add(e.ChatMessage.DisplayName);
            }
            else
            {
                CurrentStage = JimboxStage.None;
                Border       = null;
                Contributors.Clear();
            }
        }
Exemplo n.º 11
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (Contributors.Any(v => v.UserId == contributor.UserId))
     {
         Contributors.Add(contributor);
         AddDomainEvent(new ProjectJoninedEvnet
         {
             Avatar       = this.Avatar,
             Company      = this.Company,
             Introduction = this.Introduction,
             Contributor  = contributor
         });
     }
 }
Exemplo n.º 12
0
        /// <summary>
        /// 添加项目贡献者
        /// </summary>
        /// <param name="projectContributor"></param>
        public void AddContributor(ProjectContributor projectContributor)
        {
            //如果不在查看列表中,需添加
            if (!Contributors.Any(b => b.UserId == projectContributor.UserId))
            {
                Contributors.Add(projectContributor);

                //添加 参与项目事件
                AddDomainEvent(new ProjectJoinEvent {
                    Company            = this.Company,
                    Introduction       = this.Introduction,
                    Avatar             = this.Avatar,
                    ProjectContributor = projectContributor
                });
            }
        }
Exemplo n.º 13
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            ContributorModel tachiProfile = new ContributorModel()
            {
                Name          = "Tachibana Yui",
                ProfilePicure = "https://avatars3.githubusercontent.com/u/33594017",
                Role          = "Project Owner",
                Description   = "Hello, my name is Tachibana Yui and thank you for choosing Fschool Auto Feedback Windows 10 Edition. I am a hobbyist programmer for some reason also love Japanese cultures. I came to the programming world after watching an anime series called \"Sword Art Online\" after that, I always want to create my dream game. I have 3.5 years of experience working with .NET and C# technology. In recent years, I have created a few programs, automated tools to improve overall watching anime experience. It comprises of 3 projects, but unfortunately, 2 of them are discontinued due to lack of maintainability. If you are interested in this application, please check out \"Universal Anime Downloader\" in my Github Page. In the past few months, I also curious about Minecraft mod development, so I also have a quick dive into Java programming language and created a program called \"MineCLIA\" or Minecraft Command Line Automation. It lets you send commands to Minecraft client via command line or socket. Check it out on my GitHub page.",
                Link          = "https://github.com/quangaming2929",
            };

            Contributors.Add(tachiProfile);

            FeatureModel fbWoHassle = new FeatureModel()
            {
                Glyph  = "\uE899",
                Title  = "Quickly feedback without hassle",
                Detail = "Fschool auto feedback windows 10 edition help you feedback without the need to painstakingly go through each teacher. You can feedback all teacher with a few simple click"
            };

            FeatureModel fbSpeed = new FeatureModel()
            {
                Glyph  = "\uEC4A",
                Title  = "Blazing fast speed",
                Detail = "With batch feedback, you can feedback all teacher significantly faster when you feedback on the offical website. Fschool auto feedback windows 10 edition can feedback 10 teachers per second after you hit send (actual speed may vary)"
            };

            FeatureModel fbLogin = new FeatureModel()
            {
                Glyph  = "\uE779",
                Title  = "Login with ease",
                Detail = "Unlike fschool.fpt.edu.vn where you need to login each time you visit the site. This program only requires you to login once, all the authorization is done automatically until you sign out or revoke the program access"
            };

            FeatureModel fbUsability = new FeatureModel()
            {
                Glyph  = "\uE8CB",
                Title  = "Advanced filtering",
                Detail = "Fschool Autofeedback windows 10 edition is highly customizable. You can search teacher like in offical website but you also can filter, exclude who will be feedback. Save a draft to feedback later,...  "
            };

            Features.Add(fbWoHassle);
            Features.Add(fbSpeed);
            Features.Add(fbLogin);
            Features.Add(fbUsability);
        }
Exemplo n.º 14
0
        public ProjectRegistration(Project project)
        {
            Name        = project.Name;
            OldName     = project.Name;
            Description = project.Description;
            Owner       = project.Owner;

            foreach (var item in project.UserProjects)
            {
                Contributors.Add(item.User);
            }

            foreach (var item in project.ProjectCategories)
            {
                Categories.Add(item.Category);
            }
        }
Exemplo n.º 15
0
 /// <summary>
 /// Add a writer to the comic book
 /// </summary>
 /// <param name="Writer">The writer's name</param>
 public void AddConstributor(Contributor contributor)
 {
     Contributors.Add(contributor);
 }
Exemplo n.º 16
0
        /// <summary>
        ///   This needs to be called after anything in the model is changed.
        /// </summary>
        public void SyncFromModel()
        {
            // this pulls down information from the Model element into the atom item.
            Id          = Model.CanonicalName;
            Title       = new TextSyndicationContent(Model.CosmeticName);
            Summary     = new TextSyndicationContent(Model.PackageDetails.SummaryDescription);
            PublishDate = Model.PackageDetails.PublishDate;
            Authors.Clear();
            Contributors.Clear();
            Categories.Clear();
            Links.Clear();

            if (Model.PackageDetails.Publisher != null)
            {
                Authors.Add(CreatePerson().With(a => {
                    a.Name  = Model.PackageDetails.Publisher.Name;
                    a.Email = Model.PackageDetails.Publisher.Email;
                    a.Uri   = Model.PackageDetails.Publisher.Location == null ? string.Empty : Model.PackageDetails.Publisher.Location.ToString();
                }));
            }
            if (!Model.PackageDetails.Contributors.IsNullOrEmpty())
            {
                foreach (var c in Model.PackageDetails.Contributors)
                {
                    var contributor = c;
                    Contributors.Add(CreatePerson().With(a => {
                        a.Name  = contributor.Name;
                        a.Email = contributor.Email;
                        a.Uri   = contributor.Location == null ? string.Empty : contributor.Location.ToString();
                    }));
                }
            }

            if (!string.IsNullOrEmpty(Model.PackageDetails.CopyrightStatement))
            {
                Copyright = new TextSyndicationContent(Model.PackageDetails.CopyrightStatement);
            }

            if (!Model.PackageDetails.Tags.IsNullOrEmpty())
            {
                foreach (var tag in Model.PackageDetails.Tags)
                {
                    Categories.Add(new SyndicationCategory(tag, "/Tags", tag));
                }
            }

            if (!Model.PackageDetails.Categories.IsNullOrEmpty())
            {
                foreach (var category in Model.PackageDetails.Categories)
                {
                    Categories.Add(new SyndicationCategory(category, "/Categories", category));
                }
            }

            if (Model.PackageDetails.Description != null)
            {
                Content = SyndicationContent.CreateHtmlContent(Model.PackageDetails.Description);
            }

            if (!Model.Locations.IsNullOrEmpty())
            {
                foreach (var l in Model.Locations)
                {
                    var location = l;
                    Links.Add(CreateLink().With(link => {
                        link.RelationshipType = "enclosure";
                        link.MediaType        = "application/package";
                        link.Uri   = location;
                        link.Title = Model.Name;
                    }));

                    Links.Add(CreateLink().With(link => {
                        link.Uri = location;
                    }));
                }
            }
            // and serialize that out.
            ElementExtensions.Add(Model, Model.XmlSerializer);
        }