public void SetEventDetails(String CompletedEvent) { listOfCompletedEvents.Add(CompletedEvent); Conversions objectConversions = new Conversions(); listOfTaskDetails = objectConversions.convertStringIntoTaskDetails(listOfCompletedEvents); listOfEvents = objectConversions.convertTaskdetailsIntoEvent(listOfTaskDetails); datagrid.ItemsSource = listOfEvents; //datagrid.AutoGeneratedColumns += new EventHandler(dgData_AutoGeneratedColumns); foreach (DataGridColumn item in datagrid.Columns) { MessageBox.Show(item.Header.ToString()); if (item.Header.ToString().Equals("selectTask")) { item.Visibility = Visibility.Hidden; } //datagrid.Columns.Remove(item); } //datagrid.Columns[9].Visibility = Visibility.Collapsed; // datagrid.Columns.IndexOf(selectTask); // datagrid.ScrollIntoView(eventObj,); }
public List <TaskDetails> ViewCompletedEvents() { List <TaskDetails> listOfTaskDetails; List <string> listOfCompletedEvents = new List <string>(); if (UpdateCompletedFileList() == 0) { return(null); } StreamReader reader = new StreamReader("Completed.txt"); Debug.Assert(reader != null); String CompletedEvent = reader.ReadLine(); while (CompletedEvent != null) { listOfCompletedEvents.Add(CompletedEvent); CompletedEvent = reader.ReadLine(); } Conversions objectConversions = new Conversions(); listOfTaskDetails = objectConversions.convertStringIntoTaskDetails(listOfCompletedEvents); reader.Close(); if (UpdateCompletedFileList() > 10) { ClearCompletedFileList(); } return(listOfTaskDetails); }
public void SetEventDetails(string CompletedEvent) { this.listOfCompletedEvents.Add(CompletedEvent); Conversions objectConversions = new Conversions(); this.listOfTaskDetails = objectConversions.convertStringIntoTaskDetails(this.listOfCompletedEvents); this.listOfEvents = objectConversions.convertTaskdetailsIntoEvent(this.listOfTaskDetails); this.datagrid.ItemsSource = this.listOfEvents; foreach (DataGridColumn item in this.datagrid.Columns) { MessageBox.Show(item.Header.ToString()); if (item.Header.ToString().Equals("selectTask")) { item.Visibility = Visibility.Hidden; } } }