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(); } }
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(); } } } }
private void ParcelAddArtifact_Click(object sender, EventArgs e) { ArtifactSelectForm dlg = new ArtifactSelectForm(); if (dlg.ShowDialog() == DialogResult.OK) { fPoint.Parcels.Add(new Parcel(dlg.Artifact)); update_parcels(); } }
private void AddArtifact_Click(object sender, EventArgs e) { ArtifactSelectForm artifactSelectForm = new ArtifactSelectForm(); if (artifactSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Parcel parcel = new Parcel(artifactSelectForm.Artifact); Session.Project.TreasureParcels.Add(parcel); Session.Modified = true; this.update_list(); } }
private void ChangeToArtifact_Click(object sender, EventArgs e) { ArtifactSelectForm artifactSelectForm = new ArtifactSelectForm(); if (artifactSelectForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.fParcel.SetAsArtifact(artifactSelectForm.Artifact); this.NameBox.Text = this.fParcel.Name; this.DetailsBox.Text = this.fParcel.Details; this.set_controls(); } }
private void AddArtifact_Click(object sender, EventArgs e) { ArtifactSelectForm dlg = new ArtifactSelectForm(); if (dlg.ShowDialog() == DialogResult.OK) { Parcel parcel = new Parcel(dlg.Artifact); Session.Project.TreasureParcels.Add(parcel); Session.Modified = true; update_list(); } }
private void ChangeToArtifact_Click(object sender, EventArgs e) { // Browse for another artifact ArtifactSelectForm dlg = new ArtifactSelectForm(); if (dlg.ShowDialog() == DialogResult.OK) { fParcel.SetAsArtifact(dlg.Artifact); NameBox.Text = fParcel.Name; DetailsBox.Text = fParcel.Details; set_controls(); } }