예제 #1
0
 private void ddlDisciplineLevel_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlDisciplineLevel.SelectedIndex != -1)
     {
         txtDisciplineDescription.Rtf = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Disciplines/Discipline[@Name = '" + lblActiveDiscipline.Text + "']/Sub[@LevelName = '" + ddlDisciplineLevel.SelectedItem + "']/Description").Value);
     }
 }
예제 #2
0
        private void lblAuspiceAbility_Click(object sender, EventArgs e)
        {
            XPathNavigator xAuspiceNav = xAuspiceDoc.CreateNavigator().SelectSingleNode(String.Format("Covenants/Template[@Name='Werewolf']/Covenant[@Name='{0}']/Ability", Player.Covenant));

            lblActiveGift.Text     = xAuspiceNav.SelectSingleNode("@Name").Value;
            txtGiftDescription.Rtf = RtfHelper.PlainTextToRtf(xAuspiceNav.SelectSingleNode("Description").Value);
            imgGift.Image          = Properties.Resources.WerewolfForsakenBox;
        }
예제 #3
0
 private void SelectDevotion(string lvDevotion)
 {
     pnlDiscDesc.Visible          = true;
     ddlDisciplineLevel.Visible   = false;
     lblActiveDiscipline.Text     = lvDevotion;
     txtDisciplineDescription.Rtf = RtfHelper.PlainTextToRtf(devNav.SelectSingleNode(String.Format("Devotions/Devotion[@Name='{0}']/Description", lvDevotion)).Value);
     imgDiscipline.ImageLocation  = Properties.Settings.Default.DataLocation + "Discipline_Images/" + devNav.SelectSingleNode("Devotions/Devotion[@Name = '" + lvDevotion + "']/Image").Value;;
 }
예제 #4
0
 private void DescribeRote(string display, string image)
 {
     nav = cvArcanaXml.CreateNavigator().SelectSingleNode("Arcanum/Arcana/Rote[@Name='" + display + "']");
     lblActiveRote.Text     = display;
     imgRote.ImageLocation  = cvRoteImagesFolder + image;
     txtRoteDescription.Rtf = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Description").Value);
     pnlRoteDesc.Visible    = true;
 }
예제 #5
0
        public ItemDisplay()
        {
            InitializeComponent();

            lblActiveItem.Text = ItemName;
            lblCost.Text       = Cost.ToString();
            lblSize.Text       = ItemSize.ToString();

            gridDetails.Rows.Clear();

            if (Scope != null)
            {
                gridDetails.Rows.Add("Scope", Scope);
            }
            if (Damage_Prim != null)
            {
                gridDetails.Rows.Add("Primary", Damage_Prim);
            }
            if (Damage_Sec != null)
            {
                gridDetails.Rows.Add("Secondary", Damage_Sec);
            }
            if (Capacity != null)
            {
                gridDetails.Rows.Add("Capacity", Capacity);
            }
            if (Range != null)
            {
                gridDetails.Rows.Add("Range", Range);
            }
            if (Def_General > 0)
            {
                gridDetails.Rows.Add("General", Def_General.ToString());
            }
            if (Def_Ballistic > 0)
            {
                gridDetails.Rows.Add("Ballistic", Def_Ballistic.ToString());
            }
            if (Durability > 0)
            {
                gridDetails.Rows.Add("Durability", Durability.ToString());
            }
            if (Structure > 0)
            {
                gridDetails.Rows.Add("Structure", Structure.ToString());
            }

            gridDetails.ColumnHeadersVisible = false;

            txtDesc.Rtf           = RtfHelper.PlainTextToRtf(Description);
            imgItem.ImageLocation = Properties.Settings.Default.DataLocation + @"Item_Images\" + Image;
        }
예제 #6
0
        private void riteOnClick(object sender, EventArgs e)
        {
            string lvName = ((Label)sender).Text;

            nav = cvRiteXml.CreateNavigator().SelectSingleNode("Rites/Rite[@Name='" + lvName + "']");

            lblActiveGift.Text     = lvName;
            txtGiftDescription.Rtf = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Description").Value);

            imgGift.ImageLocation = cvGiftImagesFolder + nav.SelectSingleNode("@Image").Value;

            pnlGiftDesc.Visible = true;
        }
예제 #7
0
 private void DescribeTrait(string pvLabel, string pvTraitType)
 {
     if (pvTraitType == "Merit")
     {
         XPathNavigator nav = lvMeritXml.CreateNavigator();
         lblMeritFlaw.Text     = pvLabel;
         txtMeritFlawDesc.Text = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Merits/Merit[@Name = '" + pvLabel + "']/Description").Value);
     }
     else if (pvTraitType == "Flaw")
     {
         XPathNavigator nav = lvFlawXml.CreateNavigator();
         lblMeritFlaw.Text     = pvLabel;
         txtMeritFlawDesc.Text = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Flaws/Flaw[@Name = '" + pvLabel + "']/Description").Value);
     }
 }
예제 #8
0
        public void cbxGift_CheckChanged(object sender, EventArgs e)
        {
            _formCreation.pnlGiftDesc.Visible = true;
            String         lvGift = ((CheckBox)sender).Text;
            XPathNavigator nav    = cvGiftsXml.CreateNavigator().SelectSingleNode($"Gifts/Gift/Sub[@Name=\"{lvGift}\"]");

            _formCreation.lblGiftName.Text        = lvGift;
            _formCreation.lblGiftAttribute.Text   = nav.SelectSingleNode("Attribute").Value;
            _formCreation.lblGiftSkill.Text       = nav.SelectSingleNode("Skill").Value;
            _formCreation.lblGiftTrait.Text       = nav.SelectSingleNode("Trait").Value;
            _formCreation.lblGiftEssenceCost.Text = nav.SelectSingleNode("Essence_Cost").Value;
            _formCreation.lblGiftWillCost.Text    = nav.SelectSingleNode("Willpower_Cost").Value;
            _formCreation.txtGiftDetail.Rtf       = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Description").Value);
            nav.MoveToParent();
            _formCreation.imgGift.ImageLocation = _Gift_Img_Folder + nav.SelectSingleNode("@Image");
        }
예제 #9
0
        private void cbxRite_CheckChanged(object sender, EventArgs e)
        {
            _formCreation.pnlRiteDesc.Visible = true;
            String         lvRite = ((CheckBox)sender).Text;
            XPathNavigator nav    = cvRitesXml.CreateNavigator().SelectSingleNode($"Rites/Rite[@Name='{lvRite}']");

            _formCreation.lblRiteName.Text      = lvRite;
            _formCreation.lblRiteAttribute.Text = nav.SelectSingleNode("Attribute").Value;
            _formCreation.lblRiteSkill.Text     = nav.SelectSingleNode("Skill") != null?nav.SelectSingleNode("Skill").Value : "";

            _formCreation.lblRiteDivider.Text = nav.SelectSingleNode("Divider") != null?nav.SelectSingleNode("Divider").Value : "";

            _formCreation.lblRiteEssenceCost.Text = nav.SelectSingleNode("Essence_Cost").Value;
            _formCreation.txtRitePerform.Rtf      = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Perform").Value);
            _formCreation.txtRiteDesc.Rtf         = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Description").Value);
            _formCreation.imgGift.ImageLocation   = _Gift_Img_Folder + nav.SelectSingleNode("@Image");
        }
예제 #10
0
        public VehicleDisplay()
        {
            InitializeComponent();

            lblActiveVehicle.Text    = _Name;
            lblCost.Text             = _Cost.ToString();
            lblSize.Text             = _Size.ToString();
            lblDurability.Text       = _Durability.ToString();
            lblStucture.Text         = _Structure.ToString();
            lblAcceleration.Text     = _Acceleration.ToString();
            lblMaxSpeed.Text         = _Speed.ToString();
            lblSafeSpeed.Text        = _Safe_Speed.ToString();
            lblHandling.Text         = _Handling.ToString();
            lblOccupancy.Text        = _Occupancy.ToString();
            lblCapacity.Text         = _Capacity.ToString();
            txtDesc.Rtf              = RtfHelper.PlainTextToRtf(_Description);
            imgVehicle.ImageLocation = Properties.Settings.Default.DataLocation + @"Vehicle_Images\" + _Image;
        }
예제 #11
0
        private void LoadDevotionDetail(XPathNavigator nav)
        {
            _formCreation.lblDevotionName.Text       = nav.SelectSingleNode("@Name").Value;
            _formCreation.lblDevotionAttr.Text       = nav.SelectSingleNode("Attribute").Value;
            _formCreation.lblDevotionSkill.Text      = nav.SelectSingleNode("Skill").Value;
            _formCreation.lblDevotionVitae.Text      = nav.SelectSingleNode("Vitae_Cost").Value;
            _formCreation.lblDevotionWill.Text       = nav.SelectSingleNode("Willpower_Cost").Value;
            _formCreation.lblDevotionDiscipline.Text = nav.SelectSingleNode("Discipline").Value;
            _formCreation.imgDevotion.ImageLocation  = _Disc_Img_Folder + nav.SelectSingleNode("Image").Value;
            _formCreation.pnlDevotionDetail.Visible  = true;

            if (Player.Name != null)
            {
                XPathNodeIterator prereqIter = nav.Select("Prerequisite/Discipline");
                string            rtf        = RtfHelper.Begin();

                while (prereqIter.MoveNext())
                {
                    int discIndex = 99;
                    if (Player.Discipline.TryGetValue(prereqIter.Current.Value, out discIndex) && discIndex != 99)
                    {
                        RtfHelper.ConvertText(ref rtf, prereqIter.Current.Value + ":" + prereqIter.Current.SelectSingleNode("@Level"));
                        RtfHelper.EndLine(ref rtf);
                    }
                    else
                    {
                        RtfHelper.Bold(ref rtf, prereqIter.Current.Value + ":" + prereqIter.Current.SelectSingleNode("@Level"));
                        RtfHelper.EndLine(ref rtf);
                    }
                }
                RtfHelper.EndLine(ref rtf);

                RtfHelper.ConvertText(ref rtf, nav.SelectSingleNode("Description").Value);
                RtfHelper.End(ref rtf);

                _formCreation.txtDevotionDescription.Rtf = rtf;
            }
            else
            {
                _formCreation.txtDevotionDescription.Rtf = RtfHelper.PlainTextToRtf(nav.SelectSingleNode("Description").Value);
            }
        }
예제 #12
0
        private void SetInfo(XPathNavigator xNav)
        {
            CharacterUpdate.RemoveBoosts(Global.CharacterFolder + Player.Name + ".xml", _boostSource);

            txtTraits.Clear();
            XPathNodeIterator xNodeIter = xNav.SelectSingleNode("Traits").SelectChildren(XPathNodeType.All);

            while (xNodeIter.MoveNext())
            {
                txtTraits.Text += xNodeIter.Current.Name + " - " + xNodeIter.Current.Value + " : " + xNodeIter.Current.SelectSingleNode("@Value").Value;
                txtTraits.Text += Environment.NewLine;

                CharacterUpdate.AddBoost(Global.CharacterFolder + Player.Name + ".xml", _boostSource, xNodeIter.Current.Name, xNodeIter.Current.Value, xNodeIter.Current.SelectSingleNode("@Value").Value);
            }

            txtDescription.Clear();
            txtDescription.Rtf = RtfHelper.PlainTextToRtf(xNav.SelectSingleNode("Description").Value);

            imgForm.ImageLocation = Properties.Settings.Default.DataLocation + @"Form_Images\" + xNav.SelectSingleNode("Image").Value;

            txtDescription.Refresh();
            txtTraits.Refresh();
            imgForm.Refresh();
        }