示例#1
0
        void Event_SaveToRow(object sender, RoutedEventArgs e)
        {
            string selectedField = cbTplField.SelectedValue as string;

            if (selectedField == null)
            {
                ModernDialog.ShowMessage("Nothing to do; Nothing is loaded", "Error", MessageBoxButton.OK);
                return;
            }
            else if (Model.util.Templates == null)
            {
                ModernDialog.ShowMessage("Nothing to do; Nothing is loaded", "Error", MessageBoxButton.OK);
                return;
            }
            //			Debug.Print("Row, id: ‘{0}’, name: {1}", StrRow.Id.Value, StrRow.Title);
            Model.SelectedRow.SetValue(cbTplField.SelectedValue as string, editor.Text);
            TemplateUtil.UpdateTemplateRow(Ofd.FileName, "templates", model.SelectedRow, selectedField, editor.Text);
        }