protected void fileselected_postback(object sender, EventArgs e)
    {
        Obout.Ajax.UI.FileManager.FileManager manager = sender as Obout.Ajax.UI.FileManager.FileManager;
        Result.Controls.Clear();
        Result.Controls.Add(new LiteralControl("<br /><b>Selected image:</b><br /><br />"));

        Image image = new Image();

        image.ImageUrl = manager.FileUrl;
        int width, height;

        getWidthAndHeight(int.Parse(manager.FileWidth), int.Parse(manager.FileHeight), out width, out height);
        image.Width         = new Unit(width, UnitType.Pixel);
        image.Height        = new Unit(height, UnitType.Pixel);
        image.AlternateText = manager.FileTitle;
        image.ToolTip       = manager.FileTitle;

        Result.Controls.Add(image);
    }
Exemple #2
0
    protected void fileselected_postback(object sender, EventArgs e)
    {
        Obout.Ajax.UI.FileManager.FileManager manager = sender as Obout.Ajax.UI.FileManager.FileManager;
        Result.Controls.Clear();
        Result.Controls.Add(new LiteralControl("<br /><b>Parameters of the selected file</b><br />"));
        Table table = new Table();

        table.CellSpacing = 3;
        table.BorderWidth = new Unit(1, UnitType.Pixel);
        table.BorderColor = System.Drawing.Color.FromName("gray");
        Result.Controls.Add(table);

        table.Rows.Add(addRow("Url", manager.FileUrl, System.Drawing.Color.FromName("lightgray")));
        table.Rows.Add(addRow("Title", manager.FileTitle, System.Drawing.Color.FromName("white")));
        table.Rows.Add(addRow("Width", manager.FileWidth, System.Drawing.Color.FromName("lightgray")));
        table.Rows.Add(addRow("Height", manager.FileHeight, System.Drawing.Color.FromName("white")));
        table.Rows.Add(addRow("Info", manager.FileInfo, System.Drawing.Color.FromName("lightgray")));
        //table.Rows.Add(addRow("File picked", manager.FilePicked.ToString(), System.Drawing.Color.FromName("white")));
    }