Пример #1
0
        //public
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            NdiMenuItem item0 =
            new NdiMenuItem(0, "Állás keresések listája", "Elérhetõ állás keresések szûréssel", "JobFinds.aspx", "_images/searchKexWordS.gif",
                        "_images/searchKexWordL.gif");

              NdiMenuItem item1 =
            new NdiMenuItem(1, "Új állás keresés rögzítése", "Új állás keresés rögzítése", "JobFindCreate.aspx", "_images/searchFreeTextS.gif",
                        "_images/searchFreeTextL.gif");
              NdiMenuItem item2 =
            new NdiMenuItem(2, "Milyen keresésekre válaszoltam", "Milyen  keresésekre válaszoltam", "JobFindMyAnswers.aspx", "_images/searchQuestionFormS.gif",
                        "_images/searchQuestionFormL.gif");

              NdiMenuItem item3 =
            new NdiMenuItem(3, "Saját állás kereséseim", "Saját állás kereséseim", "JobFindsFromMe.aspx", "_images/searchQuestionFormS.gif",
                        "_images/searchQuestionFormL.gif");

              Table table = new Table();
              table.CellPadding = 0;
              table.CellSpacing = 0;
              table.CssClass = "almenu";
              TableRow row1 = new TableRow();
              TableRow row2 = new TableRow();
              TableCell cell0 = CreateCell(item0);

              TableCell cell1 = CreateCell(item1);
              TableCell cell2 = CreateCell(item2);
              TableCell cell3 = CreateCell(item3);

              table.Rows.Add(row2);
              table.Rows.Add(row1);
              if (item0.Index == m_selectedindex)
            row1.Cells.Add(cell0);
              else
            row2.Cells.Add(cell0);

              if (item1.Index == m_selectedindex)
            row1.Cells.Add(cell1);
              else
            row2.Cells.Add(cell1);

              if (item2.Index == m_selectedindex)
            row1.Cells.Add(cell2);
              else
            row2.Cells.Add(cell2);

              if (item3.Index == m_selectedindex)
            row1.Cells.Add(cell3);
              else
            row2.Cells.Add(cell3);

              if (row1.Cells != null && row1.Cells.Count > 0 && row2.Cells != null && row2.Cells.Count > 0)
              {
            row1.Cells[0].ColumnSpan = row2.Cells.Count;

              }
              table.Width = Unit.Percentage(100);

              table.RenderControl(output);
        }
Пример #2
0
        //public
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            if (Context.User.Identity.IsAuthenticated)
              {
            NdiMenuItem item0 =
              new NdiMenuItem(0, "Felhasználói adatok", "Felhasználói adatok", "UserData.aspx", "_images/userdataS.gif",
                          "_images/userdataL.gif");
            NdiMenuItem item1 =
              new NdiMenuItem(1, "Felhasználói adatok módosítása", "Felhasználói adatok módosítása", "UserDataModify.aspx",
                          "_images/userdataModS.gif",
                          "_images/userdataModL.gif");
            NdiMenuItem item2 =
              new NdiMenuItem(2, "Jelszó változtatás", "Jelszó változtatás", "UserPassword.aspx", "_images/passChangeS.gif",
                          "_images/passChangeL.gif");

            Table table = new Table();
            table.CellPadding = 0;
            table.CellSpacing = 0;
            table.CssClass = "almenu";
            TableRow row1 = new TableRow();

            TableCell cell0 = CreateCell(item0);

            TableCell cell2 = CreateCell(item2);
            TableCell cell1 = CreateCell(item1);

            table.Rows.Add(row1);
            row1.Cells.Add(cell0);

            row1.Cells.Add(cell1);
            row1.Cells.Add(cell2);
            table.Width = Unit.Percentage(100);

            table.RenderControl(output);
              }
        }
Пример #3
0
        /// <summary>
        /// Creates the cell.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns></returns>
        private TableCell CreateCell(NdiMenuItem item)
        {
            TableCell cell = new TableCell();
              Image img = new Image();
              img.ImageAlign = ImageAlign.AbsMiddle;
              //HtmlGenericControl div = new HtmlGenericControl();
              //div.TagName = "div";
              //cell.Controls.Add(div);
              bool selected = (item.Index == m_selectedindex);
              if (selected)
              {
            img.ImageUrl = item.ImageUrlL;
            img.Width = Unit.Pixel(48);
            img.Height = Unit.Pixel(48);
            Label lbl = new Label();
            lbl.Text = item.Description;
            cell.Controls.Add(img);
            cell.Controls.Add(lbl);
            cell.CssClass = "aktiv";
            cell.VerticalAlign = VerticalAlign.Middle;
              }
              else
              {
            img.ImageUrl = item.ImageUrlS;
            img.Width = Unit.Pixel(16);
            img.Height = Unit.Pixel(16);
            HyperLink link = new HyperLink();
            link.Text = item.Title;
            link.ToolTip = item.Description;
            link.NavigateUrl = item.Url;
            cell.Controls.Add(img);
            cell.Controls.Add(link);
            cell.CssClass = "inaktiv";
            cell.VerticalAlign = VerticalAlign.Middle;
              }
              //div.Controls.Add(img);

              return cell;
        }
Пример #4
0
        //public
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            NdiMenuItem item0 =
            new NdiMenuItem(0, "Szabadszöveges keresés", "Szabadszöveges", "SearchFreetext.aspx", "_images/searchFreeTextS.gif",
                        "_images/searchFreeTextL.gif");
              NdiMenuItem item1 =
            new NdiMenuItem(1, "Kulcsszavas keresés", "Kulcsszavas", "SearchKeyword.aspx", "_images/searchKexWordS.gif",
                        "_images/searchKexWordL.gif");
              NdiMenuItem item2 =
            new NdiMenuItem(2, "Tematikus keresés", "Tematikus", "SearchByQuestionForm.aspx", "_images/searchQuestionFormS.gif",
                        "_images/searchQuestionFormL.gif");
              NdiMenuItem item3 =
            new NdiMenuItem(3, "Megyék szerinti keresés", "Megyék szerint", "SearchMap.aspx", "_images/searchMapS.gif",
                        "_images/searchMapL.gif");
              NdiMenuItem item4 =
            new NdiMenuItem(4, "Szervezetek listája", "Szervezetek", "OrganisationList.aspx", "_images/searchOrganisationS.gif",
                        "_images/searchOrganisationL.gif");
              NdiMenuItem item5 =
            new NdiMenuItem(5, "Programok listája", "Programok", "ProgramList.aspx", "_images/searchProgramS.gif",
                        "_images/searchProgramL.gif");
              NdiMenuItem item6 =
            new NdiMenuItem(6, "Szakemberek listája", "Szakemberek", "ExpertList.aspx", "_images/searchExpertS.gif",
                        "_images/searchExpertL.gif");

              Table table = new Table();
              table.CellPadding = 0;
              table.CellSpacing = 0;
              table.CssClass = "almenu";
              TableRow row1 = new TableRow();
              TableRow row2 = new TableRow();
              TableCell cell0 = CreateCell(item0);

              TableCell cell2 = CreateCell(item2);
              TableCell cell3 = CreateCell(item3);
              TableCell cell4 = CreateCell(item4);
              TableCell cell5 = CreateCell(item5);
              TableCell cell6 = CreateCell(item6);
              table.Rows.Add(row2);
              table.Rows.Add(row1);
              if (item0.Index == m_selectedindex)
            row1.Cells.Add(cell0);
              else
            row2.Cells.Add(cell0);

              // A keyword menu configból jön
              if (GetMenuVisibility("SearchKeywordMenu.Visibility"))
              {
            TableCell cell1 = CreateCell(item1);
            if (item1.Index == m_selectedindex)
              row1.Cells.Add(cell1);
            else
              row2.Cells.Add(cell1);
              }
              if (item2.Index == m_selectedindex)
            row1.Cells.Add(cell2);
              else
            row2.Cells.Add(cell2);
              if (item3.Index == m_selectedindex)
            row1.Cells.Add(cell3);
              else
            row2.Cells.Add(cell3);
              if (item4.Index == m_selectedindex)
            row1.Cells.Add(cell4);
              else
            row2.Cells.Add(cell4);
              if (item5.Index == m_selectedindex)
            row1.Cells.Add(cell5);
              else
            row2.Cells.Add(cell5);

              if (Context != null && Context.User != null && Context.User.Identity != null && Context.User.Identity.IsAuthenticated)
              {
            if (item6.Index == m_selectedindex)
              row1.Cells.Add(cell6);
            else
              row2.Cells.Add(cell6);
              }
              if(row1.Cells != null && row1.Cells.Count> 0 && row2.Cells != null && row2.Cells.Count > 0)
              {
            row1.Cells[0].ColumnSpan = row2.Cells.Count;

              }
              table.Width = Unit.Percentage(100);

              table.RenderControl(output);
        }
Пример #5
0
        //public
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            NdiMenuItem item0 =
            new NdiMenuItem(0, "Szervezet regisztrációja", "Szervezet regisztrációja", "RegisterNewOrganisation.aspx", "_images/regOrgS.gif",
                        "_images/regOrgL.gif");
              NdiMenuItem item1 =
            new NdiMenuItem(1, "Felhasználó regisztrációja", "Felhasználó regisztrációja", "RegisterNewUser.aspx", "_images/regUserS.gif",
                        "_images/regUserL.gif");
              NdiMenuItem item2 =
            new NdiMenuItem(2, "Felhasználó regisztrációja szervezethez", "Felhasználó regisztrációja szervezethez", "RegisterNewUser.aspx?mnu=reg", "_images/regUserToOrgS.gif",
                        "_images/regUserToOrgL.gif");
              NdiMenuItem item3 =
            new NdiMenuItem(3, "Új szervezet regisztrációja bejelentkezett felhasználóhoz", "Új szervezet regisztrációja bejelentkezett felhasználóhoz", "RegisterNewOrgToUser.aspx", "_images/RegOrgToUserS.gif",
                        "_images/RegOrgToUserL.gif");
              NdiMenuItem item4 =
            new NdiMenuItem(4, "Írási jog kérése egy SZIP szervezethez", "Írási jog kérése egy SZIP szervezethez", "OrganisationGetWriteRight.aspx", "_images/GetWriteRightS.gif",
                        "_images/GetWriteRightL.gif");

              Table table = new Table();
              table.CellPadding = 0;
              table.CellSpacing = 0;
              table.CssClass = "almenu";
              TableRow row1 = new TableRow();
              TableRow row2 = new TableRow();
              TableCell cell0 = CreateCell(item0);

              TableCell cell2 = CreateCell(item2);
              TableCell cell3 = CreateCell(item3);
              TableCell cell4 = CreateCell(item4);

              if (!Context.User.Identity.IsAuthenticated)
              {
            row1.Cells.Add(cell0);

            TableCell cell1 = CreateCell(item1);
            row1.Cells.Add(cell1);
            table.Rows.Add(row1);
              }
              else
              {
            if (item2.Index == m_selectedindex)
              row1.Cells.Add(cell2);
            else
              row2.Cells.Add(cell2);
            if (item3.Index == m_selectedindex)
              row1.Cells.Add(cell3);
            else
              row2.Cells.Add(cell3);
            if (item4.Index == m_selectedindex)
              row1.Cells.Add(cell4);
            else
              row2.Cells.Add(cell4);

            table.Rows.Add(row2);
            table.Rows.Add(row1);

            if (row1.Cells != null && row1.Cells.Count > 0 && row2.Cells != null && row2.Cells.Count > 0)
            {
              row1.Cells[0].ColumnSpan = row2.Cells.Count;
            }
              }

              table.Width = Unit.Percentage(100);

              table.RenderControl(output);
        }