public static void RefreshStatistics(ref Form form1, string NewCount, string AllCount) { Panel pnl = DynamicToolbarsHelper.FindPanelInForm(form1, DynamicFormHelper.STATISTICS_PANEL_NAME); pnl.Width = form1.Width; pnl.Size = new Size(form1.Width, 25); int o = form1.Height - 30; pnl.Location = new Point(marginHoriz, 550);//); pnl.BackColor = Color.AliceBlue; pnl.Controls.Clear(); Label lbl1 = new Label(); lbl1.Text = "New OFs Count:" + NewCount + " All OFs Count: " + AllCount; lbl1.Left = 0; lbl1.Width = pnl.Width; lbl1.Height = 20; pnl.Controls.Add(lbl1); form1.Controls.Add(pnl); }
public static ListView ShowList( ref Form form1, string listviewName, List <Hashtable> of_list, string[] cols, string fromDate, string toDate, string newCount, string tableName, string orderby, ProgressBar progressBar1) { Cursor.Current = Cursors.WaitCursor; DynamicToolbarsHelper.orderBy = orderby; RefreshStatistics(ref form1, newCount, of_list.Count.ToString()); ListView listView1 = null; int nLen = form1.Controls.Count; int listviewIndex = -1; for (int i = 0; i < nLen; i++) { if (form1.Controls[i].Name == listviewName) { listviewIndex = i; } } if (listviewIndex >= 0) { form1.Controls.RemoveAt(listviewIndex); } Point location = new Point(10, listview_top); listView1 = DynamicFormHelper.Create_Listview(ref form1, listviewName, location); ListViewHelper.Fill(ref listView1, of_list, cols, progressBar1, false); // sets global orderBy variable DynamicToolbarsHelper.RefreshToolBars(ref listView1, tableName); // listView1.Focus(); Cursor.Current = Cursors.Default; return(listView1); }
public static void RefreshFilterTextBoxesPanel(ref ListView lv)//, string[] cols) { string[] vals = DynamicToolbarsHelper.RemoveSearchTextBoxes(ref lv); DynamicToolbarsHelper.AddSearchTextBoxesPanel(ref lv); DynamicToolbarsHelper.AddValues(ref lv, vals); }