addRecord() public method

public addRecord ( int t, int op ) : void
t int
op int
return void
示例#1
0
        private void btnInsertRow_Click(object sender, System.EventArgs e)
        {
            int todo = tilesetViewer.TilesWide - (vsp.tileCount % tilesetViewer.TilesWide);

            if (todo == 0)
            {
                todo = tilesetViewer.TilesWide;
            }

            int startInsert = vsp.tileCount;

            Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);

            Operations.OperationManager om = Global.opManager;
            om.beginGroup("VSP Manager: Insert Row");

            for (int i = 0; i < todo; i++)
            {
                artg.addRecord(startInsert, 0);
            }

            om.addExec(artg);
            om.endGroup();

            updateScrollbar();
            tilesetViewer.Invalidate();
        }
示例#2
0
 private void btnInsertTile_Click(object sender, System.EventArgs e)
 {
     Operations.OperationManager om = Global.opManager;
     om.beginGroup("VSP Manager: Insert Tile");
     Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);
     artg.addRecord(Global.ActiveVsp.tileCount, 0);
     om.addExec(artg);
     om.endGroup();
     updateScrollbar();
     tilesetViewer.Invalidate();
 }
示例#3
0
        private void btnDeleteRow_Click(object sender, System.EventArgs e)
        {
            int toDelete = vsp.tileCount % tilesetViewer.TilesWide;

            if (toDelete == 0)
            {
                toDelete = tilesetViewer.TilesWide;
            }
            if (vsp.tileCount == 0)
            {
                toDelete = 0;
            }

            if (toDelete == 0)
            {
                return;
            }

            int startDelete = (vsp.tileCount / tilesetViewer.TilesWide) * tilesetViewer.TilesWide;

            if (toDelete == tilesetViewer.TilesWide)
            {
                startDelete -= tilesetViewer.TilesWide;
            }
            Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);

            Operations.OperationManager om = Global.opManager;
            om.beginGroup("VSP Manager: Delete Row");

            for (int i = 0; i < toDelete; i++)
            {
                artg.addRecord(startDelete, 1);
            }

            om.addExec(artg);
            om.endGroup();

            updateScrollbar();
            tilesetViewer.Invalidate();
        }
示例#4
0
文件: EditVsp.cs 项目: zeromus/maped3
 private void btnInsertTile_Click(object sender, System.EventArgs e)
 {
     Operations.OperationManager om = Global.opManager;
     om.beginGroup("VSP Manager: Insert Tile");
     Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);
     artg.addRecord(Global.ActiveVsp.tileCount, 0);
     om.addExec(artg);
     om.endGroup();
     updateScrollbar();
     tilesetViewer.Invalidate();
 }
示例#5
0
文件: EditVsp.cs 项目: zeromus/maped3
        private void btnInsertRow_Click(object sender, System.EventArgs e)
        {
            int todo = tilesetViewer.TilesWide - (vsp.tileCount % tilesetViewer.TilesWide);
            if (todo == 0)
                todo = tilesetViewer.TilesWide;

            int startInsert = vsp.tileCount;
            Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);

            Operations.OperationManager om = Global.opManager;
            om.beginGroup("VSP Manager: Insert Row");

            for (int i = 0; i < todo; i++)
                artg.addRecord(startInsert, 0);

            om.addExec(artg);
            om.endGroup();

            updateScrollbar();
            tilesetViewer.Invalidate();
        }
示例#6
0
文件: EditVsp.cs 项目: zeromus/maped3
        private void btnDeleteRow_Click(object sender, System.EventArgs e)
        {
            int toDelete = vsp.tileCount % tilesetViewer.TilesWide;
            if (toDelete == 0)
                toDelete = tilesetViewer.TilesWide;
            if (vsp.tileCount == 0)
                toDelete = 0;

            if (toDelete == 0)
                return;

            int startDelete = (vsp.tileCount / tilesetViewer.TilesWide) * tilesetViewer.TilesWide;
            if (toDelete == tilesetViewer.TilesWide)
                startDelete -= tilesetViewer.TilesWide;
            Ops.AddRemoveTilesGroup artg = new Ops.AddRemoveTilesGroup(0);

            Operations.OperationManager om = Global.opManager;
            om.beginGroup("VSP Manager: Delete Row");

            for (int i = 0; i < toDelete; i++)
                artg.addRecord(startDelete, 1);

            om.addExec(artg);
            om.endGroup();

            updateScrollbar();
            tilesetViewer.Invalidate();
        }