Esempio n. 1
0
 private void ChangeItemBtn_Click(object sender, EventArgs e)
 {
     if (this.SelectedParcel != null)
     {
         if (this.SelectedParcel.MagicItemID != Guid.Empty)
         {
             int num = this.SelectedParcel.FindItemLevel();
             if (num != -1)
             {
                 MagicItemSelectForm magicItemSelectForm = new MagicItemSelectForm(num);
                 if (magicItemSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     this.SelectedParcel.SetAsMagicItem(magicItemSelectForm.MagicItem);
                     Session.Modified = true;
                     this.update_list();
                 }
             }
         }
         if (this.SelectedParcel.ArtifactID != Guid.Empty)
         {
             ArtifactSelectForm artifactSelectForm = new ArtifactSelectForm();
             if (artifactSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 this.SelectedParcel.SetAsArtifact(artifactSelectForm.Artifact);
                 Session.Modified = true;
                 this.update_list();
             }
         }
     }
 }
Esempio n. 2
0
        private void ChangeItemBtn_Click(object sender, EventArgs e)
        {
            if (SelectedParcel != null)
            {
                if (SelectedParcel.MagicItemID != Guid.Empty)
                {
                    int level = SelectedParcel.FindItemLevel();
                    if (level != -1)
                    {
                        MagicItemSelectForm dlg = new MagicItemSelectForm(level);
                        if (dlg.ShowDialog() == DialogResult.OK)
                        {
                            SelectedParcel.SetAsMagicItem(dlg.MagicItem);
                        }
                    }
                }
                else if (SelectedParcel.ArtifactID != Guid.Empty)
                {
                    ArtifactSelectForm dlg = new ArtifactSelectForm();
                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        SelectedParcel.SetAsArtifact(dlg.Artifact);
                    }
                }

                update_parcels();
            }
        }
Esempio n. 3
0
        private void ChangeItemBtn_Click(object sender, EventArgs e)
        {
            if ((Parcel != null) && (Parcel.MagicItemID != Guid.Empty))
            {
                int       level = 0;
                MagicItem item  = Session.FindMagicItem(Parcel.MagicItemID, SearchType.Global);
                if (item != null)
                {
                    level = item.Level;
                }
                else
                {
                    int index = Treasure.PlaceholderIDs.IndexOf(Parcel.MagicItemID);
                    if (index != -1)
                    {
                        level = index + 1;
                    }
                }

                if (level > 0)
                {
                    MagicItemSelectForm dlg = new MagicItemSelectForm(level);
                    if (dlg.ShowDialog() == DialogResult.OK)
                    {
                        Parcel.SetAsMagicItem(dlg.MagicItem);
                        Session.Modified = true;

                        update_list();
                    }
                }
            }
        }
Esempio n. 4
0
 private void ChangeItemBtn_Click(object sender, EventArgs e)
 {
     if (this.Parcel != null && this.Parcel.MagicItemID != Guid.Empty)
     {
         int       level     = 0;
         MagicItem magicItem = Session.FindMagicItem(this.Parcel.MagicItemID, SearchType.Global);
         if (magicItem == null)
         {
             int num = Treasure.PlaceholderIDs.IndexOf(this.Parcel.MagicItemID);
             if (num != -1)
             {
                 level = num + 1;
             }
         }
         else
         {
             level = magicItem.Level;
         }
         if (level > 0)
         {
             MagicItemSelectForm magicItemSelectForm = new MagicItemSelectForm(level);
             if (magicItemSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 this.Parcel.SetAsMagicItem(magicItemSelectForm.MagicItem);
                 Session.Modified = true;
                 this.update_list();
             }
         }
     }
 }
Esempio n. 5
0
        private void ParcelAddItem_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm dlg = new MagicItemSelectForm(Session.Project.Party.Level);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fPoint.Parcels.Add(new Parcel(dlg.MagicItem));
                update_parcels();
            }
        }
        private void OptionsVariant_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm magicItemSelectForm = new MagicItemSelectForm(this.fMagicItem.Level);

            if (magicItemSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fMagicItem    = magicItemSelectForm.MagicItem.Copy();
                this.fMagicItem.ID = Guid.NewGuid();
                this.update_statblock();
            }
        }
Esempio n. 7
0
        private void OptionsVariant_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm dlg = new MagicItemSelectForm(fMagicItem.Level);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fMagicItem    = dlg.MagicItem.Copy();
                fMagicItem.ID = Guid.NewGuid();

                update_statblock();
            }
        }
Esempio n. 8
0
        private void AddMagicItem_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm magicItemSelectForm = new MagicItemSelectForm(Session.Project.Party.Level);

            if (magicItemSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Parcel parcel = new Parcel(magicItemSelectForm.MagicItem);
                Session.Project.TreasureParcels.Add(parcel);
                Session.Modified = true;
                this.update_list();
            }
        }
Esempio n. 9
0
        private void ChangeToMagicItem_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm magicItemSelectForm = new MagicItemSelectForm(this.fParcel.FindItemLevel());

            if (magicItemSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.fParcel.SetAsMagicItem(magicItemSelectForm.MagicItem);
                this.NameBox.Text    = this.fParcel.Name;
                this.DetailsBox.Text = this.fParcel.Details;
                this.set_controls();
            }
        }
Esempio n. 10
0
        private void AddMagicItem_Click(object sender, EventArgs e)
        {
            MagicItemSelectForm dlg = new MagicItemSelectForm(Session.Project.Party.Level);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                Parcel parcel = new Parcel(dlg.MagicItem);

                Session.Project.TreasureParcels.Add(parcel);
                Session.Modified = true;

                update_list();
            }
        }
Esempio n. 11
0
        private void ChangeToMagicItem_Click(object sender, EventArgs e)
        {
            // Browse for another item
            MagicItemSelectForm dlg = new MagicItemSelectForm(fParcel.FindItemLevel());

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fParcel.SetAsMagicItem(dlg.MagicItem);

                NameBox.Text    = fParcel.Name;
                DetailsBox.Text = fParcel.Details;

                set_controls();
            }
        }