コード例 #1
0
        /// <summary>
        /// Refreshes the internal.
        /// </summary>
        /// <param name="model">The model.</param>
        private void RefreshInternal(ServiceCreationSettingsEdit model)
        {
            Model = model;

            var selectedMethod = SelectedMethod;
            var selectedType = SelectedType;

            RaisePropertyChanged(() => ParentService);

            SelectedMethod = null;
            SelectedType = null;

            PopulateAvailableTypes();
            PopulateMethods();
            PopulateTypes();

            if (selectedMethod != null)
                SelectedMethod = Methods.FirstOrDefault(m => m.Model.Guid == selectedMethod.Model.Guid);

            if (selectedType != null)
                SelectedType = Types.FirstOrDefault(t => t.Model.Guid == selectedType.Model.Guid);
        }
コード例 #2
0
 private static void Static(WeakEventListener<ServiceCreationSettingsViewModel, ServiceCreationSettingsEdit, ChildChangedEventArgs> listener, ServiceCreationSettingsEdit source)
 {
     source.ChildChanged -= listener.OnEvent;
 }
コード例 #3
0
        /// <summary>
        /// Initializes the specified model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <param name="parentViewModel">The parent view model.</param>
        public void Initialize(ServiceCreationSettingsEdit model, IIntegrationServiceViewModel parentViewModel)
        {
            ParentViewModel = parentViewModel;
            SelectedMethod = null;
            SelectedType = null;

            RefreshInternal(model);
        }