public void Expand(ExpandStrategy strategy) { if (this.ExpandCollapseState == ExpandCollapseState.Expanded) { return; } switch (strategy) { case ExpandStrategy.Click: this.Click(); break; case ExpandStrategy.ExpandCollapsePattern: this.Instance.GetPattern <ExpandCollapsePattern>(ExpandCollapsePattern.Pattern).Expand(); break; default: Logger.Error("{0} is not valid or implemented expand strategy.", strategy); throw new CruciatusException("NOT EXPAND"); } Thread.Sleep(250); }
/// <summary> /// Сворачивает выпадающий список. /// </summary> /// <param name="strategy"> /// Стратегия способа раскрытия. /// </param> public void Collapse(ExpandStrategy strategy) { if (this.ExpandCollapseState == ExpandCollapseState.Collapsed) { return; } switch (strategy) { case ExpandStrategy.Click: this.Click(); break; case ExpandStrategy.ExpandCollapsePattern: this.Instance.GetPattern<ExpandCollapsePattern>(ExpandCollapsePattern.Pattern).Collapse(); break; default: Logger.Error("{0} is not valid or implemented collapse strategy.", strategy); throw new CruciatusException("NOT COLLAPSE"); } Thread.Sleep(250); }