Exemplo n.º 1
0
        public BSServiceClientView()
        {
            InitializeComponent();
            wcfClient = new BondSpreadWcfClient();

            var repoVM = new RepoManagementViewModel(wcfClient);
            var CTDVM = new CTDViewModel(wcfClient);
            addControlToTabControl(new RepoManagementView(){ViewModel = repoVM}, "Repo", "Repo");
            addControlToTabControl(new CTDView(){ViewModel = CTDVM}, "CTD", "CTD");

            Task.Factory.StartNew(PingServer);
        }
Exemplo n.º 2
0
        public CTDViewModel(BondSpreadWcfClient wcfClient)
        {
            this.wcfClient = wcfClient;

            Inputs = new BindingList<CTDItem>()
            {
                AllowEdit = true,
                AllowNew = true,
                AllowRemove = true,
                RaiseListChangedEvents = true,
            };

            Inputs.ListChanged += Inputs_ListChanged;

            PrePopulateFutures();
        }
        public RepoManagementViewModel(BondSpreadWcfClient wcfClient)
        {
            this.wcfClient = wcfClient;            

            Inputs = new BindingList<SpecialGCItem>()
            {
                AllowEdit = true,
                AllowNew = true,
                AllowRemove = true,
                RaiseListChangedEvents = true,
            };

            CarbonGCs = new BindingList<SpecialGCItem>()
            {
                AllowEdit = false,
                AllowNew = false,
                AllowRemove = false,
                RaiseListChangedEvents = true,
            };

            LoadDefaultRepo();            

            Task.Factory.StartNew(RepoPeriodicUpdate);
            ProcessCarbonInstruments();

            Inputs.ListChanged += Inputs_ListChanged;
            
        }