Beispiel #1
0
            protected override bool OnPerform()
            {
                CASPuck puck = CASPuck.Instance;

                if (puck == null)
                {
                    return(true);
                }

                if (puck.mAcceptButton != null)
                {
                    ICASModel cASModel = Sims3.UI.Responder.Instance.CASModel;
                    if ((cASModel.CASMode == CASMode.Full) && !cASModel.EditingExistingSim())
                    {
                        puck.mAcceptButton.Click -= puck.OnAcceptHousehold;
                        puck.mAcceptButton.Click -= OnAcceptHousehold;
                        puck.mAcceptButton.Click += OnAcceptHousehold;
                    }
                }

                CASFamilyScreen familyScreen = CASFamilyScreen.gSingleton;

                if (familyScreen != null)
                {
                    Window topLevel = familyScreen.mFamilyTopLevelWin;

                    uint       index = 0;
                    WindowBase child = topLevel.GetChildByIndex(index);
                    while (child != null)
                    {
                        CAFThumb thumb = child as CAFThumb;
                        if (thumb != null)
                        {
                            thumb.DragDrop -= familyScreen.OnCAFThumbDragDrop;
                            thumb.DragDrop -= OnCAFThumbDragDrop;
                            thumb.DragDrop += OnCAFThumbDragDrop;
                        }

                        index++;
                        child = topLevel.GetChildByIndex(index);
                    }
                }

                return(true);
            }