public void ReadImageFromFile()//加载照片 { var bl = SilverlightLFC.common.Environment.getEnvironment().OpenImage(); if (bl == null || bl.Result == null || bl.Result.Count == 0) { return; } var v = bl.Result.FirstOrDefault(); if (v == null) { return; } //PhotoLayers.Children.Clear(); if (SelectLayer == null) { PhotoLayer pl = new PhotoLayer(); PhotoLayers.Children.Add(pl); SelectLayer = pl; //return; } SelectLayer.setPhoto(WriteableBitmapHelper.Clone(v), ScalePercent); setClip(); //SelectLayer.setScale(ScalePercent); }
public void selectChangeEnemy() { if (enemyeditcontroller.is_loadnow == false) { selectlayer = SelectLayer.ENEMY; } }
public void Paste()//粘贴 { //CameraTestDesktop d = CameraTestDesktop.getDesktop(); //PhotoLayer pl = new PhotoLayer(); //pl.Photo.Source = PhotoEditManager.Paste(); if (SelectLayer == null) { return; } SelectLayer.setPhoto(PhotoEditManager.Paste(), ScalePercent); }
private void startEditingToolStripMenuItem_Click(object sender, EventArgs e) { SelectLayer selectLayer = new SelectLayer(this, axMapControl1.Map); if (selectLayer.ShowDialog() == DialogResult.OK) { sEditLayerName = selectLayer.getLayerName(); miStartEditing.Enabled = false; miStopEditing.Enabled = true; } }
public void EntriesLayer() { var doc = Application.DocumentManager.MdiActiveDocument; var ed = doc.Editor; try { var selectedObjects = ed.SelectImplied(); if (selectedObjects.Value == null) { var pso = new PromptSelectionOptions { MessageForAdding = $"\n{Language.GetItem(LangItem, "msg2")}", MessageForRemoval = "\n", AllowSubSelections = false, AllowDuplicates = false }; var psr = ed.GetSelection(pso); if (psr.Status != PromptStatus.OK) { return; } selectedObjects = psr; } if (selectedObjects.Value.Count > 0) { var selectLayerWin = new SelectLayer(); if (selectLayerWin.ShowDialog() == true && selectLayerWin.LbLayers.SelectedIndex != -1) { var selectedLayer = (SelectLayer.SelLayer)selectLayerWin.LbLayers.SelectedItem; using (var tr = doc.TransactionManager.StartTransaction()) { foreach (SelectedObject so in selectedObjects.Value) { var selEnt = tr.GetObject(so.ObjectId, OpenMode.ForRead); if (selEnt is BlockReference blockReference) { ChangeLayer(blockReference.BlockTableRecord, selectedLayer.LayerId); } } tr.Commit(); } ed.Regen(); } } } catch (System.Exception exception) { ExceptionBox.Show(exception); } }
public void Copy()//把图片复制到剪贴板 { //CameraTestDesktop d = CameraTestDesktop.getDesktop(); if (SelectLayer == null) { if (PhotoLayers.Children.Count == 0) { return; } SelectLayer = PhotoLayers.Children[0] as PhotoLayer; } PhotoEditManager.Copy(WriteableBitmapHelper.Clone(SelectLayer.getPhoto())); }
void Update() { if (currentlayer == selectlayer) { return; } // 描画順番変更 prevCanvas(); // 選択を消す create_selectable_blocks.selectClear(); // レイヤーが変わったらspriteを読み込みなおす mapedit_controller.changeLayerLoadSprites(); // 今のレイヤー変更 currentlayer = selectlayer; }
public void selectChangeEvent() { selectlayer = SelectLayer.EVENT; }
public void selectChangeObject() { selectlayer = SelectLayer.OBJECT; }
public void selectChangeWall() { selectlayer = SelectLayer.WALL; }
public void selectChangeDoor() { selectlayer = SelectLayer.DOOR; }
// ボタン押されたら各自呼び出されるinspector最強 public void selectChangeFloor() { selectlayer = SelectLayer.FLOOR; }