コード例 #1
0
ファイル: InboxController.cs プロジェクト: terrynoya/FreeSO
        public InboxController(UIInbox view, IClientDataService dataService, IDatabaseService database, Network.Network net)
        {
            this.View            = view;
            this.DataService     = dataService;
            this.DatabaseService = database;
            this.Network         = net;

            this.InboxStore = UIMessageStore.Store;
            try
            {
                InboxStore.Load((int)net.MyCharacter);
            } catch
            {
                //oops, we couldnt load the local data...
                //assuming it failed anywhere, it will download from server as if timestamp were 0.
            }

            this.Network.CityClient.AddSubscriber(this);

            Network.CityClient.Write(new MailRequest
            {
                Type        = MailRequestType.POLL_INBOX, //we're ready to recieve any pending roommate requests
                TimestampID = InboxStore.LastMessageTime
            });

            GameThread.NextUpdate(x =>
            {
                View.UpdateInbox();
            });
        }
コード例 #2
0
        public UITop10Pedestal()
        {
            DataService = FSOFacade.Kernel.Get <IClientDataService>();
            var ui = Content.Content.Get().CustomUI;

            TileFill = ui.Get("neighp_tilefill.png").Get(GameFacade.GraphicsDevice);
            TileTop  = ui.Get("neighp_tiletop.png").Get(GameFacade.GraphicsDevice);
            TileBtm  = ui.Get("neighp_tilebtm.png").Get(GameFacade.GraphicsDevice);

            SetGraphics(false);

            Sim = new UISim();
            Sim.Avatar.BodyOutfitId = 2611340115981;
            Sim.Avatar.HeadOutfitId = 5076651343885;
            Sim.Size       = new Microsoft.Xna.Framework.Vector2(64, 80);
            Sim.AutoRotate = true;
            Sim.Position   = new Vector2(-32, (-80) + 16);
            this.Add(Sim);

            User = new Binding <Avatar>()
                   .WithBinding(this, "AvatarTooltip", "Avatar_Name")
                   .WithBinding(this, "Sim.Avatar.HeadOutfitId", "Avatar_Appearance.AvatarAppearance_HeadOutfitID")
                   .WithBinding(this, "Sim.Avatar.BodyOutfitId", "Avatar_Appearance.AvatarAppearance_BodyOutfitID")
                   .WithBinding(this, "Sim.Avatar.Appearance", "Avatar_Appearance.AvatarAppearance_SkinTone", (x) => {
                if (x == null)
                {
                    return(Vitaboy.AppearanceType.Light);
                }
                return((Vitaboy.AppearanceType)((byte)(x)));
            });

            Property = new Binding <Lot>()
                       .WithBinding(this, "LotTooltip", "Lot_Name");
        }
コード例 #3
0
 public ClientDetailController(
     IClientDataService iclientDataService,
     IEntityBaseRepository <Error> _errorsRepository, IUnitOfWork _unitOfWork)
     : base(_errorsRepository, _unitOfWork)
 {
     _iclientDataService = iclientDataService;
 }
コード例 #4
0
        public UILotThumbButtonAuto()
        {
            DataService = FSOFacade.Kernel.Get <IClientDataService>();

            Property = new Binding <Lot>()
                       .WithBinding(this, "LotName", "Lot_Name");
        }
コード例 #5
0
 public AdminAPIController()
 {
     adminDataService       = new AdminDataService();
     applicationDataService = new ApplicationDataService();
     userDataService        = new UserDataService();
     clientDataService      = new ClientDataService();
 }
コード例 #6
0
        public UIBigPersonButton()
        {
            NormalImg   = GetTexture(0x83E00000001);
            HoverImg    = GetTexture(0x83F00000001);
            PressedImg  = GetTexture(0xCF200000001);
            DisabledImg = GetTexture(0xCEE00000001);
            DataService = FSOFacade.Kernel.Get <IClientDataService>();
            MainButton  = new UIButton(NormalImg)
            {
                Size = new Microsoft.Xna.Framework.Vector2(114, 169)
            };
            Add(MainButton);

            User = new Binding <Avatar>()
                   .WithBinding(this, "AvatarName", "Avatar_Name")
                   .WithBinding(this, "Sim.Avatar.HeadOutfitId", "Avatar_Appearance.AvatarAppearance_HeadOutfitID")
                   .WithBinding(this, "Sim.Avatar.BodyOutfitId", "Avatar_Appearance.AvatarAppearance_BodyOutfitID")
                   .WithBinding(this, "Sim.Avatar.Appearance", "Avatar_Appearance.AvatarAppearance_SkinTone", (x) => (Vitaboy.AppearanceType)((byte)(x ?? (byte)0)));

            Sim            = new UISim();
            Sim.Size       = new Vector2(80, 150);
            Sim.Position   = new Vector2(17, 13);
            Sim.AutoRotate = true;
            Add(Sim);

            //m_TooltipHandler = UIUtils.GiveTooltip(this);

            MainButton.OnButtonClick += _Button_OnButtonClick;
        }
コード例 #7
0
ファイル: UIMapWaypoint.cs プロジェクト: RHY3756547/FreeSO
        public UIMapWaypoint(UIMapWaypointStyle style)
        {
            DataService = FSOFacade.Kernel.Get <IClientDataService>();
            Style       = style;
            var network = FSOFacade.Kernel.Get <Network.Network>();

            MyAvatar = new Binding <Avatar>();
            MyLot    = new Binding <Lot>();
            switch (style)
            {
            case UIMapWaypointStyle.YouAreHere:     // pinkish backgound
                BgImg = GetTexture((ulong)UIFileIDs.youarehereback);
                break;

            case UIMapWaypointStyle.YourHouseHere:
                BgImg = GetTexture((ulong)UIFileIDs.yourhousehereback);
                DataService.Get <Avatar>(network.MyCharacter).ContinueWith(x =>
                {
                    MyAvatar.Value = x.Result;
                    if (x.Result != null && x.Result.Avatar_LotGridXY != 0 && (MyLot.Value == null || MyLot.Value.Lot_Location_Packed != x.Result.Avatar_LotGridXY))
                    {
                        DataService.Request(MaskedStruct.AdmitInfo_Lot, x.Result.Avatar_LotGridXY).ContinueWith(y =>
                        {
                            MyLot.Value = (Lot)y.Result;
                        });
                    }
                });
                break;
            }
            ClickHandler =
                ListenForMouse(new Rectangle(0, 0, SizeW, SizeH), new UIMouseEvent(OnMouseEvent));
        }
コード例 #8
0
 public TransactionLogoCalculator(string connectionString, Dictionary <string, Logo> logoOverrides)
 {
     _connectionString        = connectionString;
     _transactionsDataService = new FinanceAPIMongoDataService.DataService.TransactionsDataService(_connectionString);
     _clientDataService       = new FinanceAPIMongoDataService.DataService.ClientDataService(_connectionString);
     _logoOverrides           = logoOverrides;
 }
コード例 #9
0
ファイル: UILotButton.cs プロジェクト: JDrocks450/FreeSO
        public UILotButton()
        {
            DataService = FSOFacade.Kernel.Get <IClientDataService>();

            NameLabel                   = new UILabel();
            NameLabel.Y                 = 52;
            NameLabel.X                 = 2;
            NameLabel.Alignment         = TextAlignment.Center;
            NameLabel.Size              = new Vector2(76, 40);
            NameLabel.CaptionStyle      = NameLabel.CaptionStyle.Clone();
            NameLabel.CaptionStyle.Size = 9;
            NameLabel.Wrapped           = true;
            Add(NameLabel);

            Target = new Binding <Lot>()
                     .WithBinding(this, "NameLabel.Caption", "Lot_Name")
                     .WithBinding(this, "BgImg", "Lot_IsOnline", x =>
            {
                var online = (bool)x;
                return(GetTexture((ulong)((online) ? 0xC000000002 : 0xC200000002)));
            })
                     .WithBinding(this, "HoverImg", "Lot_IsOnline", x =>
            {
                var online = (bool)x;
                return(GetTexture((ulong)((online) ? 0xC100000002 : 0xC300000002)));
            });
            m_TooltipHandler = UIUtils.GiveTooltip(this);

            ClickHandler =
                ListenForMouse(new Rectangle(0, 0, 80, 50), new UIMouseEvent(OnMouseEvent));
        }
コード例 #10
0
ファイル: RegisterUI.cs プロジェクト: bek15071991/Dental
 public RegisterUI(IClientDataService clientDataService,
                   ICredentialDataService credentialDataService,
                   IMapper mapper)
 {
     _clientDataService     = clientDataService;
     _credentialDataService = credentialDataService;
     _mapper = mapper;
 }
コード例 #11
0
ファイル: GizmoController.cs プロジェクト: jwofles/ForkSO
        public GizmoController(UIGizmo view, Network.Network network, IClientDataService dataService)
        {
            this.Gizmo       = view;
            this.Network     = network;
            this.DataService = dataService;

            Initialize();
        }
コード例 #12
0
 public LotAdmitController(UIAdmitBanPanel view, IClientDataService dataService, Network.Network network)
 {
     Network     = network;
     DataService = dataService;
     View        = view;
     Binding     = new Binding <Lot>().WithBinding(View, "Mode", "Lot_LotAdmitInfo.LotAdmitInfo_AdmitMode")
                   .WithMultiBinding(x => { RefreshResults(); }, "Lot_LotAdmitInfo.LotAdmitInfo_AdmitList", "Lot_LotAdmitInfo.LotAdmitInfo_BanList");
     Init();
 }
コード例 #13
0
        public BookmarksController(UIBookmarks view, IClientDataService dataService, Network.Network network)
        {
            this.Network     = network;
            this.DataService = dataService;
            this.View        = view;
            this.Binding     = new Binding <Avatar>().WithMultiBinding(x => { RefreshResults(); }, "Avatar_BookmarksVec");

            Init();
        }
コード例 #14
0
        public PersonPageController(UIPersonPage view, IClientDataService dataService, Network.Network network)
        {
            this.View        = view;
            this.DataService = dataService;
            this.Network     = network;
            Topic            = dataService.CreateTopicSubscription();

            Network.CityClient.AddSubscriber(this);
        }
コード例 #15
0
        public NeighPageController(UINeighPage view, IClientDataService dataService)
        {
            this.View        = view;
            this.DataService = dataService;
            this.Topic       = dataService.CreateTopicSubscription();

            ControllerUtils.BindController <RatingSummaryController>(this.View.MayorRatingBox1);
            ControllerUtils.BindController <RatingSummaryController>(this.View.MayorRatingBox2);
        }
コード例 #16
0
 public DummyProjectDataService(IDataAccess dataAccess,
                                IConfiguration configuration,
                                IClientDataService clientDataService,
                                IUserDataService userDataService)
 {
     _connectionString  = configuration.GetConnectionString("default");
     _dataAccess        = dataAccess;
     _clientDataService = clientDataService;
     _userDataService   = userDataService;
 }
コード例 #17
0
        public GizmoTop100Controller(UIGizmoTop100 view, IDatabaseService databaseService, IClientDataService dataService, ITop100Domain top100, Content.GameContent content)
        {
            View            = view;
            DatabaseService = databaseService;
            DataService     = dataService;
            Domain          = top100;
            Content         = content;

            SetTab(UIGizmoTab.Property);
        }
コード例 #18
0
        public MessagingController(CoreGameScreenController game, UIMessageTray messageTray, Network.Network network, IClientDataService dataService)
        {
            this.Game = game;
            this.Tray = messageTray;
            this.Tray.SetController(this);
            this.Network     = network;
            this.DataService = dataService;

            this.Network.CityClient.AddSubscriber(this);
        }
コード例 #19
0
        //private Binding<Avatar> Binding;

        public RelationshipDialogController(UIRelationshipDialog view, IClientDataService dataService, Network.Network network, IDatabaseService database)
        {
            Network         = network;
            DataService     = dataService;
            View            = view;
            DatabaseService = database;
            //this.Binding = new Binding<Avatar>().WithMultiBinding(x => { RefreshResults(); }, "Avatar_BookmarksVec");

            //Init();
        }
コード例 #20
0
        public ClientDetailViewModel(IClientDataService clientDataService,
                                     IEventAggregator eventAggregator)
        {
            _clientDataService = clientDataService;
            _eventAggregator   = eventAggregator;
            _eventAggregator.GetEvent <OpenClientDetailViewEvent>()
            .Subscribe(OnOpenClientDetailView);

            SaveCommand = new DelegateCommand(OnSaveExecute, OnSaveCanExecute);
        }
コード例 #21
0
        //private Binding<Avatar> Binding;

        public BulletinDialogController(UIBulletinDialog view, IClientDataService dataService, Network.Network network)
        {
            this.Network     = network;
            this.DataService = dataService;
            this.View        = view;
            //this.Binding = new Binding<Avatar>().WithMultiBinding(x => { RefreshResults(); }, "Avatar_BookmarksVec");

            this.Actions = UIScreen.Current.FindController <CoreGameScreenController>()?.BulletinProtocol;

            //Init();
        }
コード例 #22
0
        public MainPageViewModel(IClientDataService clientDataService,
                                 INavigationService navigationService)
        {
            _clientDataService = clientDataService ?? throw new ArgumentNullException(nameof(clientDataService));
            _navigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService));
            Title     = "Clients";
            BeginText = "Dit is een test text";
            Clients   = _clientDataService.GetClients(Config.Username);

            NavigateClientCommand = new Command <Client>(async(client) => await NavigateToClient(client));
        }
コード例 #23
0
ファイル: MainViewModel.cs プロジェクト: Rajivhost/Micromania
        public void Load(IClientDataService clientDataService)
        {
            var clients = clientDataService.GetAll();

            Clients.Clear();

            foreach (var item in clients)
            {
                Clients.Add(item);
            }
        }
コード例 #24
0
        public LotConnectionRegulator([Named("City")] AriesClient cityClient, [Named("Lot")] AriesClient lotClient, IClientDataService dataService)
        {
            this.City = cityClient;
            this.City.AddSubscriber(this);

            this.Client = lotClient;
            this.Client.AddSubscriber(this);

            this.DataService = dataService;

            City.AddSubscriber(this);

            AddState("Disconnected")
            .Transition()
            .OnData(typeof(JoinLotRequest)).TransitionTo("SelectLot")
            .Default();

            AddState("SelectLot").OnlyTransitionFrom("Disconnected");
            AddState("FindLot").OnlyTransitionFrom("SelectLot").OnData(typeof(FindLotResponse)).TransitionTo("FoundLot");
            AddState("FoundLot").OnlyTransitionFrom("FindLot");

            AddState("OpenSocket")
            .OnData(typeof(AriesConnected)).TransitionTo("SocketOpen")
            .OnData(typeof(AriesDisconnected)).TransitionTo("UnexpectedDisconnect")
            .OnlyTransitionFrom("FoundLot");

            AddState("SocketOpen")
            .OnData(typeof(RequestClientSession)).TransitionTo("RequestClientSession")
            .OnData(typeof(AriesDisconnected)).TransitionTo("UnexpectedDisconnect")
            .OnlyTransitionFrom("OpenSocket");

            AddState("RequestClientSession")
            .OnData(typeof(HostOnlinePDU)).TransitionTo("HostOnline")
            .OnData(typeof(AriesDisconnected)).TransitionTo("UnexpectedDisconnect")
            .OnlyTransitionFrom("SocketOpen");

            AddState("HostOnline").OnlyTransitionFrom("RequestClientSession");
            AddState("PartiallyConnected")
            .OnData(typeof(AriesDisconnected)).TransitionTo("UnexpectedDisconnect")
            .OnData(typeof(FSOVMTickBroadcast)).TransitionTo("LotCommandStream")
            .OnData(typeof(FSOVMDirectToClient)).TransitionTo("LotCommandStream")
            .OnlyTransitionFrom("HostOnline");

            AddState("LotCommandStream")
            .OnData(typeof(AriesDisconnected)).TransitionTo("UnexpectedDisconnect")
            .OnData(typeof(FSOVMTickBroadcast)).TransitionTo("LotCommandStream")
            .OnData(typeof(FSOVMDirectToClient)).TransitionTo("LotCommandStream");

            AddState("UnexpectedDisconnect");

            AddState("Disconnect")
            .OnData(typeof(AriesDisconnected))
            .TransitionTo("Disconnected");
        }
コード例 #25
0
        public RoommateRequestController(CoreGameScreenController game, Network.Network network, IClientDataService dataService)
        {
            this.Game        = game;
            this.Network     = network;
            this.DataService = dataService;

            this.Network.CityClient.AddSubscriber(this);

            Network.CityClient.Write(new ChangeRoommateRequest
            {
                Type = ChangeRoommateType.POLL, //we're ready to recieve any pending roommate requests
            });
        }
コード例 #26
0
        public void ValidateClient(client objClient, IClientDataService dataService)
        {
            clientDataService = dataService;

            InitializeValidationRules(objClient);

            ValidateRequired("Title", "Organization Name");
            ValidateRequired("ContactPerson", "Contact Person Name");
            ValidateRequired("Email", "Email Address");

            ValidateEmailAddress("Email", "Email Address");

            ValidateUniqueOrganization(objClient.Title);
        }
コード例 #27
0
 private static FeedColumnLayoutCollection LoadLayouts(IClientDataService dataService)
 {
     if (dataService == null)
     {
         throw new ArgumentNullException("dataService");
     }
     try
     {
         return(dataService.LoadColumnLayouts());
     } catch (Exception ex)
     {
         _log.Error("Could not load column layouts", ex);
         return(new FeedColumnLayoutCollection());
     }
 }
コード例 #28
0
        public UIPersonButton()
        {
            DataService = FSOFacade.Kernel.Get <IClientDataService>();

            User = new Binding <UserReference>()
                   .WithBinding(this, "Tooltip", "Name")
                   .WithBinding(this, "Icon", "Icon")
                   .WithMultiBinding(x => { Invalidate(); }, "Icon", "Name");

            m_TooltipHandler = UIUtils.GiveTooltip(this);

            _Button = new UIButton();
            _Button.OnButtonClick += _Button_OnButtonClick;
            Add(_Button);
        }
コード例 #29
0
 static IdentitiesDictionary LoadIdentities(IClientDataService dataService)
 {
     if (dataService == null)
     {
         throw new ArgumentNullException("dataService");
     }
     try
     {
         return(dataService.LoadIdentities());
     }
     catch (Exception ex)
     {
         _log.Error("Could not load user identities", ex);
         return(new IdentitiesDictionary());
     }
 }
コード例 #30
0
        public CoreGameScreenController(CoreGameScreen view, Network.Network network, IClientDataService dataService, IKernel kernel, LotConnectionRegulator joinLotRegulator)
        {
            this.Screen           = view;
            this.Network          = network;
            this.DataService      = dataService;
            this.Chat             = new MessagingController(this, view.MessageTray, network, dataService);
            this.JoinLotRegulator = joinLotRegulator;
            this.RoommateProtocol = new RoommateRequestController(this, network, dataService);

            joinLotRegulator.OnTransition += JoinLotRegulator_OnTransition;

            var shard = Network.MyShard;

            Terrain = kernel.Get <TerrainController>(new ConstructorArgument("parent", this));
            view.Initialize(shard.Name, int.Parse(shard.Map), Terrain);
        }
コード例 #31
0
		public ClientDataContext setService(IClientDataService service) {
			this.service = service;
			return this;
		}
コード例 #32
0
		public ClientDataContext (string uri)
		{
			this.service = new ClientDataService (uri);
		}