Ejemplo n.º 1
0
        private void EWSTestGetFolder(string DistinguishedFolderName)
        {
            Dictionary <string, string> fieldValues = new Dictionary <string, string>();

            fieldValues.Add("FolderId", $"<t:DistinguishedFolderId Id=\"{DistinguishedFolderName}\" />");
            TryXmlRequest(FormReplaceTemplateFields.RetrieveEWSRequest("GetFolder", fieldValues));
        }
Ejemplo n.º 2
0
        private void EWSTestFindItem(string DistinguishedFolderName)
        {
            Dictionary <string, string> fieldValues = new Dictionary <string, string>();

            fieldValues.Add("BaseShape", "Default");
            fieldValues.Add("MaxEntriesReturned", "50");
            fieldValues.Add("Offset", "0");
            fieldValues.Add("Basepoint", "Beginning");
            fieldValues.Add("Folder", $"<t:DistinguishedFolderId Id=\"{DistinguishedFolderName}\" />");
            TryXmlRequest(FormReplaceTemplateFields.RetrieveEWSRequest("FindItem", fieldValues));
        }
Ejemplo n.º 3
0
        private string LoadTemplate(string ItemId = "", string FolderId = "")
        {
            // Reads the XML template
            string sTemplateContent         = "";
            FormReplaceTemplateFields oForm = new FormReplaceTemplateFields(ItemId, FolderId);

            sTemplateContent = oForm.ReadTemplate(this);
            oForm.Dispose();

            if (String.IsNullOrEmpty(sTemplateContent))
            {
                return(xmlEditorRequest.Text);
            }

            return(sTemplateContent);
        }
Ejemplo n.º 4
0
        private string LoadTemplate(string ItemId = "", string FolderId = "", string TemplateName = "", string ChangeKey = "")
        {
            // Reads the XML template
            string sTemplateContent         = String.Empty;
            FormReplaceTemplateFields oForm = new FormReplaceTemplateFields(ItemId, FolderId, TemplateName, ChangeKey);

            sTemplateContent = oForm.ReadTemplate(this);
            oForm.Dispose();

            if (String.IsNullOrEmpty(sTemplateContent))
            {
                return(xmlEditorRequest.Text);
            }

            this.Activate(); // To stop the main window from disappearing behind other applications (Windows 10 z-order issues)
            return(sTemplateContent);
        }