示例#1
0
        /// <summary>
        /// 新增字段
        /// </summary>
        private static bool AddFieldsCommand(EntityConfig entity)
        {
            var window = new NewEntityWindow();
            var vm     = (NewEntityViewModel)window.DataContext;

            vm.Model.Entity = entity;
            vm.Title        = "新增字段";
            var dl = window.ShowDialog();

            return(dl != null && dl.Value);
        }
示例#2
0
        /// <summary>
        /// 新增实体的方法(UI后期实现)
        /// </summary>
        private static EntityConfig AddFieldsCommand()
        {
            var window = new NewEntityWindow();
            var vm     = (NewEntityViewModel)window.DataContext;

            if (window.ShowDialog() != true)
            {
                return(null);
            }
            GlobalTrigger.OnCreate(vm.Model.Entity);
            return(vm.Model.Entity);
        }