Esempio n. 1
0
        public LockedPermissions(IPrimFactory factory, IConfigSource config, IPrim host, Control.Impl.Module.Control control)
        {
            _ownerID = UUID.Zero;
            _host    = host;
            IConfig controlConfig = config.Configs["Control"];
            double  fade          = controlConfig.GetDouble("LockFade", control.Fade);
            double  glow          = controlConfig.GetDouble("LockGlow", control.ToggleGlow);

            _lockWait   = controlConfig.GetInt("ControlsLockTimeout", 300000);
            _lockToggle = new Toggle(factory.MakeButton("Lock", new LockPermissions(this)), fade, glow);

            _lockToggle.OnToggledOn  += (source, args) => SetCurrentOwner(args.ID, args.Name);
            _lockToggle.OnToggledOff += (source, args) => {
                _ownerID = UUID.Zero;
                _host.Say(_ownerName + " relinquished control of sandbox.");
                JM726.Lib.Static.Util.Wake(this);
            };
            _lockToggle.OnTouched += (source, args) => {
                if (_Locked && !args.AvatarID.Equals(_ownerID))
                {
                    _host.Say("Unable to take control of sandbox. Sandbox is currently locked to '" + _ownerName + "'.");
                }
            };
        }
 public SequenceTopologyManager(IConfig config, Control.Impl.Module.Control control)
     : base(config, control)
 {
     _control = control;
 }