private void ClearClicked(object sender, EventArgs args) { if ((DataField != null) && !DataField.IsNil) { DataField.ClearValue(); } }
public void SetImageAccepted(IFormInterface AForm) { FImageSource = (IImageSource)AForm; if (FImageSource.Stream == null) { DataField.ClearValue(); } else { using (DAE.Runtime.Data.Scalar LNewValue = new DAE.Runtime.Data.Scalar(Source.DataView.Process.ValueManager, Source.DataView.Process.DataTypes.SystemGraphic)) { Stream LStream = LNewValue.OpenStream(); try { FImageSource.Stream.Position = 0; StreamUtility.CopyStream(FImageSource.Stream, LStream); } finally { LStream.Close(); } DataField.Value = LNewValue; } } }
private void SaveRequested(DataLink link, DataSet dataSet) { if (_link.DataField != null) { if (!HasValue) { DataField.ClearValue(); } else { FieldValue = Text; } } }
private void SaveRequested(DataLink link, DataSet dataSet) { if (_link.DataField != null) { if (!HasValue) { DataField.ClearValue(); } else { DataField.AsString = Document.TextContent; } } }