private void InsertButton_Click(object sender, RoutedEventArgs e) { string MethodName = "DynamicInsert"; DataTempletItem item = DataTempletTree.SelectedItem as DataTempletItem; int? cellrow = null, cellcolumn = null; DocumentViewModel.InsertBookMark(item.Name, ref cellrow, ref cellcolumn); GeneratorBase.MethodParams mp = new GeneratorBase.MethodParams(item.Name, item.Path, ((cellrow == null && cellcolumn == null) ? false : true), cellrow - 1, cellcolumn - 1); // DocumentViewModel.CallMethod(MethodName, mp); RecordViewModel.AddRecord(MethodName, mp); }