private async Task HideRemoveQuestionPanel() { GridActions.RotationX = -270; await GridQuestion.RotateXTo(-90); GridQuestion.IsVisible = false; GridActions.IsVisible = true; await GridActions.RotateXTo(-360); GridActions.RotationX = 0; }
private async Task ManageActionsVisibility() { if (GridActions.TranslationX == 0) { await Task.WhenAll(GridContent.TranslateTo(0, 0), GridActions.TranslateTo(-panelTranslation, 0)); } else { await Task.WhenAll(GridContent.TranslateTo(panelTranslation, 0), GridActions.TranslateTo(0, 0)); } }
} // Load private ContentResult LoadGrid( GridActions nSpName, bool bIncludeTestCustomers, Func <AGridRow> oFactory, IEnumerable <QueryParameter> oMoreSpArgs = null ) { return(LoadGrid( nSpName, bIncludeTestCustomers, oFactory, bIncludeAllCustomers: null, oMoreSpArgs: oMoreSpArgs )); } // LoadGrid
} // LoadGrid private ContentResult LoadGrid( GridActions nSpName, bool bIncludeTestCustomers, Func <AGridRow> oFactory, bool?bIncludeAllCustomers, DateTime?now = null, IEnumerable <QueryParameter> oMoreSpArgs = null ) { TimeCounter tc = new TimeCounter("LoadGrid building time for grid " + nSpName); var oRes = new SortedDictionary <long, AGridRow>(); var args = new List <QueryParameter> { new QueryParameter("@WithTest", bIncludeTestCustomers), }; if (bIncludeAllCustomers.HasValue) { args.Add(new QueryParameter("@WithAll", bIncludeAllCustomers)); } if (now.HasValue) { args.Add(new QueryParameter("@Now", now.Value)); } if (oMoreSpArgs != null) { args.AddRange(oMoreSpArgs); } using (tc.AddStep("retrieving from db and processing")) { this.db.ForEachRowSafe( sr => { AGridRow r = oFactory(); long nRowID = sr[r.RowIDFieldName()]; r.Init(nRowID, sr); if (r.IsValid()) { oRes[nRowID] = r; } }, nSpName.ToString(), CommandSpecies.StoredProcedure, args.ToArray() ); // foreach } // using log.Debug("{0}: traversing done.", nSpName); var sb = new StringBuilder(); sb.AppendLine(tc.Title); foreach (var time in tc.Steps) { sb.AppendFormat("\t{0}: {1}ms\n", time.Name, time.Length); } log.Info("{0}", sb); var serializer = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue, }; return(new ContentResult { Content = serializer.Serialize(new { aaData = oRes.Values }), ContentType = "application/json", }); } // LoadGrid
/// <summary> /// Checks to see if a particular action is present. /// </summary> /// <param name="gridAction"></param> /// <param name="name"></param> /// <returns></returns> private bool IsActionPresent(GridActions gridAction, string name) { string xPath = ComposeGridLocator(gridAction, name); return UIUtil.DefaultProvider.IsElementPresent(xPath, LocateBy.XPath); }
private string ComposeGridLocator(GridActions gridAction, string mgName) { string locator = string.Empty; string baseLocator = ComposeGridLocator(GridColumns.Actions, mgName) + "/div/a[contains(@id,'{0}')]"; string forAction = string.Empty; switch (gridAction) { case GridActions.VerifyCC: forAction = "lnkTestCC"; break; case GridActions.Delete: forAction = "lnkDelete"; break; case GridActions.AdminDelete: forAction = "lnkAdminDelete"; break; } locator = string.Format(baseLocator, forAction); return locator; }
public void ClickGridAction(GridActions gridAction, string name) { string xPath = ComposeGridLocator(gridAction, name); UIUtil.DefaultProvider.WaitForDisplayAndClick(xPath, LocateBy.XPath); }