Ejemplo n.º 1
0
 protected override void CellAnnotation(AnnotationArgs args, AnnotationResult result)
 {
     if (args.FieldName == nameof(LoginUser.PasswordHash) || args.FieldName == nameof(LoginUser.PasswordSalt))
     {
         result.IsPassword = true;
     }
 }
Ejemplo n.º 2
0
 protected override void CellAnnotation(AnnotationArgs args, AnnotationResult result)
 {
     if (args.FieldName == nameof(Feedback.AttachmentFileName))
     {
         result.IsFileUpload = true;
     }
 }
Ejemplo n.º 3
0
 protected override void CellAnnotation(AnnotationArgs args, AnnotationResult result)
 {
     if (args.FieldName == nameof(Feedback.AttachmentFileName) && args.Row.AttachmentData != null)
     {
         result.Html = $"<a href='/feedback/{ args.Row.Name }'>{ args.Row.AttachmentFileName }</a>";
     }
 }
Ejemplo n.º 4
0
 protected override void CellAnnotation(AnnotationArgs args, AnnotationResult result)
 {
     if (args.FieldName == nameof(StorageFileDisplay.FileName))
     {
         result.IsFileUpload = true;
         if (args.Row.IsData != null)
         {
             result.HtmlRight = $"<a href=\"" + "/assets/" + args.Row.FileName + "\">" + "Open" + "</a>";
         }
     }
 }
Ejemplo n.º 5
0
        public void ProcessAnnotations(AnnotationArgs args)
        {
            _runtimeIntent.Clear();
            foreach (AnnotatedNode anode in args.AnnotatedNodes)
            {
                if (anode.MatchingNode != null)
                {
                    string path = PathDescriptor.GetPath(anode.MatchingNode, anode.Root);

                    _runtimeIntent.PutData(path, anode.Data);
                }
            }
        }
Ejemplo n.º 6
0
 public void ProcessAnnotations(AnnotationArgs args)
 {
     if (_processAnnotationsFunc != null)
     {
         try
         {
             _annotionArgs.Args            = args;
             _annotionArgs.runtime_storage = new PythonRuntimeStorageWrapper(args.RuntimeStorage);
             _processAnnotationsFunc(_annotionArgs);
         }
         catch (Exception e)
         {
             throw PythonScriptHost.Instance.GetFormattedException(e, Name);
         }
     }
 }
Ejemplo n.º 7
0
        public void ProcessAnnotations(AnnotationArgs args)
        {
            //This is where we are going to look at the annotation library
            //to learn from the examples.

            try {
                List <Ptype> lib = new List <Ptype>();

                bool needsUpdate = ptypeUtil.UpdatePtypes(args.AnnotatedNodes, lib);

                if (needsUpdate)
                {
                    shared[SHARED_PTYPES_KEY] = lib;
                    featureTree = FeatureTree.FeatureTree.BuildTree(GetFeatures(lib));
                }
            } catch (Exception e) {
                Console.WriteLine(e.StackTrace);
            }
        }
Ejemplo n.º 8
0
 public void ProcessAnnotations(AnnotationArgs args)
 {
 }
Ejemplo n.º 9
0
 public void ProcessAnnotations(AnnotationArgs args)
 {
     //To change body of implemented methods use File | Settings | File Templates.
 }