Exemplo n.º 1
0
        public void LVODoubleClick()
        {
            if (Core.Editor.f.listViewO.SelectedItems.Count == 0)
            {
                return;
            }
            int        id     = Convert.ToInt32(Core.Editor.f.listViewO.SelectedItems[0].Text);
            var        obj    = Core.Map.Objects.Find(o => o.ID == id);
            ObjectForm f_edit = new ObjectForm(obj);

            f_edit.ShowDialog();
            if (f_edit.success)
            {
                Core.Editor.SetUndo(2);
                obj = f_edit.obj;
                UpdateLVOSingle(obj.ID);
                Core.Editor.RefreshMap();
            }
            f_edit.Dispose();
        }
Exemplo n.º 2
0
        public void LVOMapDoubleClick()
        {
            var list = GetSelectedObject();

            if (list.Count == 0)
            {
                return;
            }
            var        obj    = list[0];
            ObjectForm f_edit = new ObjectForm(obj);

            f_edit.ShowDialog();
            if (f_edit.success)
            {
                Core.Editor.SetUndo(2);
                obj = f_edit.obj;
                UpdateLVOSingle(obj.ID);
                Core.Editor.RefreshMap();
            }
            f_edit.Dispose();
        }