示例#1
0
 public ClientPresenter(IClientView view, ClientModel model)
 {
     _view             = view;
     _model            = model;
     _clientRepository = _model.ClientRepository;
     _orderRepository  = _model.OrderRepository;
 }
 public ClientPresenter(IClientView view, ClientModel model)
 {
     _view = view;
     _model = model;
     _clientRepository = _model.ClientRepository;
     _orderRepository = _model.OrderRepository;
 }
示例#3
0
 public void registerClientView(IClientView clientView)
 {
     if (this.clientViews.Contains(clientView))
     {
         throw new Exception("重复添加!" + clientView);
     }
     this.clientViews.Add(clientView);
 }
示例#4
0
        /// <summary>
        /// Initializes the <see cref="ClientController"/>
        /// </summary>
        /// <param name="view">The <see cref="IClientView"/>.</param>
        /// <param name="loginSettings">The login settings.</param>
        /// <param name="settings">The general settings.</param>
        public ClientController(IClientView view, SettingInfoBase loginSettings, SettingInfoBase settings)
        {
            _view      = view;
            _loginInfo = loginSettings;
            _settings  = settings;

            _currentLocalDirectory = loginSettings.Get <string>(LoginInfo.LocalDir);
        }
        public ClientPresenter(IClientView view)
        {
            _view = view;
            _clientListener = new TcpListener(IPAddress.Any, _view.ClientPort);
            _clientListener.Start();

            AcceptClientConnections();
        }
示例#6
0
 public ClientPresenter(IClientView view, ICacheService cache, IErrorLogger errorLogger, IDeserializer serializer) : base(cache, errorLogger, serializer)
 {
     _view = view;
     _view.CloseRequested += OnCloseRequested;
     _view.CreationHistoriqueRequested += OnCreationHistoriqueRequested;
     _view.OnSuspendAbonnement         += SuspendAbonnement;
     _view.OnRepayAbonnement           += RepayAbonnement;
     _clientDataService     = new ClientDataService(_cache, _serializer, _errorLogger);
     _abonnementDataService = new AbonnementDataService(_cache, _serializer, _errorLogger);
     _historiqueDataService = new HistoriqueDataService(_cache, _serializer, _errorLogger);
 }
        public void Execute()
        {
            IDialog     dialog     = factory.CreateDialog();
            IClientView clientView = factory.CreateClientView();
            ILoanView   loanView   = factory.CreateLoanView();
            Client      client     = GetClient(dialog);
            Loan        loan       = GetLoan(dialog);

            client.Notify(loan.GetValues());

            loan.AddObserver(client);
        }
示例#8
0
    public void removeClientView(IClientView clientView)
    {
        if (0 == this.clientViews.Count)
        {
            return;
        }
        int index = this.clientViews.LastIndexOf(clientView);

        if (-1 != index)
        {
            this.clientViews.RemoveAt(index);
        }
    }
示例#9
0
        /// <summary>
        /// Sends a message to a client. If message or client are null nothing is done.
        /// </summary>
        /// <param name="from">From.</param>
        /// <param name="args">The <see cref="MessageEventArgs"/> instance containing the event data.</param>
        public void ReplyToClient(object from, MessageEventArgs args)
        {
            // if message is null then reply is not sent to client
            IClientView client = from as IClientView;

            if (client == null)
            {
                return;
            }
            if (args.Msg != null)
            {
                client.SendMessage(args.Msg);
            }
        }
示例#10
0
 public ClientController(FileManager manager, IClientView view)
 {
     this.manager = manager;
     this.view    = view;
     this.view.deconnectionEvent += new newDeconnectionEvent(deconnectionEvent);
     this.view.connectionEvent   += new newConnectionEvent(connectionEvent);
     this.view.loginEvent        += new newLoginEvent(loginEvent);
     this.view.abortEvent        += new newAbortEvent(abortEvent);
     this.view.requestEvent      += new newRequestEvent(requestEvent);
     this.view.responseEvent     += new newResponseEvent(responseEvent);
     this.view.quitGameEvent     += new newQuitGameEvent(quitGameEvent);
     this.view.sendMsgEvent      += new newSendMsgEvent(sendMsgEvent);
     this.view.endGameEvent      += new newEndGameEvent(endGameEvent);
     this.view.gameEvent         += new newGameEvent(gameEvent);
     this.view.showView(manager.getUnique());
 }
        public ClientPresenter(IClientView view, IClientManager clientManager, IGroupManager groupManager, IClientCardCreator clientCardCreator, IMessager messager)
        {
            this.view              = view;
            this.clientManager     = clientManager;
            this.groupManager      = groupManager;
            this.messager          = messager;
            this.clientCardCreator = clientCardCreator;

            view.GroupsRequred    += new EventHandler(view_GroupsRequred);
            view.AddClientClicked += new EventHandler(view_AddClientClicked);

            view.ClientInformationChanged += new EventHandler(view_ClientInformationChanged);
            view.ClientDeleted            += new EventHandler(view_ClientDeleted);
            view.GroupChanged             += new EventHandler(view_GroupChanged);
            view.CreateClientCard         += new EventHandler(view_CreateClientCard);
        }
示例#12
0
        public ClientPresenter(IClientView view, IDialogService dialogService)
        {
            _view          = view;
            _dialogService = dialogService;

            _view.AddNewFolder    += AddNewFolder;
            _view.AddNewBookmark  += AddNewBookmark;
            _view.OpenBookmark    += OpenBookmarkInBrowser;
            _view.RemoveNode      += RemoveNode;
            _view.FilterTree      += FilterTree;
            _view.SearchFocusLost += FocusTextBoxLost;

            _bookmarksTree = new BookmarksTree();

            string filename = "bookmarks.xml";

            _bookmarksTree.Read(filename);
            LoadTreeIntoView(_bookmarksTree);
        }
示例#13
0
        public PhoneViewModel(IClientView client)
            : base(client as FrameworkElement)
        {
            _llft   = null;
            _client = client;

            // _client.FullScreen(true);

            int isQp = DR2API.DR2_GetISQP(ViewModelBase.ApiHandle);

            if (isQp == 1)
            {
                OnFullScreenCommand();
            }

            //string isQP = System.Configuration.ConfigurationManager.AppSettings["ISQP"];
            //if (string.Compare(isQP, "true", true) == 0)
            //  OnFullScreenCommand();
            //DR2.Views.PhoneView sss = _client;
        }
示例#14
0
 public void setView(IClientView view)
 {
     this.view = view;
 }
示例#15
0
 public ClientControl(IClientModel clientModel, IClientView clientView)
 {
     this._clientModel = clientModel;
     this._clientView = clientView;
 }
示例#16
0
 public void SetView(IClientView clientView)
 {
     this._clientView = clientView;
 }
 public NominatimGeocodeAddress(IClientView view, NominatimClient client)
 {
     this.view   = view;
     this.client = client;
 }
示例#18
0
 public ChatClient(IClientView view)
 {
     udpClient       = new UdpClient();
     this.clientView = view;
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConnectionEventArgs"/> class.
 /// </summary>
 /// <param name="cview">The clientView.</param>
 public ConnectionEventArgs(IClientView cview)
 {
     view = cview;
 }
示例#20
0
 public LogUserOntoAlba(IClientView view, AuthorizationClient client)
 {
     this.view   = view;
     this.client = client;
 }
 public ClientController(IClientView view)
 {
     this.view = view;
 }
示例#22
0
 public void RemoveObserver(IClientView clientView)
 {
     _observers.Remove(clientView);
 }
 public UploadKmlFile(IClientView view, AuthorizationClient client, int delay)
 {
     this.view   = view;
     this.client = client;
     this.delay  = delay;
 }
示例#24
0
 public ClientPresenter(IClientView view)
 {
     _view = view;
 }
示例#25
0
 public void AddObserver(IClientView clientView)
 {
     _observers.Add(clientView);
 }
示例#26
0
 public AzureMapsmGeocodeAddress(IClientView view, AzureMapsClient client)
 {
     this.view   = view;
     this.client = client;
 }
示例#27
0
 public ClientPresenter(IClientView view)
 {
     this.view = view;
 }
示例#28
0
 public FtpClientPlugin(IClientView view, ClientController clientController, SettingInfoBase loginSettings)
 {
     _view          = view;
     _controller    = clientController;
     _loginSettings = loginSettings;
 }
示例#29
0
 public Client(IClientView vi)
 {
     _vi = vi;
     ID  = Guid.NewGuid().ToString();
 }
示例#30
0
 public ClientsPresenter(IClientView view)
 {
     _view          = view;
     view.Presenter = this;
 }
示例#31
0
 public ClientController(IClientView view, IHomeSecureConfig config)
 {
     _config = config;
     _view = view;
     _appSettings = _config.GetAppSettings();
 }