예제 #1
0
 private void ClearClicked(object sender, EventArgs args)
 {
     if ((DataField != null) && !DataField.IsNil)
     {
         DataField.ClearValue();
     }
 }
예제 #2
0
 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;
         }
     }
 }
예제 #3
0
 private void SaveRequested(DataLink link, DataSet dataSet)
 {
     if (_link.DataField != null)
     {
         if (!HasValue)
         {
             DataField.ClearValue();
         }
         else
         {
             FieldValue = Text;
         }
     }
 }
예제 #4
0
 private void SaveRequested(DataLink link, DataSet dataSet)
 {
     if (_link.DataField != null)
     {
         if (!HasValue)
         {
             DataField.ClearValue();
         }
         else
         {
             DataField.AsString = Document.TextContent;
         }
     }
 }