示例#1
0
 private void FindText_Load(object sender, EventArgs e)
 {
     i     = 0;
     tempi = 1;
     this.nextFind.Enabled = false;                     //查找按钮在查找文本框没输内容时应该是不可用的
     cf           = (ChildForm)MainForm.getChildForm(); //要获取到主窗口中创建的子窗体的实例,不然直接new的话不能够准确的获取到子窗体的数据。
     isMatchWords = false;
     isCircle     = false;
     isMatchCaps  = false;
     isReverse    = false;
 }
示例#2
0
        private void FontSelectForm_Load(object sender, EventArgs e)
        {
            cf = (ChildForm)MainForm.getChildForm();
            int indexSize;

            this.selectFont.Text = cf.Getfont().Name;
            this.sizeText.Text   = cf.Getfont().Size.ToString();
            shape = cf.Getfont().Style;
            if (shape.Equals(FontStyle.Regular))
            {
                this.shapeText.Text     = "常规";
                shapeList.SelectedIndex = 0;
            }
            else if (shape.Equals(FontStyle.Italic))
            {
                this.shapeText.Text     = "倾斜";
                shapeList.SelectedIndex = 1;
            }
            else if (shape.Equals(FontStyle.Bold))
            {
                this.shapeText.Text     = "粗体";
                shapeList.SelectedIndex = 2;
            }
            else if (shape.Equals(FontStyle.Bold | FontStyle.Italic))
            {
                this.shapeText.Text     = "粗体 倾斜";
                shapeList.SelectedIndex = 3;
            }
            foreach (System.Drawing.FontFamily i in objFont.Families)
            {
                this.fontList.Items.Add(i.Name.ToString());
            }

            this.fontList.SelectedIndex = this.fontList.FindString(this.selectFont.Text);
            indexSize = this.fontList.SelectedIndex - 3;
            if (indexSize < 0)
            {
                indexSize = 0;
            }
            this.fontList.TopIndex = indexSize;

            this.previewtext.Font = new System.Drawing.Font(cf.Getfont().Name, float.Parse(cf.Getfont().Size.ToString()), cf.Getfont().Style, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
        }
示例#3
0
 private void ReplaceTextForm_Load(object sender, EventArgs e)
 {
     cf = (ChildForm)MainForm.getChildForm();
 }