public static void OpenEditTableCellWindow( EditTableCell w, TabCell cell, Coords coord) { w.ParametrField.Text = cell.tabCellParametr; w.AlignField.Text = cell.tabCellAlign; w.PrecisionField.Text = cell.tabCellPrecision; w.col.Text = coord.colCoord.ToString(); w.row.Text = coord.rowCoord.ToString(); w.ShowDialog(); }
public static void SaveCell(EditTableCell w,ObjectXML objectXML) { TabCell t = new TabCell( w.AlignField.Text, w.PrecisionField.Text, w.ParametrField.Text); objectXML.cells[new Coords(int.Parse(w.row.Text), int.Parse(w.col.Text)).GetHashCode()] = t; MainWindow.objectXML = objectXML; save(); }
public static void EditCellClick(object sender, RoutedEventArgs e) { Coords t = new Coords(); EditTableCell w = new EditTableCell(); ObjectXML xml = new ObjectXML(); TabCell cell = new TabCell(); t = GetCoords((sender as Button).Name.ToString()); xml = MainWindow.GetObjectXML(); cell=xml.cells[t.GetHashCode()]; OpenEditTableCellWindow(w, cell, t); }