示例#1
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", lang, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            Script.DataBindings.Clear();
            Script.DataBindings.Add("Text", lang, "Skript", true, DataSourceUpdateMode.OnPropertyChanged);
            Speakers.DataBindings.Clear();
            Speakers.DataBindings.Add("Text", lang, "TypicalSpeakers", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", lang, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", lang, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            ImageChanged?.Invoke(this, lang.GetImage());
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(lang.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#2
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", race, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            flavour.DataBindings.Clear();
            NewlineFormatter.Add(flavour.DataBindings, "Text", race, "Flavour", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", race, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", race, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            features1.features        = race.Features;
            decriptions1.descriptions = race.Descriptions;
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(race.ToHTML());
            ParentRace.DataBindings.Clear();
            ParentRace.DataBindings.Add("Text", race, "RaceName", true, DataSourceUpdateMode.OnPropertyChanged);
            ImageChanged?.Invoke(this, race.GetImage());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#3
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", cls, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            flavour.DataBindings.Clear();
            NewlineFormatter.Add(flavour.DataBindings, "Text", cls, "Flavour", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", cls, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", cls, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            features1.features        = cls.Features;
            decriptions1.descriptions = cls.Descriptions;
            traits.DataSource         = new BindingList <TableEntry>(cls.PersonalityTrait);
            ideal.DataSource          = new BindingList <TableEntry>(cls.Ideal);
            bond.DataSource           = new BindingList <TableEntry>(cls.Bond);
            flaw.DataSource           = new BindingList <TableEntry>(cls.Flaw);
            ImageChanged?.Invoke(this, cls.GetImage());
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(cls.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#4
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", spell, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", spell, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", spell, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            Level.DataBindings.Clear();
            Level.DataBindings.Add("Value", spell, "Level", true, DataSourceUpdateMode.OnPropertyChanged);
            CastingTime.DataBindings.Clear();
            CastingTime.DataBindings.Add("Text", spell, "CastingTime", true, DataSourceUpdateMode.OnPropertyChanged);
            Range.DataBindings.Clear();
            Range.DataBindings.Add("Text", spell, "Range", true, DataSourceUpdateMode.OnPropertyChanged);
            Duration.DataBindings.Clear();
            Duration.DataBindings.Add("Text", spell, "Duration", true, DataSourceUpdateMode.OnPropertyChanged);
            dataGridView1.DataSource  = new BindingList <CantripDamage>(spell.CantripDamage);
            keywordControl1.Keywords  = spell.Keywords;
            decriptions1.descriptions = spell.Descriptions;
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(spell.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#5
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", skill, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            Ability.Items.Clear();
            foreach (Ability a in Enum.GetValues(typeof(Ability)))
            {
                if (a != OGL.Base.Ability.None)
                {
                    Ability.Items.Add(a, skill.Base.HasFlag(a));
                }
            }
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", skill, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", skill, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(skill.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#6
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", cls, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            SheetName.DataBindings.Clear();
            SheetName.DataBindings.Add("Text", cls, "SheetName", true, DataSourceUpdateMode.OnPropertyChanged);
            flavour.DataBindings.Clear();
            NewlineFormatter.Add(flavour.DataBindings, "Text", cls, "Flavour", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", cls, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", cls, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            ParentClass.DataBindings.Clear();
            ParentClass.DataBindings.Add("Text", cls, "ClassName", true, DataSourceUpdateMode.OnPropertyChanged);
            features1.features          = cls.Features;
            featuresFirstClass.features = cls.FirstClassFeatures;
            featuresMultiClass.features = cls.MulticlassingFeatures;
            decriptions1.descriptions   = cls.Descriptions;
            ImageChanged.Invoke(this, cls.GetImage());
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(cls.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            MulticlassSpellLevels.Items = cls.MulticlassingSpellLevels;
            onChange();
            doHistory = oldHistory;
        }
示例#7
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", cls, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            flavour.DataBindings.Clear();
            NewlineFormatter.Add(flavour.DataBindings, "Text", cls, "Flavour", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", cls, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", cls, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            HD.DataBindings.Clear();
            HD.DataBindings.Add("Value", cls, "HitDie", true, DataSourceUpdateMode.OnPropertyChanged);
            HDCount.DataBindings.Clear();
            HDCount.DataBindings.Add("Value", cls, "HitDieCount", true, DataSourceUpdateMode.OnPropertyChanged);
            HDAverage.DataBindings.Clear();
            HDAverage.DataBindings.Add("Value", cls, "AverageHPPerLevel", true, DataSourceUpdateMode.OnPropertyChanged);
            HDFirst.DataBindings.Clear();
            HDFirst.DataBindings.Add("Value", cls, "HPFirstLevel", true, DataSourceUpdateMode.OnPropertyChanged);
            MulticlassCond.DataBindings.Clear();
            MulticlassCond.DataBindings.Add("Text", cls, "MulticlassingCondition", true, DataSourceUpdateMode.OnPropertyChanged);
            Prestige.DataBindings.Clear();
            Prestige.DataBindings.Add("Checked", cls, "AvailableAtFirstLevel", true, DataSourceUpdateMode.OnPropertyChanged);
            features1.features          = cls.Features;
            featuresFirstClass.features = cls.FirstClassFeatures;
            featuresMultiClass.features = cls.MulticlassingFeatures;
            classFeats.Items            = cls.FeaturesToAddClassKeywordTo;
            classSpells.Items           = cls.SpellsToAddClassKeywordTo;
            ImageChanged?.Invoke(this, cls.GetImage());
            decriptions1.descriptions = cls.Descriptions;
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(cls.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#8
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", cls, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            Requirement.DataBindings.Clear();
            Requirement.DataBindings.Add("Text", cls, "Requirement", true, DataSourceUpdateMode.OnPropertyChanged);
            Description.DataBindings.Clear();
            NewlineFormatter.Add(Description.DataBindings, "Text", cls, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", cls, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            Base.DataBindings.Clear();
            Base.DataBindings.Add("Text", cls, "Base", true, DataSourceUpdateMode.OnPropertyChanged);
            Slot.DataBindings.Clear();
            Slot.DataBindings.Add("SelectedItem", cls, "Slot", true, DataSourceUpdateMode.OnPropertyChanged);
            Rarity.DataBindings.Clear();
            Rarity.DataBindings.Add("SelectedItem", cls, "Rarity", true, DataSourceUpdateMode.OnPropertyChanged);
            PreName.DataBindings.Clear();
            PreName.DataBindings.Add("Text", cls, "PrependName", true, DataSourceUpdateMode.OnPropertyChanged);
            PostName.DataBindings.Clear();
            PostName.DataBindings.Add("Text", cls, "PostName", true, DataSourceUpdateMode.OnPropertyChanged);
            Attuned.features         = cls.AttunementFeatures;
            Equipped.features        = cls.EquipFeatures;
            Carried.features         = cls.CarryFeatures;
            OnUse.features           = cls.OnUseFeatures;
            AttunedOnUse.features    = cls.AttunedOnUseFeatures;
            AttunedEquipped.features = cls.AttunedEquipFeatures;
            ImageChanged?.Invoke(this, cls.GetImage());
            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(cls.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }
示例#9
0
        private void refresh()
        {
            bool oldHistory = doHistory;

            doHistory = false;
            name.DataBindings.Clear();
            name.DataBindings.Add("Text", monster, "Name", true, DataSourceUpdateMode.OnPropertyChanged);
            flavour.DataBindings.Clear();
            NewlineFormatter.Add(flavour.DataBindings, "Text", monster, "Flavour", true, DataSourceUpdateMode.OnPropertyChanged);

            size.DataBindings.Clear();
            size.DataBindings.Add("SelectedItem", monster, "Size", true, DataSourceUpdateMode.OnPropertyChanged);
            source.DataBindings.Clear();
            source.DataBindings.Add("Text", monster, "Source", true, DataSourceUpdateMode.OnPropertyChanged);
            description.DataBindings.Clear();
            NewlineFormatter.Add(description.DataBindings, "Text", monster, "Description", true, DataSourceUpdateMode.OnPropertyChanged);
            decriptions1.descriptions = monster.Descriptions;
            ImageChanged?.Invoke(this, monster.GetImage());

            Alignment.DataBindings.Clear();
            Alignment.DataBindings.Add("Text", monster, "Alignment", true, DataSourceUpdateMode.OnPropertyChanged);
            ACText.DataBindings.Clear();
            ACText.DataBindings.Add("Text", monster, "ACText", true, DataSourceUpdateMode.OnPropertyChanged);
            AC.DataBindings.Clear();
            AC.DataBindings.Add("Value", monster, "AC", true, DataSourceUpdateMode.OnPropertyChanged);
            HPRoll.DataBindings.Clear();
            HPRoll.DataBindings.Add("Text", monster, "HPRoll", true, DataSourceUpdateMode.OnPropertyChanged);
            HP.DataBindings.Clear();
            HP.DataBindings.Add("Value", monster, "HP", true, DataSourceUpdateMode.OnPropertyChanged);

            Strength.DataBindings.Clear();
            Strength.DataBindings.Add("Value", monster, "Strength", true, DataSourceUpdateMode.OnPropertyChanged);
            Dexterity.DataBindings.Clear();
            Dexterity.DataBindings.Add("Value", monster, "Dexterity", true, DataSourceUpdateMode.OnPropertyChanged);
            Constitution.DataBindings.Clear();
            Constitution.DataBindings.Add("Value", monster, "Constitution", true, DataSourceUpdateMode.OnPropertyChanged);
            Intelligence.DataBindings.Clear();
            Intelligence.DataBindings.Add("Value", monster, "Intelligence", true, DataSourceUpdateMode.OnPropertyChanged);
            Wisdom.DataBindings.Clear();
            Wisdom.DataBindings.Add("Value", monster, "Wisdom", true, DataSourceUpdateMode.OnPropertyChanged);
            Charisma.DataBindings.Clear();
            Charisma.DataBindings.Add("Value", monster, "Charisma", true, DataSourceUpdateMode.OnPropertyChanged);

            PassivePerception.DataBindings.Clear();
            PassivePerception.DataBindings.Add("Value", monster, "PassivePerception", true, DataSourceUpdateMode.OnPropertyChanged);

            CR.DataBindings.Clear();
            CR.DataBindings.Add("Value", monster, "CR", true, DataSourceUpdateMode.OnPropertyChanged);
            XP.DataBindings.Clear();
            XP.DataBindings.Add("Value", monster, "XP", true, DataSourceUpdateMode.OnPropertyChanged);

            Resistances.Items         = monster.Resistances;
            Vulnerablities.Items      = monster.Vulnerablities;
            Immunities.Items          = monster.Immunities;
            ConditionImmunities.Items = monster.ConditionImmunities;
            Keywords.Keywords         = monster.Keywords;
            Speeds.Items    = monster.Speeds;
            Senses.Items    = monster.Senses;
            Languages.Items = monster.Languages;
            Spells.Items    = monster.Spells;
            Slots.Items     = monster.Slots;

            monsterSkill1.Items = monster.SkillBonus;
            monsterSave1.Items  = monster.SaveBonus;

            Traits.Traits           = monster.Traits;
            Actions.Traits          = monster.Actions;
            Reactions.Traits        = monster.Reactions;
            LegendaryActions.Traits = monster.LegendaryActions;

            preview.Navigate("about:blank");
            preview.Document.OpenNew(true);
            preview.Document.Write(monster.ToHTML());
            preview.Refresh();
            source.AutoCompleteCustomSource.Clear();
            source.AutoCompleteCustomSource.AddRange(SourceManager.Sources.ToArray());
            onChange();
            doHistory = oldHistory;
        }