Example #1
0
 void IComponentRenameDeleteHandler.StartDeleting(ILogicalComponent component)
 {
     ShowSideBarItem(new DeleteComponentViewModel(this.MainBranch,
                                                  component,
                                                  this.ServiceLocator,
                                                  OnRenameDeleteInProgress));
 }
Example #2
0
 public RenameComponentViewModel(IMainBranch mainBranch,
                                 ILogicalComponent component,
                                 IServiceLocator serviceLocator,
                                 Action <bool> setInProgressStatus)
     : base(mainBranch, component, serviceLocator, setInProgressStatus)
 {
 }
Example #3
0
 public ExistingComponentMergeSet(ILogicalComponent sourceComponent,
                                  IEnumerable <IMergeableChangeSet> changeSets,
                                  Folders.ComponentsFolder targetComponentsFolder)
 {
     this.SourceComponent    = sourceComponent;
     this.ChangeSets         = changeSets;
     _targetComponentsFolder = targetComponentsFolder;
 }
Example #4
0
        public virtual bool SameAs(ILogicalComponent component)
        {
            if (component == null)
            {
                return(false);
            }

            return(this.GetType() == component.GetType() &&
                   this.Name == component.Name);
        }
Example #5
0
 public ComponentDeleteTransaction(ILogicalComponent component,
                                   TLocation location,
                                   IServiceLocator serviceLocator,
                                   params IComponentUniqueId[] uniqueIDs)
 {
     this.Component      = component;
     this.Location       = location;
     this.ServiceLocator = serviceLocator;
     _uniqueIDs          = uniqueIDs;
 }
Example #6
0
        public override bool SameAs(ILogicalComponent component)
        {
            if (!base.SameAs(component))
            {
                return(false);
            }

            var theOther = component as GameComponent;

            return(this.EngineName == theOther.EngineName);
        }
Example #7
0
 public ComponentRenameTransaction(
     ILogicalComponent component,
     TLocation oldLocation,
     TLocation newLocation,
     IServiceLocator serviceLocator)
 {
     this.Component  = component;
     OldLocation     = oldLocation;
     NewLocation     = newLocation;
     _serviceLocator = serviceLocator;
 }
Example #8
0
        public IEnumerable <ILogicalComponent> ScanForSimilarComponents(ILogicalComponent component)
        {
            var allComponents = GetQaBranch().GetComponents()
                                .Union(GetQaBranch().GetFeatureBranches().SelectMany(fb => fb.GetComponents()))
                                .Union(GetDevBranch().SelectMany(devBranch => devBranch.GetComponents()))
                                .Union(GetDevBranch().SelectMany(devBranch => devBranch.GetFeatureBranches().SelectMany(fb => fb.GetComponents())));

            var similarComponents = new List <ILogicalComponent>();

            foreach (var c in allComponents)
            {
                if (c.SameAs(component))
                {
                    similarComponents.Add(c);
                }
            }

            return(similarComponents);
        }
Example #9
0
        public RenameDeleteComponentViewModel(IMainBranch mainBranch,
                                              ILogicalComponent component,
                                              IServiceLocator serviceLocator,
                                              Action <bool> setInProgressStatus)
            : base(serviceLocator)
        {
            MainBranch           = mainBranch;
            Component            = component;
            _setInProgressStatus = setInProgressStatus;

            this.OkCommand = new Command(OkAction,
                                         () => !this.IsBusy && CanDoWork(),
                                         this);
            this.CancelCommand = new Command(Deactivate,
                                             () => !this.IsBusy,
                                             this);

            StartBusyAction(() => ScanForSimilarComponents(mainBranch),
                            $"Searching for components with name {Component.Name}");
        }
Example #10
0
 public RenameComponentAction(IComponentRenameDeleteHandler renameDeleteHandler, ILogicalComponent component)
     : base(renameDeleteHandler, component)
 {
 }
Example #11
0
 public ComponentDeletedEventData(ILogicalComponent component)
 {
     this.Component = component;
 }
Example #12
0
 public NewComponentMergeSet(ILogicalComponent sourceComponent, Folders.ComponentsFolder targetComponentsFolder)
 {
     this.SourceComponent    = sourceComponent;
     _targetComponentsFolder = targetComponentsFolder;
 }
Example #13
0
 public RenameDeleteAction(IComponentRenameDeleteHandler renameDeleteHandler, ILogicalComponent component)
 {
     RenameDeleteHandler = renameDeleteHandler;
     Component           = component;
     RenameDeleteHandler.PropertyChanged += RenameDeleteHandler_PropertyChanged;
 }
Example #14
0
 public IEnumerable <ILogicalComponent> ScanForSimilarComponents(ILogicalComponent component)
 {
     return(this.Owner.ScanForSimilarComponents(component));
 }
Example #15
0
 public ComponentRenamedEventData(ILogicalComponent component)
 {
     this.Component = component;
 }