public ContextActionsBulbViewModel(EditorActionsProvider model)
		{
			this.Model = model;
			this.Actions = new ObservableCollection<ContextActionViewModel>();
			this.HiddenActions = new ObservableCollection<ContextActionViewModel>();
			this.ActionVisibleChangedCommand = new ActionVisibleChangedCommand(model);
		}
 public ContextActionsBulbViewModel(EditorActionsProvider model)
 {
     this.Model         = model;
     this.Actions       = new ObservableCollection <ContextActionViewModel>();
     this.HiddenActions = new ObservableCollection <ContextActionViewModel>();
     this.ActionVisibleChangedCommand = new ActionVisibleChangedCommand(model);
 }
 public ActionVisibleChangedCommand(EditorActionsProvider model)
 {
     if (model == null)
     {
         throw new ArgumentNullException("model");
     }
     this.Model = model;
 }
Ejemplo n.º 4
0
 public override bool SaveOptions()
 {
     foreach (var provider in providers)
     {
         provider.IsVisible = false;
     }
     foreach (IContextActionProvider provider in listBox.SelectedItems)
     {
         provider.IsVisible = true;
     }
     EditorActionsProvider.SaveProviderVisibilities(providers);
     return(base.SaveOptions());
 }
Ejemplo n.º 5
0
 public override void LoadOptions()
 {
     base.LoadOptions();
     EditorActionsProvider.LoadProviderVisibilities(providers);
     listBox.UnselectAll();
     foreach (var provider in providers)
     {
         if (provider.IsVisible)
         {
             listBox.SelectedItems.Add(provider);
         }
     }
 }
		public ActionVisibleChangedCommand(EditorActionsProvider model)
		{
			if (model == null)
				throw new ArgumentNullException("model");
			this.Model = model;
		}
Ejemplo n.º 7
0
        ContextActionsBulbViewModel BuildPopupViewModel()
        {
            var actionsProvider = new EditorActionsProvider(new EditorRefactoringContext(this.Editor), providers.ToArray());

            return(new ContextActionsBulbViewModel(actionsProvider));
        }