namespace teste4motivodrecusa
{
/// <summary>
/// The entry point for this Vault Application Framework application.
/// </summary>
/// <remarks>Examples and further information available on the developer portal: http://developer.m-files.com/. </remarks>
public class VaultApplication
: ConfigurableVaultApplicationBase<Configuration>
{
[EventHandler(MFEventHandlerType.MFEventHandlerBeforeCheckInChanges)]
public void TrocaMetadado (EventHandlerEnvironment env)
{
if (env.ObjVerEx.Class != 6 || env.ObjVerEx.State != 163) return;
ObjVerEx ob = env.ObjVerEx;
string teste = ob.GetPropertyText(1285) + ob.GetPropertyText(1060);
//string[] textoDividido = teste.Split(';');
//foreach (string s in textoDividido)
//{
// Console.WriteLine(s);
//}
var propMotivo = ob.GetProperty(1329);
propMotivo.Value.Value = teste;
ob.SaveProperty(propMotivo);
}
}
}