public override void LoadFromAutoCat(AutoCat autoCat)
        {
            AutoCatGenre ac = autoCat as AutoCatGenre;

            if (ac == null)
            {
                return;
            }

            chkRemoveExisting.Checked = ac.RemoveOtherGenres;
            chkTagFallback.Checked    = ac.TagFallback;
            numMaxCats.Value          = ac.MaxCategories;
            txtPrefix.Text            = ac.Prefix;

            foreach (ListViewItem item in lstIgnore.Items)
            {
                item.Checked = !ac.IgnoredGenres.Contains(item.Text);
            }
        }
Beispiel #2
0
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            AutoCatLanguage ac = autoCat as AutoCatLanguage;

            if (ac == null)
            {
                return;
            }

            ac.Prefix = txtPrefix.Text;

            ac.IncludeTypePrefix = chkIncludeTypePrefix.Checked;
            ac.TypeFallback      = chkTypeFallback.Checked;

            ac.IncludedLanguages.Interface.Clear();
            ac.IncludedLanguages.Subtitles.Clear();
            ac.IncludedLanguages.FullAudio.Clear();

            foreach (ListViewItem i in lstInterface.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedLanguages.Interface.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstSubtitles.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedLanguages.Subtitles.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstFullAudio.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedLanguages.FullAudio.Add(i.Text);
                }
            }
        }
Beispiel #3
0
        public override void LoadFromAutoCat(AutoCat autoCat)
        {
            if (!(autoCat is AutoCatTags ac))
            {
                return;
            }

            txtPrefix.Text   = ac.Prefix ?? string.Empty;
            numMaxTags.Value = ac.MaxTags;

            list_numMinScore.Value        = ac.List_MinScore;
            list_numTagsPerGame.Value     = ac.List_TagsPerGame;
            list_chkOwnedOnly.Checked     = ac.List_OwnedOnly;
            list_numWeightFactor.Value    = (decimal)ac.List_WeightFactor;
            list_chkExcludeGenres.Checked = ac.List_ExcludeGenres;

            FillTagsList(ac.IncludedTags);

            loaded = true;
        }
Beispiel #4
0
        public override void LoadFromAutoCat(AutoCat autoCat)
        {
            AutoCatUserScore acScore = autoCat as AutoCatUserScore;

            if (autoCat == null)
            {
                return;
            }

            txtPrefix.Text            = acScore.Prefix;
            chkUseWilsonScore.Checked = acScore.UseWilsonScore;

            ruleList.Clear();
            foreach (UserScoreRule rule in acScore.Rules)
            {
                ruleList.Add(new UserScoreRule(rule));
            }

            UpdateEnabledSettings();
        }
Beispiel #5
0
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            AutoCatFlags ac = autoCat as AutoCatFlags;

            if (ac == null)
            {
                return;
            }

            ac.Prefix = txtPrefix.Text;

            ac.IncludedFlags.Clear();
            foreach (ListViewItem i in lstIncluded.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedFlags.Add(i.Text);
                }
            }
        }
Beispiel #6
0
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            AutoCatCurator ac = autoCat as AutoCatCurator;

            if (ac == null)
            {
                return;
            }

            ac.CategoryName = txtCategoryName.Text;
            ac.CuratorUrl   = txtCuratorUrl.Text;

            ac.IncludedRecommendations.Clear();
            foreach (ListViewItem i in lstIncluded.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedRecommendations.Add((CuratorRecommendation)Enum.Parse(typeof(CuratorRecommendation), i.Tag.ToString()));
                }
            }
        }
Beispiel #7
0
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            AutoCatVrSupport ac = autoCat as AutoCatVrSupport;

            if (ac == null)
            {
                return;
            }

            ac.Prefix = txtPrefix.Text;

            ac.IncludedVRSupportFlags.Headsets.Clear();
            ac.IncludedVRSupportFlags.Input.Clear();
            ac.IncludedVRSupportFlags.PlayArea.Clear();

            foreach (ListViewItem i in lstVrHeadsets.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVRSupportFlags.Headsets.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstVrInput.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVRSupportFlags.Input.Add(i.Text);
                }
            }

            foreach (ListViewItem i in lstVrPlayArea.Items)
            {
                if (i.Checked)
                {
                    ac.IncludedVRSupportFlags.PlayArea.Add(i.Text);
                }
            }
        }
Beispiel #8
0
        public override void LoadFromAutoCat(AutoCat autoCat)
        {
            AutoCatHltb acHltb = autoCat as AutoCatHltb;
            if (acHltb == null)
            {
                return;
            }

            txtPrefix.Text = acHltb.Prefix;
            chkIncludeUnknown.Checked = acHltb.IncludeUnknown;
            txtUnknownText.Text = acHltb.UnknownText ?? string.Empty;
            acHltb.IncludeUnknown = chkIncludeUnknown.Checked;
            acHltb.UnknownText = txtUnknownText.Text;

            ruleList.Clear();
            foreach (HowLongToBeatRule rule in acHltb.Rules)
            {
                ruleList.Add(new HowLongToBeatRule(rule));
            }

            UpdateEnabledSettings();
        }
Beispiel #9
0
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            if (!(autoCat is AutoCatTags ac))
            {
                return;
            }

            ac.Prefix = txtPrefix.Text;

            ac.MaxTags = (int)numMaxTags.Value;

            ac.IncludedTags = new HashSet <string>();
            foreach (ListViewItem i in lstIncluded.CheckedItems)
            {
                ac.IncludedTags.Add(i.Tag as string);
            }

            ac.List_MinScore      = (int)list_numMinScore.Value;
            ac.List_OwnedOnly     = list_chkOwnedOnly.Checked;
            ac.List_TagsPerGame   = (int)list_numTagsPerGame.Value;
            ac.List_WeightFactor  = (float)list_numWeightFactor.Value;
            ac.List_ExcludeGenres = list_chkExcludeGenres.Checked;
        }
        public override void SaveToAutoCat(AutoCat autoCat)
        {
            AutoCatGenre ac = autoCat as AutoCatGenre;

            if (ac == null)
            {
                return;
            }

            ac.Prefix            = txtPrefix.Text;
            ac.MaxCategories     = (int)numMaxCats.Value;
            ac.RemoveOtherGenres = chkRemoveExisting.Checked;
            ac.TagFallback       = chkTagFallback.Checked;

            ac.IgnoredGenres.Clear();
            foreach (ListViewItem i in lstIgnore.Items)
            {
                if (!i.Checked)
                {
                    ac.IgnoredGenres.Add(i.Text);
                }
            }
        }
Beispiel #11
0
 public virtual void SaveToAutoCat(AutoCat autoCat)
 {
 }
Beispiel #12
0
 public virtual void LoadFromAutoCat(AutoCat autoCat)
 {
 }
        public override void LoadFromAutoCat(AutoCat autoCat)
        {
            AutoCatManual ac = autoCat as AutoCatManual;

            if (ac == null)
            {
                return;
            }

            chkRemoveAll.Checked = ac.RemoveAllCategories;
            txtPrefix.Text       = ac.Prefix;

            lstRemove.BeginUpdate();

            List <string> found = new List <string>();

            foreach (ListViewItem item in lstRemove.Items)
            {
                item.Checked = ac.RemoveCategories.Contains(item.Name);
                found.Add(item.Name);
            }

            lstRemove.EndUpdate();

            foreach (string s in ac.RemoveCategories)
            {
                if (!found.Contains(s))
                {
                    ListViewItem l = new ListViewItem
                    {
                        Text = s,
                        Name = s
                    };
                    clbRemoveSelected.Items.Add(l, true);
                }
            }

            lstAdd.BeginUpdate();
            found = new List <string>();
            foreach (ListViewItem item in lstAdd.Items)
            {
                item.Checked = ac.AddCategories.Contains(item.Name);
                found.Add(item.Name);
            }

            lstAdd.EndUpdate();

            foreach (string s in ac.AddCategories)
            {
                if (!found.Contains(s))
                {
                    ListViewItem l = new ListViewItem
                    {
                        Text = s,
                        Name = s
                    };
                    clbAddSelected.Items.Add(l, true);
                }
            }

            UpdateRemoveCount();
            UpdateAddCount();

            loaded = true;
        }