Beispiel #1
0
    private void Start()
    {
        float soundLength;

        if (openingSound != null)
        {
            soundLength = openingSound.length;
        }
        door1OpenedPosition = door1.position + door1.right * (1.32f);
        door1ClosedPosition = door1.position;
        door2OpenedPosition = door2.position + door2.right * (1.32f);
        door2ClosedPosition = door2.position;

        if (needKey)
        {
            _itemReceiver = gameObject.AddComponent <ItemReceiver>();
            _itemReceiver.expectedItem = keyName;
            _unlocked = false;
        }
        else
        {
            _unlocked = true;
        }

        if (hasSwitch)
        {
            switchScript = linkedSwitch.GetComponent <Switch>();
            _activated   = false;
        }
        else
        {
            _activated = true;
        }
    }
        private void ReceiverPutaway_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
        {
            TargetViewId = "ItemReceiver_ReceiptofGoods_PutAway";
            IObjectSpace objectSpace = Application.CreateObjectSpace();
            //ItemReceiver IR = objectSpace.CreateObject<ItemReceiver>();
            ItemReceiver IR = objectSpace.GetObject <ItemReceiver>((ItemReceiver)View.CurrentObject);

            //   IObjectSpace objectSpace = Application.CreateObjectSpace();

            // ItemReceiver note = objectSpace.CreateObject<ItemReceiver>();

            IR.PutAwayBy       = SecuritySystem.CurrentUserName;
            IR.PutawayDateTime = DateTime.Now;


            //e.View = Application.CreateDetailView(objectSpace, TargetViewId, true, note);
            //e.View.Caption = e.View.Caption + " - " + note.Customers.CustomerName;

            //Shippers SE = SE = objectSpace.FindObject<Shippers>(new BinaryOperator("ShipperId", SecuritySystem.CurrentUserName));
            //if (SE != null)
            //{
            //    IR.DistributionCenterWhse = SE.DefaultWhse;
            //           }


            e.View = Application.CreateDetailView(objectSpace, TargetViewId, true, IR);
            //// e.View.Caption = e.View.Caption + " - " + IR.ItemNumber;
            ////e.Size = new Size(1000, 1000);
        }
 private void Start()
 {
     _opening = false;
     if (needKey)
     {
         _itemReceiver = gameObject.AddComponent <ItemReceiver>();
         _itemReceiver.expectedItem = keyName;
         _unlocked = false;
     }
     audioSource = gameObject.AddComponent <AudioSource>();
     pivot       = transform.GetChild(0);
 }
        private void ReceiverPutaway_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            e.PopupWindow.View.ObjectSpace.CommitChanges();
            IObjectSpace objectSpace = Application.CreateObjectSpace();
            ItemReceiver IR          = objectSpace.GetObject <ItemReceiver>((ItemReceiver)View.CurrentObject);

            IR.ReceiverStatus = ItemReceiverStatus.Completed;
            IR.Save();
            objectSpace.CommitChanges();

            View.ObjectSpace.Refresh();
            View.Refresh();
        }
Beispiel #5
0
 private void Start()
 {
     openedPosition = transform.position + new Vector3(0, 3f, 0);
     closedPosition = transform.position;
     if (needKey)
     {
         _itemReceiver = gameObject.AddComponent <ItemReceiver>();
         _itemReceiver.expectedItem = keyName;
         _unlocked = false;
     }
     else
     {
         _unlocked = true;
     }
 }
        private void ItemReceiver_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
        {
            TargetViewId = "ItemReceiver_ReceiptofGoods";

            IObjectSpace objectSpace = Application.CreateObjectSpace();
            ItemReceiver IR          = objectSpace.CreateObject <ItemReceiver>();
            Shippers     SE          = SE = objectSpace.FindObject <Shippers>(new BinaryOperator("ShipperId", SecuritySystem.CurrentUserName));

            if (SE != null)
            {
                IR.DistributionCenterWhse = SE.DefaultWhse;
            }

            e.View = Application.CreateDetailView(objectSpace, TargetViewId, true, IR);

            // e.View.Caption = e.View.Caption + " - " + IR.ItemNumber;
            //e.Size = new Size(1000, 1000);
        }
    public void OnEndDrag(ItemReceiver itemReceiver = null)
    {
        if (!_is_drag)
        {
            return;
        }

        _is_drag = false;
        _item_holder.OnEndDrag(itemReceiver);

        if (itemReceiver != null)
        {
            Deactivate();
        }
        else
        {
            _canvas_group.blocksRaycasts = true;
            _mover.Move(_drag_transform.InverseTransformPoint(_original_transform.position), true, 0.25f);
        }
    }
 public void OnEndDrag(ItemReceiver itemReceiver)
 {
     _is_capture      = false;
     border_img.color = idle_color;
 }
 public void OnEndDrag(ItemReceiver itemReceiver)
 {
     border_img.color = idle_color;
 }