Exemplo n.º 1
0
        public void wbtn2_Click(object sender, EventArgs e)
        {
            pnlMappen.Controls.Clear();
            Button button = sender as Button;

            // Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('" + button.ID + " - " + button.ID.Substring(2) + "');</script>");



            c = new Categorie();
            Session["categorie"] = (String)button.ID.Substring(2);
            c.getSUBCategorie();
            foreach (Categorie cat in c.categorieen)
            {
                Button ButtonChange = new Button();
                ButtonChange.Height = 100;
                ButtonChange.Width  = 120;

                ButtonChange.Text                  = cat.Naam;
                ButtonChange.ID                    = "id" + cat.BijdrageID.ToString();
                ButtonChange.Font.Size             = FontUnit.Point(7);
                ButtonChange.ControlStyle.CssClass = "button";
                ButtonChange.Click                += new EventHandler(wbtn_Click);
                //  ButtonChange.OnClientClick = "return false";
                // ButtonChange.CausesValidation = false;

                pnlMappen.Controls.Add(ButtonChange);
            }
        }
Exemplo n.º 2
0
        //private void Cancel()
        //{
        //    ClientScriptManager csm = Page.ClientScript;
        //    string tmp1 = "fnClose(); ";
        //    csm.RegisterStartupScript(GetType(), "startup1", tmp1, true);
        //}

        private void Connect()
        {
            phControls.Controls.Clear();
            DataTable dt;

            if (Request["templateID"] != null)
            {
                dt = wf.workflow2.GetTemplate(Request["templateID"]);
            }
            else
            {
                dt = wf.workflow2.GetTemplateList(wf._BP);
            }
            foreach (DataRow dr2 in dt.Rows)
            {
                Label lbl = new Label();
                lbl.Font.Bold = true;
                lbl.Font.Name = "Tahoma";
                lbl.Font.Size = FontUnit.Point(11);
                lbl.Text      = dr2["Description"].ToString();
                phControls.Controls.Add(lbl);

                Table tb1 = wf.drawSteps((int)dr2["ID"], true, _tableWidth, false);
                phControls.Controls.Add(tb1);

                HtmlGenericControl gc1 = new HtmlGenericControl();
                gc1.InnerHtml = "<br />";
                phControls.Controls.Add(gc1);
            }
        }
Exemplo n.º 3
0
 private static void ApplyCommonStyle(Label lbl)
 {
     lbl.Font.Name = "Arial";
     lbl.Font.Size = FontUnit.Parse("18px", CultureInfo.InvariantCulture);
     lbl.Font.Bold = true;
     lbl.Style[HtmlTextWriterStyle.Padding] = "3px 8px 3px 8px";
 }
Exemplo n.º 4
0
        public override void RenderControl(System.Web.UI.HtmlTextWriter writer)
        {
            this.Font.Name              = "Tahoma";
            this.Font.Size              = FontUnit.Point(8);
            this.RowStyle.Height        = Unit.Pixel(20);
            this.RowStyle.VerticalAlign = VerticalAlign.Top;
            try
            {
                this.HeaderRow.BorderWidth = Unit.Pixel(1);
                this.HeaderRow.BackColor   = System.Drawing.Color.Black;
                this.HeaderRow.ForeColor   = System.Drawing.Color.White;
                this.HeaderRow.Height      = Unit.Pixel(30);
                this.HeaderRow.BorderColor = System.Drawing.Color.White;
                this.HeaderRow.BorderStyle = BorderStyle.Solid;
            } catch (Exception ex)
            {
            }


            for (int i = 0; i < this.Rows.Count; i++)
            {
                if (i % 2 == 0)
                {
                    this.Rows[i].BackColor = System.Drawing.Color.WhiteSmoke;
                }
            }
            base.RenderControl(writer);
        }
Exemplo n.º 5
0
        public void FontUnitConstructors1()
        {
            FontUnit f1 = new FontUnit(FontSize.Large);

            Assert.AreEqual(f1.Type, FontSize.Large, "A1");
            Assert.AreEqual(f1.Unit, Unit.Empty, "A1.1");
        }
Exemplo n.º 6
0
        public void FontUnitConstructors5()
        {
            FontUnit f1 = new FontUnit("");

            Assert.AreEqual(f1.Type, FontSize.NotSet, "A10");
            Assert.AreEqual(f1.Unit.IsEmpty, true, "A11");
        }
Exemplo n.º 7
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (DesignMode)
            {
                return;
            }


            NodeIndent         = 15;
            EnableClientScript = true;
            ShowLines          = true;

            NodeStyle.Font.Size         = FontUnit.Point(8);
            NodeStyle.ForeColor         = Color.Black;
            NodeStyle.HorizontalPadding = Unit.Pixel(2);
            NodeStyle.NodeSpacing       = Unit.Pixel(0);
            NodeStyle.VerticalPadding   = Unit.Pixel(2);

            HoverNodeStyle.Font.Underline = true;
            HoverNodeStyle.ForeColor      = ConverterColor.ToColor("#6666AA");

            Nodes.Add(CreateNode("Root", 0, true));
        }
Exemplo n.º 8
0
        void RunFontUnit_IFormatProviderToString_Tests()
        {
            MyFormatProvider mfp = new MyFormatProvider();

            FontUnit f1 = new FontUnit(FontSize.Large);

            Assert.AreEqual("Large", f1.ToString(mfp), "T1");

            f1 = new FontUnit(FontSize.AsUnit);
            Assert.AreEqual("10pt", f1.ToString(mfp), "T2");

            f1 = new FontUnit(15);
            Assert.AreEqual("15pt", f1.ToString(mfp), "T3");

            f1 = new FontUnit(null);
            Assert.AreEqual("", f1.ToString(mfp), "T4");

            f1 = new FontUnit("");
            Assert.AreEqual("", f1.ToString(mfp), "T5");

            f1 = new FontUnit(2.5);
            Assert.AreEqual("2.5pt", f1.ToString(mfp), "T6");

            f1 = new FontUnit(5.0, UnitType.Percentage);
            Assert.AreEqual("5%", f1.ToString(mfp), "T7");
        }
Exemplo n.º 9
0
        public void inserisciCampoSeparatore(DocsPAWA.DocsPaWR.OggettoCustom oggettoCustom)
        {
            if (oggettoCustom.DESCRIZIONE.Equals(""))
            {
                return;
            }

            Label etichettaCampoSeparatore = new Label();

            etichettaCampoSeparatore.Text      = oggettoCustom.DESCRIZIONE;
            etichettaCampoSeparatore.Font.Size = FontUnit.Point(8);
            etichettaCampoSeparatore.Font.Bold = true;
            etichettaCampoSeparatore.Font.Name = "Verdana";

            System.Web.UI.HtmlControls.HtmlGenericControl rigaSeparatore = new HtmlGenericControl("hr");
            rigaSeparatore.Style.Value = "width=100%;";

            TableRow  row_1  = new TableRow();
            TableCell cell_1 = new TableCell();

            cell_1.Controls.Add(etichettaCampoSeparatore);
            cell_1.Controls.Add(rigaSeparatore);
            cell_1.ColumnSpan = 2;
            row_1.Cells.Add(cell_1);
            table.Rows.Add(row_1);
        }
Exemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PopupWin1.Visible = false;
        if (!Page.IsPostBack)
        {
            String    sql1            = "select * from [qingjia] where q_statue='1' ORDER BY q_enddate DESC";
            DataTable dt_allgongzuori = SqlHelper.ExecuteDataTable(sql1);
            int       i_all           = dt_allgongzuori.Rows.Count;

            if (i_all > 0)
            {
                PopupWin1.Visible        = true;
                this.PopupWin1.Message   = "你有员工申请申报消息需要处理";
                this.PopupWin1.Font.Size = FontUnit.Point(42);
            }
            else
            {
                PopupWin1.Visible = false;
            }
            Calendar1.Visible = false;
            Calendar2.Visible = false;
            seeknowkaoqin();
            startime.Text = DateTime.Now.AddDays(-6).ToString("yyyy-MM-dd");
            endtime.Text  = DateTime.Now.ToString("yyyy-MM-dd");
        }
    }
Exemplo n.º 11
0
        private static System.Drawing.Font FontFromFontInfo(FontInfo fontInfo, float defaultSizeInPoints)
        {
            FontUnit unit = fontInfo.Size;
            float    num  = defaultSizeInPoints;

            if ((unit.Unit.Type == (UnitType)2) && (unit.Type == (FontSize)1))
            {
                num = (float)unit.Unit.Value;
            }
            FontStyle style = 0;

            if (fontInfo.Bold)
            {
                style |= (FontStyle)1;
            }
            if (fontInfo.Italic)
            {
                style |= (FontStyle)2;
            }
            if (fontInfo.Underline)
            {
                style |= (FontStyle)4;
            }
            if (fontInfo.Strikeout)
            {
                style |= (FontStyle)8;
            }
            if (style == null)
            {
                style = 0;
            }
            return(new System.Drawing.Font(fontInfo.Name, num, style, (GraphicsUnit)3));
        }
Exemplo n.º 12
0
 private void RefreshFonts(FontUnit fontUnit)
 {
     LoadPabelbar();
     //pnlbasket.Font.Size = fontUnit;
     gMenu.Rebind();
     ResizeControlsFont();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        Poll1.ID                  = "Poll1";
        Poll1.DataSourceID        = "SqlDataSource1";
        Poll1.VotingMode          = PollVotingMode.SingleAnswer;
        Poll1.MinAnswers          = 1;
        Poll1.Title               = "Favorite Movie";
        Poll1.Question            = "What is your favorite movie?";
        Poll1.AllowedVotesPerUser = 100;
        phPoll1.Controls.Add(Poll1);

        Poll1.AnswerStyle.Font.Size   = FontUnit.Parse(AnswersFontSize.Text);
        Poll1.AnswerStyle.Font.Bold   = AnswersFontBold.Checked;
        Poll1.AnswerStyle.Font.Italic = AnswersFontItalic.Checked;
        Poll1.AnswerStyle.ForeColor   = Color.FromName(AnswersForeColor.Text);

        Poll1.ResultStyle.Font.Size   = FontUnit.Parse(ResultsFontSize.Text);
        Poll1.ResultStyle.Font.Bold   = ResultsFontBold.Checked;
        Poll1.ResultStyle.Font.Italic = ResultsFontItalic.Checked;
        Poll1.ResultStyle.ForeColor   = Color.FromName(ResultsForeColor.Text);

        Poll1.TitleStyle.Font.Size   = FontUnit.Parse(TitleFontSize.Text);
        Poll1.TitleStyle.Font.Bold   = TitleFontBold.Checked;
        Poll1.TitleStyle.Font.Italic = TitleFontItalic.Checked;
        Poll1.TitleStyle.ForeColor   = Color.FromName(TitleForeColor.Text);

        Poll1.QuestionStyle.Font.Size   = FontUnit.Parse(QuestionFontSize.Text);
        Poll1.QuestionStyle.Font.Bold   = QuestionFontBold.Checked;
        Poll1.QuestionStyle.Font.Italic = QuestionFontItalic.Checked;
        Poll1.QuestionStyle.ForeColor   = Color.FromName(QuestionForeColor.Text);
    }
Exemplo n.º 14
0
        public void cmdUpdate_Click(object sender, EventArgs args)
        {
            // Update the color
            pnlCard.BackColor = System.Drawing.Color.FromName(lstBackColor.SelectedItem.Text);

            // update font
            lblGreeting.Font.Name = lstFontName.SelectedItem.Text;

            if (Int32.Parse(txtFontSize.Text) > 0)
            {
                lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(txtFontSize.Text));
            }

            // update the border style requires two conversion steps
            // first, the value of the list item is converted from a string
            // to an integer. Next, the integer is converted into a value in
            // the BorderStyle enumeration
            int borderValue = Int32.Parse(lstBorder.SelectedItem.Value);

            pnlCard.BorderStyle = (BorderStyle)borderValue;

            // update the picture
            if (chkPicture.Checked)
            {
                imgDefault.Visible = true;
            }
            else
            {
                imgDefault.Visible = false;
            }

            // set the text
            lblGreeting.Text = txtGreeting.Text;
        }
Exemplo n.º 15
0
    private void AutoCarMenu(TreeView trvMenu)
    {
        trvMenu.Nodes.Clear();
        trvMenu.Font.Name = "宋体";
        trvMenu.Font.Size = FontUnit.Parse("10");

        string strSql = "select t_R_RoleMenu.MenuID,MenuName,URL from t_R_Role,t_R_Menu,t_R_RoleMenu " +
                        " where t_R_Role.RoleID=t_R_RoleMenu.RoleID and " +
                        " t_R_RoleMenu.MenuID=t_R_Menu.ID and " +
                        " t_R_Role.RoleID='" + Request.Cookies["Cookies"].Values["u_role"].ToString() + "' and " +
                        "t_R_Menu.FatherID='0' and t_R_Menu.flag>=1 and t_R_RoleMenu.checked='1' and t_R_Menu.id=63 order by t_R_Menu.OrderID";
        DataSet ds = new MyDataOp(strSql).CreateDataSet();

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            TreeNode tnFather = new TreeNode();
            tnFather.Text        = ds.Tables[0].Rows[i]["MenuName"].ToString();
            tnFather.NavigateUrl = ds.Tables[0].Rows[i]["URL"].ToString();
            if (tnFather.NavigateUrl == "#")
            {
                tnFather.Expanded = true;
            }
            else
            {
                tnFather.Expanded = true;
            }
            trvMenu.Nodes.Add(tnFather);
            CreateCarChildNodes(tnFather, Int16.Parse(ds.Tables[0].Rows[i]["MenuID"].ToString()));
        }
        ds.Dispose();
    }
    protected void CreateRangeTextBoxes()
    {
        int j = DataTypeIndex.GetValueOrDefault();

        ++j;
        TableCell cell2 = new TableCell();

        cell2.ID = "Range";
        TextBox tb1  = new TextBox();
        TextBox tb2  = new TextBox();
        Label   lbl1 = new Label();
        Label   lbl2 = new Label();

        // Set a unique ID for each TextBox added
        tb1.ID         = "lowerbound_" + j.ToString();
        tb2.ID         = "upperbound_" + j.ToString();
        lbl1.Text      = "LowerBound:";
        lbl1.Font.Size = FontUnit.Point(10);
        lbl1.Font.Bold = true;
        lbl1.Font.Name = "Arial";
        lbl2.Text      = "UpperBound:";
        lbl2.Font.Size = FontUnit.Point(10);
        lbl2.Font.Bold = true;
        lbl2.Font.Name = "Arial";
        cell2.Controls.Add(lbl1);
        cell2.Controls.Add(tb1);
        cell2.Controls.Add(lbl2);
        cell2.Controls.Add(tb2);
        TableRow rowtwo = dynamic_filter_table.FindControl("TableRow_") as TableRow;

        rowtwo.Cells.Add(cell2);
        dynamic_filter_table.Rows.Add(rowtwo);
        dynamic_filter_table.EnableViewState = true;
        ViewState["dynamic_filter_table"]    = true;
    }
Exemplo n.º 17
0
        protected void Button5_Click(object sender, EventArgs e)
        {
            // Update the color.
            pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text);
            // Update the font.
            lblGreeting.Font.Name = lstFontName.SelectedItem.Text;
            if (Int32.Parse(txtFontSize.Text) > 0)
            {
                lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(txtFontSize.Text));
            }

            // Find the appropriate TypeConverter for the BorderStyle enumeration.
            TypeConverter converter = TypeDescriptor.GetConverter(typeof(BorderStyle));

            // Update the border style using the value from the converter.
            pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString(lstBorder.SelectedItem.Text);
            // int borderValue = Int32.Parse(lstBorder.SelectedItem.Value);
            // pnlCard.BorderStyle = (BorderStyle)borderValue;
            // Update the picture.
            if (chkPicture.Checked)
            {
                imgDefault.Visible = true;
            }
            else
            {
                imgDefault.Visible = false;
            }
            // Set the text.
            lblGreeting.Text = txtGreeting.Text;
            // Refresh the greeting card (because a control was changed).
            MultiView1.Visible = false;
            UpdateCard();
        }
Exemplo n.º 18
0
 //This is page load event of Logout Page, this event will be triggered when user redirected to this page
 protected void Page_Load(object sender, EventArgs e)
 {
     //Check all three variables Session1, Session2, Cookie. If all the three are not null then proceed further
     if (Session["userLoggedin"] != null && Session["AuthToken"] != null &&
         Request.Cookies["AuthToken"] != null)
     {
         //Second Check, if Cookie we created has the same value as Second Session we've created
         if ((Session["AuthToken"].ToString().Equals(
                  Request.Cookies["AuthToken"].Value)))
         {
             lblMessage.ForeColor = System.Drawing.Color.Green;
             lblMessage.Font.Size = FontUnit.Point(15);
             lblMessage.Text      = "Welcome " + Session["userLoggedin"].ToString();
             btnLogout.Visible    = true;
             string cookieValue = "";
             cookieValue             = Request.Cookies["AuthToken"].Value;
             lblAuthCookie.ForeColor = System.Drawing.Color.Green;
             lblAuthCookie.Font.Size = FontUnit.Point(15);
             lblAuthCookie.Text      = "You AuthToken is " + cookieValue;
         }
         else
         {
             Response.Redirect("~/SecureLoginFunc/SecureLogin.aspx");
         }
     }
 }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Update the color.
            pnlCard.BackColor = Color.FromName(Session["color"].ToString());
            // Update the font.
            lblGreeting.Font.Name = Session["fname"].ToString();
            if (Int32.Parse(Session["fsize"].ToString()) > 0)
            {
                lblGreeting.Font.Size = FontUnit.Point(Int32.Parse(Session["fsize"].ToString()));
            }

            // Find the appropriate TypeConverter for the BorderStyle enumeration.
            TypeConverter converter = TypeDescriptor.GetConverter(typeof(BorderStyle));

            // Update the border style using the value from the converter.
            pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString(Session["border"].ToString());
            // int borderValue = Int32.Parse(lstBorder.SelectedItem.Value);
            // pnlCard.BorderStyle = (BorderStyle)borderValue;
            // Update the picture.
            imgDefault.ImageUrl = "imgDefault.jpeg";
            if (Session["pic"].ToString() == "True")
            {
                imgDefault.Visible = true;
            }
            else
            {
                imgDefault.Visible = false;
            }
            // Set the text.
            lblGreeting.Text = Session["text"].ToString();
            UpdateCard();
        }
Exemplo n.º 20
0
        protected void cmdUpdate_Click(object sender, EventArgs e)
        {
            // Update the color.
            pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text);

            // Update the font.
            lblGreeting.Font.Name = lstFontName.SelectedItem.Text;
            if (Int32.Parse(txtFontSize.Text) > 0)
            {
                lblGreeting.Font.Size =
                    FontUnit.Point(Int32.Parse(txtFontSize.Text));
            }
            // Update the border style. This requires two conversion steps.
            // First, the value of the list item is converted from a string
            // into an integer. Next, the integer is converted to a value in
            // the BorderStyle enumeration.
            // Find the appropriate TypeConverter for the BorderStyle enumeration.
            TypeConverter converter =
                TypeDescriptor.GetConverter(typeof(BorderStyle));

            // Update the border style using the value from the converter.
            pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString(
                lstBorder.SelectedItem.Text);
            // Update the picture.
            if (chkPicture.Checked)
            {
                imgDefault.Visible = true;
            }
            else
            {
                imgDefault.Visible = false;
            }
            // Set the text.
            lblGreeting.Text = txtGreeting.Text;
        }
Exemplo n.º 21
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     Button1.Text      = "STOP";
     Button1.Font.Size = FontUnit.Point(38);
     Button2.Text      = "就叫你別按吧!!!!";
     Button1.BackColor = System.Drawing.Color.Yellow;
 }
Exemplo n.º 22
0
    protected void ultraLegend_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        intRowNum += 1;
        if (intRowNum == 1)
        {
            e.Row.Cells.FromKey("VIEW_NAME").Value = "조직점수";
            e.Row.Style.Font.Bold = true;

            e.Row.Cells.FromKey("VIEW_NAME").Style.ForeColor = System.Drawing.Color.Chocolate;
            e.Row.Cells.FromKey("SCORE").Style.ForeColor     = System.Drawing.Color.Chocolate;
            e.Row.Cells.FromKey("WEIGHT").Style.ForeColor    = System.Drawing.Color.Chocolate;

            e.Row.Cells.FromKey("VIEW_NAME").Style.Font.Size = FontUnit.Point(11);
            e.Row.Cells.FromKey("SCORE").Style.Font.Size     = FontUnit.Point(11);
            e.Row.Cells.FromKey("WEIGHT").Style.Font.Size    = FontUnit.Point(11);
            e.Row.Height = Unit.Pixel(20);
            //e.Row.Style.BackColor = Color.Aqua;
        }
        else
        {
            e.Row.Cells.FromKey("VIEW_NAME").Style.ForeColor = System.Drawing.Color.Navy;
            e.Row.Cells.FromKey("SCORE").Style.ForeColor     = System.Drawing.Color.Navy;
            e.Row.Cells.FromKey("WEIGHT").Style.ForeColor    = System.Drawing.Color.Navy;

            e.Row.Style.Font.Bold = false;
            e.Row.Cells.FromKey("VIEW_NAME").Value = "" + e.Row.Cells.FromKey("VIEW_NAME").Value;
        }

        e.Row.Cells.FromKey("DASH").Value = "/";
    }
Exemplo n.º 23
0
        public BoundField buildBoundField(SelectedColumns.Column col, int width)
        {
            BoundField bf = new BoundField();

            bf.DataField = col.dbFieldName;

            bf.HeaderText                  = col.HeaderText;
            bf.HeaderStyle.CssClass        = "SP_dataLabel_Header";
            bf.HeaderStyle.Wrap            = false;
            bf.HeaderStyle.HorizontalAlign = col.horizontalAlign;

            bf.ItemStyle.Font.Size = FontUnit.Point(8);
            bf.ItemStyle.CssClass  = "SP_dataLabel";
            if (width > 0)
            {
                bf.ItemStyle.Width = Unit.Percentage(width);
            }
            bf.ItemStyle.Wrap            = col.wrap;
            bf.ItemStyle.HorizontalAlign = col.horizontalAlign;
            if (col.dataFormat.Length > 0)
            {
                bf.DataFormatString = col.dataFormat;
            }
            return(bf);
        }
Exemplo n.º 24
0
 private void SetTableTitle(string tabTitle)
 {
     this.Table1.Visible = true;
     this.Table1.Rows[0].Cells[0].Text      = tabTitle;
     this.Table1.Rows[0].Cells[0].Font.Size = FontUnit.Parse("12pt");
     this.Table1.Rows[0].Height             = Unit.Parse("25pt");
 }
Exemplo n.º 25
0
    protected void btnLogon_Click(object sender, System.EventArgs e)
    {
        string adPath     = System.Configuration.ConfigurationManager.AppSettings["DefaultServer"];
        string domainName = System.Configuration.ConfigurationManager.AppSettings["DefaultDomain"];

        SunGard.Global.DirectoryServices.LdapAuthentication adAuth = new SunGard.Global.DirectoryServices.LdapAuthentication(adPath);
        LogonAuthenticator adAuthenticator = new LogonAuthenticator(adPath, domainName, adAuth);

        Guid cacheGuid = new Guid("00000000-0000-0000-0000-000000000001");

        try
        {
            if (adAuthenticator.DoLogin(txtUserName.Text, txtPassword.Text, cacheGuid))
            {
                Response.Redirect(FormsAuthentication.GetRedirectUrl(txtUserName.Text, false));
            }
        }
        catch (Exception ex)
        {
            lblError.Visible   = true;
            lblError.ForeColor = Color.White;
            lblError.Font.Size = FontUnit.Point(10);
            lblError.Text      = ex.Message;
        }
    }
Exemplo n.º 26
0
        public BoundField buildBoundField(string header, string dataField, int width, bool wrap, string dataFormat)
        {
            BoundField bf = new BoundField();

            bf.DataField = dataField;

            bf.HeaderText = header;
            //bf.HeaderStyle.Font.Name = "Tahoma";
            bf.HeaderStyle.CssClass        = "SP_dataLabel_Header";
            bf.HeaderStyle.Wrap            = false;
            bf.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;

            bf.ItemStyle.Font.Size = FontUnit.Point(8);
            bf.ItemStyle.CssClass  = "SP_dataLabel";
            if (width > 0)
            {
                bf.ItemStyle.Width = Unit.Percentage(width);
            }
            bf.ItemStyle.Wrap = wrap;
            if (dataFormat.Length > 0)
            {
                bf.DataFormatString = dataFormat;
            }
            return(bf);
        }
Exemplo n.º 27
0
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        Save += btnOk_Click;

        mHiddenFieldId = Request.QueryString["hiddenId"];
        mFontTypeId    = Request.QueryString["fontTypeId"];

        if (!RequestHelper.IsPostBack())
        {
            FillFontStyleListBox();

            string fontType = WindowHelper.GetItem(mHiddenFieldId) as string;
            if (fontType != null)
            {
                string[] fontParams = fontType.Split(new [] { ';' });
                if (fontParams.Length == 5)
                {
                    txtFontType.Text = fontParams[0];

                    lstFontStyle.SelectedValue = fontParams[1].ToLowerCSafe();

                    txtFontSize.Text = fontParams[2];

                    chkUnderline.Checked = fontParams[3].EqualsCSafe("underline", true);
                    chkStrike.Checked    = fontParams[4].EqualsCSafe("strikethrought", true);
                }
            }

            FillFontSizeListBox();
            FillFontTypeListBox();
        }
        else
        {
            txtFontSize.Text = lstFontSize.SelectedValue;
            txtFontType.Text = lstFontType.SelectedValue;
        }

        ListItem li = lstFontStyle.SelectedItem;

        if (li != null)
        {
            txtFontStyle.Text = li.Text;
        }

        // Setup sample text
        lblSampleText.Font.Name      = txtFontType.Text;
        lblSampleText.Font.Size      = FontUnit.Point(ValidationHelper.GetInteger(txtFontSize.Text, 11));
        lblSampleText.Font.Strikeout = chkStrike.Checked;
        lblSampleText.Font.Underline = chkUnderline.Checked;
        if (txtFontStyle.Text.ToLowerCSafe().Contains("bold"))
        {
            lblSampleText.Font.Bold = true;
        }
        if (txtFontStyle.Text.ToLowerCSafe().Contains("italic"))
        {
            lblSampleText.Font.Italic = true;
        }
    }
Exemplo n.º 28
0
        protected void cmdUpdate_Click(object sender, EventArgs e)
        {
            //update the color
            pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text);
            //update font
            lblGretting.Font.Name = lstFontName.SelectedItem.Text;
            if (int.Parse(txtFontSize.Text) > 0)
            {
                lblGretting.Font.Size = FontUnit.Point(int.Parse(txtFontSize.Text));
            }
            // find the appropiate TypeConverter for the BorderStyle enumeration
            TypeConverter converter = TypeDescriptor.GetConverter(typeof(BorderStyle));

            // update the border style using the value from converter
            pnlCard.BorderStyle = (BorderStyle)converter.ConvertFromString(lstBorder1.SelectedItem.Text);
            //update pic
            if (chkPicture.Checked)
            {
                imgDefault.Visible = true;
            }
            else
            {
                imgDefault.Visible = false;
            }

            lblGretting.Text = txtGreeting.Text;
            //My first change to be commited to the local repo.
        }
Exemplo n.º 29
0
        protected void cmdUpdate_Click(object sender, EventArgs e)
        {
            // Update the color.
            pnlCard.BackColor = Color.FromName(lstBackColor.SelectedItem.Text);
            // Update the font.
            lblGreeting.Font.Name = lstFontName.SelectedItem.Text;
            if (Int32.Parse(txtFontSize.Text) > 0)
            {
                lblGreeting.Font.Size =
                    FontUnit.Point(Int32.Parse(txtFontSize.Text));
            }
            // Update the border style. This requires two conversion steps.
            // First, the value of the list item is converted from a string
            // into an integer. Next, the integer is converted to a value in
            // the BorderStyle enumeration.
            int borderValue = Int32.Parse(lstBorder.SelectedItem.Value);

            pnlCard.BorderStyle = (BorderStyle)borderValue;
            // Update the picture.
            if (chkPicture.Checked)
            {
                imgDefault.Visible  = true;
                imgDefault.ImageUrl = "1.jpg";
            }
            else
            {
                imgDefault.Visible = false;
            }
            // Set the text.
            lblGreeting.Text = txtGreeting.Text;
        }
Exemplo n.º 30
0
        /// <summary>
        /// 将菜单绑定到TreeView.
        /// </summary>
        /// <param name="target">菜单项所链接地址打开的方式</param>
        /// <param name="list">数据源</param>
        protected void BindTreeView(string target, List <Model.SysFun> list)
        {
            this.tvAdmin.Nodes.Clear();
            this.tvAdmin.Font.Name = "黑体";
            this.tvAdmin.Font.Size = FontUnit.Parse("92");
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].ParentNodeId == 0)//表示绑定根菜单.
                {
                    string nodeID = list[i].NodeId.ToString();
                    string text   = list[i].DisplayName;
                    //string url=list
                    //string imageUrl = list[i].ImageUrl;
                    // int pemissionID = list[i].PermissionID;//菜单权限编号

                    //BLL.UserBLL bll = new BLL.UserBLL();
                    //ArrayList arrayList = bll.GetPermissionIDList(Convert.ToInt32(Session["UserID"]));//根据用户的编号,得到用户的权限编号

                    //在用户所具有的权限编号中查找指定的菜单的权限编号。
                    // if (arrayList.Contains(pemissionID) || pemissionID == -1)
                    //  {
                    TreeNode node = new TreeNode();
                    node.Value = nodeID;
                    node.Text  = text;
                    // node.ImageUrl = "../" + imageUrl;
                    node.Expanded = true;
                    this.tvAdmin.Nodes.Add(node);
                    BindChildTreeNodes(Convert.ToInt32(nodeID), target, node.ChildNodes, list);
                    //}
                }
            }
        }
	public static bool op_Inequality(FontUnit left, FontUnit right) {}
Exemplo n.º 32
0
 private void RefreshFonts(FontUnit fontUnit)
 {
     LoadPabelbar();
     //pnlbasket.Font.Size = fontUnit;
     gMenu.Rebind();
     ResizeControlsFont();
 }