/// <summary> /// method for add /// </summary> /// <param name="el"></param> public override void Add(Elemnts el) { if (this.Test(el)) { for (var i = 1; i < this.lst.Count; i++) { if (this.lst[i].Root.Parent.FullName == el.Root.Parent.FullName) { this.lst.RemoveRange(i, (this.lst.Count) - i); this.actionindex = i; MediatorWinRename.EnabledBtnFront(false); } else if (this.lst[i].Root.FullName.Contains("Searching results")) { if (this.lst[i].Parent.Root.FullName == el.Root.Parent.FullName) { this.lst.RemoveRange(i, (this.lst.Count) - i); this.actionindex = i; MediatorWinRename.EnabledBtnFront(false); } } } this.actionindex++; this.lst.Add(el); MediatorWinRename.EnableBtnBack(true); } }
/// <summary> /// operator -- /// </summary> /// <param name="d"></param> /// <returns></returns> public static Dirs operator --(Dirs d) { if (d.actionindex > 0) { d.actionindex--; } if (d.actionindex == 0) { MediatorWinRename.EnableBtnBack(false); } return(d); }