Ejemplo n.º 1
0
        public void SetElementOperation_Create(ElementCreateInfo info)
        {
            var user = Program.UserMgr.GetLoginUserInfo(OperationContext.Current);

            if (user != null)
            {
                var vi = user.LoginInfo.SpecificViewportInfo;
                Program.UserMgr.UserOperations.PushOperation(new UserOperation_Create(user.AccountID, vi, info));
                Program.UserMgr.PushNotification(new UserNotification_SetGroupUserOperation_Create(user, info));
            }
        }
            private MethodCall CreateMethodCall(FunctionSignatureCache signatureCache)
            {
                var createInfo = new ElementCreateInfo(Host, null, null, null, null);
                var methodCall = MocCommonMethodCall.Create(createInfo);

                methodCall.Target = AssociatedEnvoy.MakeRelativeDependencyName();
                if (signatureCache != null)
                {
                    methodCall.Bounds = new NationalInstruments.Core.SMRect(methodCall.Left, methodCall.Top, signatureCache.Width, signatureCache.Height);
                }
                CreateTerminals(methodCall, signatureCache);
                return(methodCall);
            }
        // 合作组员创建元素
        public void SetGroupUserOperation_Create(long userId, ElementCreateInfo info)
        {
            var vi  = ProjectDoc.Instance.SelectedViewportInfo;
            var rg  = ProjectDoc.Instance.ResourceGroups[info.ResKind];
            var res = rg.GetResourceInfo(info.ResPathFile);

            if (res == null)
            {
                MessageController.PushMessage(MessageLevel.警告, MessageType.任务操作, Color.Red, "未能找到所需的同步资源:" + info.ResPathFile);
            }
            else
            {
                var e = ElementInfo.CreateElement(res, vi, new System.Drawing.PointF(0, 0));
                e.GUID      = info.GUID;
                e.CreatorId = userId;
                e.BaseTrans.Copy(info.TransInfo);
                e.ManualScaleOnSrcBackImage = info.ManualScaleOnSrcBackImage;
                vi.AddElement(e);
            }
        }
Ejemplo n.º 4
0
 protected override Task <Element> CreateElementAsync(ElementCreateInfo createInfo)
 {
     return(Task.FromResult <Element>(BasicNode.Create(createInfo)));
 }
Ejemplo n.º 5
0
 public UserOperation_Create(long userId, ViewportInfo vi, ElementCreateInfo info)
     : base(userId, vi)
 {
     Info = info;
 }
Ejemplo n.º 6
0
 public UserNotification_SetGroupSystemOperation_Create(ProjectReferrencer targetRefer, ElementInfo ei)
     : base(targetRefer.UserIDs)
 {
     CreateInfo = new ElementCreateInfo(ei);
 }
Ejemplo n.º 7
0
 public UserNotification_SetGroupUserOperation_Create(ServerLoginUserInfo user, ElementCreateInfo info)
     : base(user)
 {
     CreateInfo = info;
 }