public void SetModel(RichText richText, EditRefList sourcesEditor) { _richText = richText; _sourcesEditor = sourcesEditor; if (richText.Source != null) SetModel(richText.Source, sourcesEditor != null); }
/// <summary> /// Default constructor. /// </summary> public ReferenceEditor(bool readOnly, RichText text) { InitializeComponent(); // Add handlers for window availability events AddWindowAvailabilityHandlers(); DataContext = this; richText = text; if (readOnly) { btnAdd.Visibility = Visibility.Hidden; btnRemove.Visibility = Visibility.Hidden; } }
public static void Edit(RichText text, bool readOnly) { var refEdit = new ReferenceEditor(readOnly, text); refEdit.ShowDialog(); }
/// <summary> /// Deprecated Method for adding a new object to the RichText EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRichText(RichText richText) { base.AddObject("RichText", richText); }
/// <summary> /// Create a new RichText object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="text">Initial value of the Text property.</param> public static RichText CreateRichText(global::System.Int32 id, global::System.String text) { RichText richText = new RichText(); richText.Id = id; richText.Text = text; return richText; }
public static void AddSource(RichText r) { if (r == null) return; var dlg = new SourceDialog(); dlg.ShowDialog(); if (dlg.Source == null) return; DaoUtils.AddSource(dlg.Source, r); }
public static void AddSource(string newSrc, RichText richText) { if (richText == null) return; Source src = new Source(); src.Text = newSrc; richText.Source.Add(src); }