Ejemplo n.º 1
0
        /// <summary>
        /// Raises the Init event.
        /// </summary>
        /// <param name="e"></param>
        override protected void OnInit(EventArgs e)
        {
            //Controls must be created here
            updateButton          = new Esperantus.WebControls.LinkButton();
            updateButton.CssClass = "CommandButton";

//			updateButton.Text="Apply Module Changes";
            //		((Esperantus.WebControls.LinkButton) updateButton).TextKey="APPLY_MODULE_CHANGES";
            PlaceHolderButtons.Controls.Add(updateButton);

            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));
            saveAndCloseButton          = new Esperantus.WebControls.LinkButton();
            saveAndCloseButton.TextKey  = "OK";
            saveAndCloseButton.Text     = "Save and close";
            saveAndCloseButton.CssClass = "CommandButton";
            PlaceHolderButtons.Controls.Add(saveAndCloseButton);
            this.saveAndCloseButton.Click += new System.EventHandler(this.saveAndCloseButton_Click);

            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));
            moduleSettingsButton             = new Esperantus.WebControls.HyperLink();
            moduleSettingsButton.TextKey     = "MODULESETTINGS_SETTINGS";
            moduleSettingsButton.Text        = "Settings";
            moduleSettingsButton.CssClass    = "CommandButton";
            moduleSettingsButton.NavigateUrl = HttpUrlBuilder.BuildUrl("~/DesktopModules/Admin/PropertyPage.aspx", TabID, ModuleID);
            PlaceHolderButtons.Controls.Add(moduleSettingsButton);

            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));

            cancelButton          = new Esperantus.WebControls.LinkButton();
            cancelButton.CssClass = "CommandButton";
            PlaceHolderButtons.Controls.Add(cancelButton);

            InitializeComponent();
            base.OnInit(e);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// On init
        /// </summary>
        /// <param name="e"></param>
        override protected void OnInit(EventArgs e)
        {
            //Controls must be created here
            updateButton          = new Esperantus.WebControls.LinkButton();
            updateButton.CssClass = "CommandButton";
            PlaceHolderButtons.Controls.Add(updateButton);


            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));
            saveAndCloseButton          = new Esperantus.WebControls.LinkButton();
            saveAndCloseButton.TextKey  = "SAVE_AND_CLOSE";
            saveAndCloseButton.Text     = "Save and close";
            saveAndCloseButton.CssClass = "CommandButton";
            PlaceHolderButtons.Controls.Add(saveAndCloseButton);
            this.saveAndCloseButton.Click += new System.EventHandler(this.saveAndCloseButton_Click);

            // Removed by Mario Endara <*****@*****.**> (2004/11/04)
//			if (Rainbow.Security.PortalSecurity.IsInRoles("Admins"))
//			{
            adminPropertiesButton             = new Esperantus.WebControls.HyperLink();
            adminPropertiesButton.TextKey     = "MODULESETTINGS_BASE_SETTINGS";
            adminPropertiesButton.Text        = "Edit base settings";
            adminPropertiesButton.CssClass    = "CommandButton";
            adminPropertiesButton.NavigateUrl = HttpUrlBuilder.BuildUrl("~/DesktopModules/Admin/ModuleSettings.aspx", TabID, ModuleID);

            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));
            PlaceHolderButtons.Controls.Add(adminPropertiesButton);
//			}

            PlaceHolderButtons.Controls.Add(new LiteralControl("&#160;"));

            cancelButton          = new Esperantus.WebControls.LinkButton();
            cancelButton.CssClass = "CommandButton";
            PlaceHolderButtons.Controls.Add(cancelButton);

            InitializeComponent();
            base.OnInit(e);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// DisplayImages
        /// </summary>
        public void DisplayImages()
        {
            _returnPath = "~~/" + ((SettingItem)moduleSettings["FlashPath"]).Value;
            string[] galleryfolderarray = ReturnFolderContentArray();
            flashTable.Controls.Clear();
            if (galleryfolderarray == null || galleryfolderarray.Length == 0)
            {
                gallerymessage.Text = _noImagesMessage;
            }
            else
            {
                string galleryfilename = (string.Empty);

                TableRow  rowItem;
                TableCell cellItemImage;
                TableCell cellItemSelect;
                TableCell cellItemDelete;
                TableCell cellItemFileName;
                foreach (string galleryfolderarrayitem in galleryfolderarray)
                {
                    galleryfilename = galleryfolderarrayitem.ToString();
                    galleryfilename = galleryfilename.Substring(galleryfilename.LastIndexOf(@"\") + 1);

                    Rainbow.UI.WebControls.FlashMovie flashMovie = new Rainbow.UI.WebControls.FlashMovie();
                    flashMovie.MovieName   = _imageFolder + "/" + galleryfilename;
                    flashMovie.MovieHeight = "150px";
                    flashMovie.MovieWidth  = "150px";

                    System.Web.UI.WebControls.Label filenameLbl = new System.Web.UI.WebControls.Label();
                    filenameLbl.Text = galleryfilename;
                    Esperantus.WebControls.HyperLink selectCmd = new Esperantus.WebControls.HyperLink();
                    selectCmd.TextKey     = "SELECT";
                    selectCmd.Text        = "Select";            //by yiming
                    selectCmd.CssClass    = "CommandButton";
                    selectCmd.NavigateUrl = "javascript:UpdateOpener('" + _returnPath + "/" + galleryfilename + "');self.close();";
                    Esperantus.WebControls.LinkButton deleteCmd = new Esperantus.WebControls.LinkButton();
                    deleteCmd.TextKey         = "DELETE";
                    deleteCmd.Text            = "Delete";
                    deleteCmd.CommandName     = "DELETE";
                    deleteCmd.CssClass        = "CommandButton";
                    deleteCmd.CommandArgument = galleryfilename;
                    deleteCmd.Command        += new System.Web.UI.WebControls.CommandEventHandler(Delete_Command);

                    rowItem = new TableRow();

                    cellItemImage    = new TableCell();
                    cellItemSelect   = new TableCell();
                    cellItemDelete   = new TableCell();
                    cellItemFileName = new TableCell();
                    cellItemImage.Controls.Add(flashMovie);
                    cellItemFileName.Controls.Add(filenameLbl);
                    cellItemSelect.Controls.Add(selectCmd);
                    cellItemDelete.Controls.Add(deleteCmd);


                    rowItem.Controls.Add(cellItemImage);
                    rowItem.Controls.Add(cellItemFileName);
                    rowItem.Controls.Add(cellItemSelect);
                    rowItem.Controls.Add(cellItemDelete);

                    flashTable.Controls.Add(rowItem);
                    gallerymessage.Text = string.Empty;
                }
            }
        }