예제 #1
0
        /* Create new */
        private void newInstance_Click(object sender, EventArgs e)
        {
            Form newInstanceForm = new Form();

            switch (loadedType)
            {
            case ManagerType.PROPS:
                newInstanceForm = new PropEditor(-1);
                break;

            case ManagerType.TILES:
                newInstanceForm = new TileEditor(-1);
                break;
            }
            newInstanceForm.FormClosed += new FormClosedEventHandler(ReloadList);
            newInstanceForm.Show();
        }
예제 #2
0
        /* Edit selected */
        private void editInstance_Click(object sender, EventArgs e)
        {
            if (instanceList.SelectedIndex == -1)
            {
                return;
            }
            Form editInstanceForm = new Form();

            switch (loadedType)
            {
            case ManagerType.PROPS:
                editInstanceForm = new PropEditor(instanceList.SelectedIndex);
                break;

            case ManagerType.TILES:
                editInstanceForm = new TileEditor(instanceList.SelectedIndex);
                break;
            }
            editInstanceForm.FormClosed += new FormClosedEventHandler(ReloadList);
            editInstanceForm.Show();
        }