using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using Telerik.Web.UI.Editor.DialogControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        FileManagerDialogParameters imageManagerParameters = new FileManagerDialogParameters();  
        imageManagerParameters.ViewPaths = new string[] { "~/Images" };
        imageManagerParameters.UploadPaths = new string[] { "~/Images" };
        imageManagerParameters.DeletePaths = new string[] { "~/Images" };
        imageManagerParameters.MaxUploadFileSize = 5000000;
        // If you don't set the following property, the default value will be used  
        // imageManagerParameters.SearchPatterns = new string[] { "*.jpg" };  

        DialogDefinition imageManager = new DialogDefinition(typeof(ImageManagerDialog), imageManagerParameters);
        imageManager.ClientCallbackFunction = "ImageManagerFunction";
        imageManager.Width = Unit.Pixel(694);
        imageManager.Height = Unit.Pixel(440);
        //If you need to customize the dialog then register the external dialog files
        //imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";

        DialogOpener1.DialogDefinitions.Add("ImageManager", imageManager);


        FileManagerDialogParameters documentManagerParameters = new FileManagerDialogParameters();
        documentManagerParameters.ViewPaths = new string[] { "~/Documents" };
        documentManagerParameters.UploadPaths = new string[] { "~/Documents" };
        documentManagerParameters.DeletePaths = new string[] { "~/Documents" };
        documentManagerParameters.MaxUploadFileSize = 5000000;


        DialogDefinition documentManager = new DialogDefinition(typeof(DocumentManagerDialog), documentManagerParameters);
        documentManager.ClientCallbackFunction = "DocumentManagerFunction";
        documentManager.Width = Unit.Pixel(694);
        documentManager.Height = Unit.Pixel(440);

        DialogOpener1.DialogDefinitions.Add("DocumentManager", documentManager);

        FileManagerDialogParameters imageEditorParameters = new FileManagerDialogParameters();
        imageEditorParameters.ViewPaths = new string[] { "~/Images" };
        imageEditorParameters.UploadPaths = new string[] { "~/Images" };
        imageEditorParameters.DeletePaths = new string[] { "~/Images" };
        imageEditorParameters.MaxUploadFileSize = 5000000;

        DialogDefinition imageEditor = new DialogDefinition(typeof(ImageEditorDialog), imageEditorParameters);
        imageEditor.Width = Unit.Pixel(832);
        imageEditor.Height = Unit.Pixel(520);
        DialogOpener1.DialogDefinitions.Add("ImageEditor", imageEditor);   
    }
}