Пример #1
0
 private void button_ClearSpilth_Click(object sender, EventArgs e)
 {
     DialogResult res = MessageBox.Show("即将清除冗余图形元素,合并重复图形元素,将丢失原来布局,确定操作?", "警告:", MessageBoxButtons.YesNo);
     if (res.Equals(DialogResult.Yes))
     {
         currentTile_Gfx = null;
         //setFocusTile_Gfx(-1);
         currentGfxContainer.ClearSpilth(true);
         updateContainer_Gfx_Buffer();
     }
 }
Пример #2
0
 //添加单个地图元素
 private void button_addOne_Gfx_Click(object sender, EventArgs e)
 {
     form_MapImagesManager.MClipsManager = currentGfxContainer;
     form_MapImagesManager.initParams(null);
     form_MapImagesManager.ShowDialog();
     if (form_MapImagesManager.currentClipElemnt != null)
     {
         TileGfxElement newElement = new TileGfxElement(currentGfxContainer);
         newElement.copyBase(form_MapImagesManager.currentClipElemnt);
         if (currentTile_Gfx == null)
         {
             currentGfxContainer.Add(newElement);
         }
         else
         {
             currentGfxContainer.Insert(newElement, currentTile_Gfx.GetID());
         }
     }
     updateContainer_Gfx_Buffer();
 }
Пример #3
0
 //设置焦点地图图形单元
 public void setFocusTile_Gfx(int index)
 {
     TileGfxElement oldEment = currentTile_Gfx;
     TileGfxElement element = (TileGfxElement)currentGfxContainer[index];
     //if (elemn != null)
     //{
     currentTile_Gfx = element;
     if ((oldEment != null && !oldEment.Equals(currentTile_Gfx))||
         (currentTile_Gfx != null && !currentTile_Gfx.Equals(oldEment)))
     {
         TSB_autoTile.Checked = false;
     }
     showCurrentTileGfxInf();
     //}
 }
Пример #4
0
 public void setCurrentGfxContainer(int index)
 {
     if (index < 0 || index >= comboBox_GfxType.Items.Count)
     {
         return;
     }
     this.noListBoxEvent = true;
     comboBox_GfxType.SelectedIndex = index;
     this.noListBoxEvent = false;
     currentGfxContainer = mapsManager.tileGfxManager[index];
     currentTile_Gfx = null;
     updateContainer_Gfx_Buffer();
 }