Beispiel #1
0
        private void openItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            baseForm mdiParent = base.MdiParent as baseForm;

            foreach (object selectedItem in this.errorList.SelectedItems)
            {
                Errors.Item tag = ((ListViewItem)selectedItem).Tag as Errors.Item;
                mdiParent.nav.showItemProperties(tag.item);
            }
        }
Beispiel #2
0
        private void errorList_DoubleClick(object sender, EventArgs e)
        {
            if (this.errorList.SelectedItems.Count == 0)
            {
                return;
            }
            baseForm mdiParent = base.MdiParent as baseForm;

            Errors.Item tag = this.errorList.SelectedItems[0].Tag as Errors.Item;
            mdiParent.nav.showItemProperties(tag.item);
        }
Beispiel #3
0
 public static void addError(Error type, GameData.Item item, string mod, string text = null)
 {
     Errors.Item item1 = new Errors.Item()
     {
         info  = text,
         item  = item,
         mod   = mod,
         state = 0,
         type  = type
     };
     Errors.instance.errors.Add(item1);
 }
Beispiel #4
0
        private void ignoreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GameData mdiParent = (base.MdiParent as baseForm).nav.ou.gameData;

            foreach (ListViewItem selectedItem in this.errorList.SelectedItems)
            {
                Errors.Item tag = selectedItem.Tag as Errors.Item;
                if (tag.item == null)
                {
                    continue;
                }
                tag.state = 1;
                this.setState(selectedItem, "ignored");
                selectedItem.ImageIndex = -1;
            }
        }
Beispiel #5
0
        private void removeReferences_Click(object sender, EventArgs e)
        {
            navigation mdiParent = (base.MdiParent as baseForm).nav;

            foreach (ListViewItem selectedItem in this.errorList.SelectedItems)
            {
                Errors.Item tag = selectedItem.Tag as Errors.Item;
                int         num = tag.item.removeInvalidReferences();
                if (num <= 0)
                {
                    continue;
                }
                tag.item  = null;
                tag.state = 4;
                this.setState(selectedItem, string.Concat("removed ", num, " references"));
                mdiParent.HasChanges = true;
            }
        }
Beispiel #6
0
        private void clearChangesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            navigation mdiParent = (base.MdiParent as baseForm).nav;

            foreach (ListViewItem selectedItem in this.errorList.SelectedItems)
            {
                Errors.Item tag = selectedItem.Tag as Errors.Item;
                if (tag.item.getState() != GameData.State.MODIFIED)
                {
                    continue;
                }
                tag.item.revert();
                tag.state = 3;
                this.setState(selectedItem, "reverted");
                mdiParent.refreshItemWindow(tag.item);
                mdiParent.HasChanges = true;
            }
        }
Beispiel #7
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GameData   mdiParent   = (base.MdiParent as baseForm).nav.ou.gameData;
            navigation _navigation = (base.MdiParent as baseForm).nav;

            foreach (ListViewItem selectedItem in this.errorList.SelectedItems)
            {
                Errors.Item tag = selectedItem.Tag as Errors.Item;
                if (tag.item == null)
                {
                    continue;
                }
                _navigation.closeItemProperties(tag.item);
                mdiParent.deleteItem(tag.item);
                tag.item  = null;
                tag.state = 2;
                this.setState(selectedItem, "deleted");
                _navigation.HasChanges = true;
            }
        }