예제 #1
0
        public UnPlannedBindingData(List <AccounServiceInformation> AccountsServiceInformation)
        {
            UnplannedViewCollection = new ObservableCollection <UnplannedView>();
            foreach (AccounServiceInformation accountServiceInformation in AccountsServiceInformation.OrderBy(p => p.AccountName))
            {
                UnplannedView unplanned = new UnplannedView(accountServiceInformation, UnplanedType.Account, null, null);
                unplanned.Services = new ObservableCollection <UnplannedView>();
                foreach (var serviceName in accountServiceInformation.Services)
                {
                    unplanned.Services.Add(new UnplannedView(accountServiceInformation, UnplanedType.Service, serviceName, unplanned));
                }
                UnplannedViewCollection.Add(unplanned);
            }
            ConflictBehaviors = (ConflictBehavior[])Enum.GetValues(typeof(ConflictBehavior));

            RaisePropertyChanged("UnplannedViewCollection");
        }
예제 #2
0
        public UnPlannedBindingData(ServiceProfile[] AccountsServiceInformation)
        {
            UnplannedViewCollection = new ObservableCollection <UnplannedView>();
            foreach (ServiceProfile accountServiceInformation in AccountsServiceInformation.OrderBy(p => p.Parameters["AccountName"]))
            {
                UnplannedView unplanned = new UnplannedView(accountServiceInformation, UnplanedType.Account, null, null);
                unplanned.Services = new ObservableCollection <UnplannedView>();
                foreach (ServiceConfiguration service in accountServiceInformation.Services)
                {
                    unplanned.Services.Add(new UnplannedView(accountServiceInformation, UnplanedType.Service, service, unplanned));
                }
                UnplannedViewCollection.Add(unplanned);
            }
            ConflictBehaviors = (ConflictBehavior[])Enum.GetValues(typeof(ConflictBehavior));

            RaisePropertyChanged("UnplannedViewCollection");
        }
예제 #3
0
        public UnplannedView(AccounServiceInformation accounServiceInformation, UnplanedType type, string serviceName, UnplannedView parent)
        {
            _options = new Dictionary <string, string>();


            _accounServiceInformation = accounServiceInformation;
            _unplanedType             = type;
            if (type == Objects.UnplanedType.Service)
            {
                _serviceName  = serviceName;
                ParentAccount = parent;
            }
            foreach (var available in _accounServiceInformation.Services)
            {
                _availableServices.Add(available);
            }



            RaisePropertyChanged("AccountName");
        }