public AppOptionInstanceViewModel(AppLaunchReactiveAction action, AppOptionInstance instance) { Action = action; OptionInstance = instance; OptionName = OptionInstance.OptionDeclaration.Name; OptionValues = OptionInstance.FromAppOptionInstance() .ToList(); }
public AppLaunchActionViewModel(ActionsEditViewModel editVM, FolderReactionModel reactionModel, AppLaunchReactiveAction appAction) : base(reactionModel) { EditVM = editVM; Action = appAction; AppPolicy = appAction.AppPolicy; if (AppPolicy != null) { AppName = AppPolicy.AppName; AppGuid = AppPolicy.Guid; UsingOptions = Action.Options.ToReadOnlyReactiveCollection(x => new AppOptionInstanceViewModel(Action, x) ); Action.Options.ObserveElementPropertyChanged() .Subscribe(x => Action.Validate()); } else { AppName = "<App not found>"; } }
public AppLaunchActionInstanceViewModel(ActionsSelectInstantActionStepViewModel parentVM, AppLaunchReactiveAction action) { ActionSelectStepVM = parentVM; AppLaunchAction = action; var appPolicy = action.AppPolicy; AppName = appPolicy.AppName; AppGuid = appPolicy.Guid; UsingOptions = AppLaunchAction.Options .ToReadOnlyReactiveCollection(x => new AppOptionInstanceViewModel(AppLaunchAction, x)); }
internal void RemoveAction(AppLaunchReactiveAction action) { var vm = ActionVMs.Single(x => x.AppLaunchAction == action); ActionVMs.Remove(vm); InstantAction.RemoveAction(action); RaiseCanGoNextChanged(); }
internal void AddAction(AppLaunchReactiveAction action) { InstantAction.AddAction(action); ActionVMs.Add(new AppLaunchActionInstanceViewModel(this, action)); RaiseCanGoNextChanged(); }
/// <summary> /// 一つのオプションだけを扱うアプリ起動アクションを作成する。 /// </summary> /// <param name="appGuid"></param> /// <param name="decl"></param> /// <returns></returns> public static AppLaunchReactiveAction CreateOneOptionAppLaunchAction(Guid appGuid) { var actionModel = new AppLaunchReactiveAction(); actionModel.AppGuid = appGuid; return actionModel; }
public void RemoveAction(AppLaunchReactiveAction action) { _Actions.Remove(action); ResetTargetFileProcessState(); }
public void AddAction(AppLaunchReactiveAction action) { _Actions.Add(action); ResetTargetFileProcessState(); }
public HistoryActionViewModel(HistoryDataViewModel parentVM, AppLaunchReactiveAction action) { ParentVM = parentVM; Action = action; AppName = action.AppPolicy?.AppName ?? "<Deleted AppPolicy>"; OptionsText = String.Join("+", action.Options.Select(x => x.OptionDeclaration?.Name ?? "")); OptionInstances = action.Options .Select(x => new AppOptionInstanceViewModel(Action, x)) .ToList(); }