public async void AlertGridClose() { //Grid DoubleAnimation alertGridAnim = new DoubleAnimation() { From = 400, To = MinWidth, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; AlertGrid.BeginAnimation(WidthProperty, alertGridAnim); //Border DoubleAnimation border = new DoubleAnimation() { From = 400, To = MinWidth, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; AlertBorder.BeginAnimation(WidthProperty, border); await Task.Delay(1000); this.Close(); }
//Animation Methods public void AlertGridOpen() { //Grid DoubleAnimation alertGridAnim = new DoubleAnimation() { From = MinWidth, To = 400, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; AlertGrid.BeginAnimation(WidthProperty, alertGridAnim); //Border DoubleAnimation border = new DoubleAnimation() { From = MinWidth, To = 400, Duration = TimeSpan.FromSeconds(1), EasingFunction = new QuinticEase() }; AlertBorder.BeginAnimation(WidthProperty, border); }
private void LlenarGridAlert() { try { if (Session["DtAlert"] == null) { GetAlert(); } AlertGrid.DataSource = Session["DtAlert"]; AlertGrid.DataBind(); } catch (Exception ex) { AlertGrid.JSProperties.Add("cpError", ex.Message); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); TheGrid = AlertGrid; GridPagerTop.InitializeGridPager(SR.GridPagerAlertSingleItemFound, SR.GridPagerAlertMultipleItemsFound, AlertGrid, () => ResultCount, ImageServerConstants.GridViewPagerPosition.Top); Pager = GridPagerTop; GridPagerTop.Reset(); // Set up the grid if (Height != Unit.Empty) { ContainerTable.Height = _height; } AlertGrid.DataSource = AlertDataSourceObject; AlertGrid.DataBind(); }
private void RefreshAlerts() { try { int selected; if (AlertGrid.CurrentRow != null) { selected = AlertGrid.CurrentRow.Index; } else { selected = -1; } DataGridViewColumn column = AlertGrid.SortedColumn; bool desc = true; if (column != null) { desc = column.HeaderCell.SortGlyphDirection.Equals(SortOrder.Descending); } AlertGrid.Rows.Clear(); foreach (Alert a in myServer.alerts) { AlertGrid.Rows.Add(GetAlertRow(a)); } if (column != null) { AlertGrid.Sort(column, (desc ? ListSortDirection.Descending : ListSortDirection.Ascending)); } if (selected >= 0) { AlertGrid.CurrentCell = AlertGrid.Rows[selected].Cells[0]; } if (AlertGrid.Rows.Count > 0) { this.DetailsButton.Enabled = true; this.RemoveAlertButton.Enabled = true; } foreach (DataGridViewTextBoxColumn col in AlertGrid.Columns) { switch (col.HeaderText) { case "Violator": col.ToolTipText = "Name of the user associated with violation of specified rule"; break; case "Priority": col.ToolTipText = "Priority for rule condition assigned during the creation of rule"; break; case "Condition": col.ToolTipText = "Text of rule condition that is violated"; break; default: break; } } } catch { } }