当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.BringToFront方法代码示例

本文整理汇总了C#中System.Windows.Forms.TextBox.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.BringToFront方法的具体用法?C# TextBox.BringToFront怎么用?C# TextBox.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TextBox的用法示例。


在下文中一共展示了TextBox.BringToFront方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetTextBoxOverlayOnKeyMinistryCombo

        /// <summary>
        /// Manage the overlay
        /// </summary>
        public static void SetTextBoxOverlayOnKeyMinistryCombo(GiftBatchTDSAGiftDetailRow ACurrentDetailRow, bool AActiveOnly,
            TCmbAutoPopulated ACmbKeyMinistries, TCmbAutoPopulated ACmbMotivationDetailCode, TextBox ATxtDetailRecipientKeyMinistry,
            ref string AMotivationDetail, bool AInEditModeFlag, bool ABatchUnpostedFlag, bool AReadComboValue = false)
        {
            ResetMotivationDetailCodeFilter(ACmbMotivationDetailCode, ref AMotivationDetail, AActiveOnly);

            // Always enabled initially. Combobox may be diabled later once populated.
            ACmbKeyMinistries.Enabled = true;

            ATxtDetailRecipientKeyMinistry.Visible = true;
            ATxtDetailRecipientKeyMinistry.BringToFront();
            ATxtDetailRecipientKeyMinistry.Parent.Refresh();

            if (AReadComboValue)
            {
                ReconcileKeyMinistryFromCombo(ACurrentDetailRow,
                    ACmbKeyMinistries,
                    ATxtDetailRecipientKeyMinistry,
                    AInEditModeFlag,
                    ABatchUnpostedFlag);
            }
            else
            {
                ReconcileKeyMinistryFromTextbox(ACurrentDetailRow,
                    ACmbKeyMinistries,
                    ATxtDetailRecipientKeyMinistry,
                    AInEditModeFlag,
                    ABatchUnpostedFlag);
            }
        }
开发者ID:js1987,项目名称:openpetragit,代码行数:33,代码来源:UC_GiftTransactions.Recipient.ManualCode.cs

示例2: WebNavigationBox

        public WebNavigationBox()
        {
            InitializeComponent();

            Height = 36;

            _goBackButton = CreateButton("Back", "appbar.arrow.left.png", OnGoBack);
            _goForwardButton = CreateButton("Forward", "appbar.arrow.right.png", OnGoForward);
            _stopButton = CreateButton("Stop", "appbar.close.png", OnStop);
            _refreshButton = CreateButton("Refresh", "appbar.refresh.png", OnRefresh);
            _homeButton = CreateButton("Home", "appbar.home.png", OnHome);
            _goButton = CreateButton("Go", "go.png", OnGo, DockStyle.Right);

            _addressTextBox = new TextBox();
            _addressTextBox.Parent = this;
            _addressTextBox.Dock = DockStyle.Fill;
            _addressTextBox.BringToFront();

            _addressTextBox.KeyPress += (s, e) =>
                {
                    if (e.KeyChar == '\xD') { e.Handled = true; OnGo(s, EventArgs.Empty); }
                };

            CanGoBack = false;
            CanGoForward = false;
            Loading = false;
        }
开发者ID:rajsite,项目名称:lvcef,代码行数:27,代码来源:WebNavigationBox.cs

示例3: CreateTextBox

 private void CreateTextBox(LinkLabel label)
 {
     text = new TextBox();
     text.Text = label.Text;
     text.Location = label.Location;
     text.Size = label.Size;
     text.BorderStyle = BorderStyle.FixedSingle;
     text.BackColor = Color.CornflowerBlue;
     mainPanel.Controls.Add(text);
     text.BringToFront();
     text.KeyPress += new KeyPressEventHandler(text_KeyPress);
     text.Focus();
     text.SelectAll();
 }
开发者ID:davidajulio,项目名称:hx,代码行数:14,代码来源:Talk.cs

示例4: OnMouseHover

        protected override void OnMouseHover(EventArgs e)
        {
            String temp = this.number;
            temp = temp.Replace("W", " ");

            Graphics g = this.Parent.CreateGraphics();
            tempBox = new TextBox();
            tempBox.Enabled = false;
            tempBox.Location = new Point(this.Location.X + 10, this.Location.Y + 5);
            tempBox.Text = temp;
            tempBox.Width = this.Width - 20;
            tempBox.Multiline = true;
            tempBox.Font = new Font(FontFamily.GenericMonospace, 8F);
            tempBox.Height = 63;//(int)this.CreateGraphics().MeasureString(this.number, Font).Height;
            //Rectangle rect = new Rectangle(this.Location.X, this.Location.Y + 20, width + 10, height + 10);
            this.Parent.Controls.Add(tempBox);

            tempBox.BringToFront();

            //g.FillRectangle(Brushes.LawnGreen, rect);
            //((MouseEventArgs)e).X
            base.OnMouseHover(e);
        }
开发者ID:HBArck,项目名称:CPU-Emulation_PostBinarry,代码行数:23,代码来源:CPBNumber.cs

示例5: MessageTextBox

        internal static void MessageTextBox(string title, IList<string> lines, bool returnImediatly)
        {
            TextBox textBox = new TextBox();
            Form form = new Form();

            textBox.Multiline = true;
            int limit = 1000;
            if (lines.Count <= limit)
            {
                textBox.Lines = new List<string>(lines).ToArray();
            } else
            {
                string[] shortLines = new string[limit + 2];
                for (int lineIndex = 0; lineIndex < limit; lineIndex++)
                {
                    shortLines[lineIndex] = lines[lineIndex];
                }
                shortLines[limit] = string.Empty;
                shortLines[limit + 1] = "Note, text truncated at 1000 lines.";

                textBox.Lines = shortLines;
            }
            textBox.SelectionStart = 0;
            textBox.SelectionLength = 0;
            textBox.ScrollBars = ScrollBars.Both;
            textBox.Size = new Size(400, 400);
            textBox.Dock = DockStyle.Fill;
            Size size = textBox.Size;
            int controlHeight = size.Height;

            form.ControlBox = true;

            form.Text = title;
            size = textBox.Size;
            form.ClientSize = new Size(size.Width, controlHeight);
            form.Controls.Add(textBox);
            textBox.BringToFront();

            if (returnImediatly)
            {
                form.Show();
                Application.DoEvents();
                Thread.Sleep(100);
            } else
            {
                using (textBox)
                using (form)
                {
                    try
                    {
                        form.ShowDialog();
                    } finally
                    {
                        bool flag = form == null;
                        if (!flag)
                        {
                            form.Dispose();
                        }
                    }
                }
            }
        }
开发者ID:swish-climate-impact-assessment,项目名称:swish-kepler-actors,代码行数:62,代码来源:SwishFunctions.cs

示例6: ChangeName

 /// <summary>
 /// Event Handler for clicking the name field. This will generate a new text box over that field
 /// that will allow the user to enter in a new name. When the focus leaves this text box or when
 /// Enter/Return is pressed, the name will change (or not change if escape is pressed).
 /// </summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">EventArgs for the event</param>
 private void ChangeName(object sender, EventArgs e)
 {
     TextBox newNameInput = new TextBox();
     newNameInput.BackColor = SystemColors.HotTrack;
     newNameInput.Font = new Font("Segoe UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
     newNameInput.ForeColor = SystemColors.Control;
     newNameInput.Location = new Point(0, 250);
     newNameInput.Margin = new Padding(0);
     newNameInput.Name = "newNameInput";
     newNameInput.Size = new Size(250, 30);
     newNameInput.TabIndex = 2;
     newNameInput.Text = "Enter the new name...";
     newNameInput.TextAlign = HorizontalAlignment.Center;
     newNameInput.LostFocus += SaveNewName;
     newNameInput.KeyDown += SaveNewName;
     newNameInput.Visible = true;
     Controls.Add(newNameInput);
     newNameInput.BringToFront();
     newNameInput.Focus();
 }
开发者ID:Bounceadin,项目名称:RPGA,代码行数:27,代码来源:CharacterPhoto.cs

示例7: LayoutPanelItem

        /// <summary>
        /// 布局自定义子控件Panel
        /// </summary>
        /// <param name="listReceMainItems"></param>
        /// <param name="panel"></param>
        private void LayoutPanelItem(string strReceMainItem, ref Panel panel, ref int tabIndex)
        {
            //创建一个Panel
            panel.Size = new System.Drawing.Size(10, 20);
            panel.AutoSize = true;

            //创建一个Label
            Label label = new Label();
            panel.Controls.Add(label);
            label.AutoSize = true;
            label.Location = new Point(0, 3);

            string labText = Util.FormatStringRight(strReceMainItem.Trim(), 16);
            label.Text = labText;

            if (strReceMainItem == "订货类型" || strReceMainItem == "提货方式" ||
                strReceMainItem == "销售信息")
            {
                //创建一个ComboBox
                ComboBox comboBox = new ComboBox();
                panel.Controls.Add(comboBox);
                comboBox.Width = 150;
                comboBox.Location = new Point(label.Width + 5, 0);
                comboBox.Name = ReceiptModCfg.GetReceiptMainItems()[strReceMainItem].Trim();
                comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
                comboBox.TabIndex = tabIndex;

                List<string> itemVals = SelItemsDAO.GetItemVals("[单据]" + strReceMainItem);
                if (itemVals != null)
                    comboBox.Items.AddRange(itemVals.ToArray());
                comboBox.SelectedIndex = 0;

                //计算机Panel的宽度
                panel.Width = label.Width + 5 + comboBox.Width;
            }
            else if (strReceMainItem == "仓库" || strReceMainItem == "目标仓库" || strReceMainItem == "发票类型")
            {
                //创建一个ComboBox
                ComboBox comboBox = new ComboBox();
                panel.Controls.Add(comboBox);
                comboBox.Width = 150;
                comboBox.Location = new Point(label.Width + 5, 0);
                comboBox.Name = ReceiptModCfg.GetReceiptMainItems()[strReceMainItem].Trim();
                comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
                comboBox.TabIndex = tabIndex;
                comboBox.Name = "comboBox" + comboBox.Name;
                comboBox.SelectedIndexChanged += new EventHandler(comboBox_SelectedIndexChanged);

                //创建一个额外的TextBox,按规则命名,便于存储
                TextBox textBoxTemp = new TextBox();
                panel.Controls.Add(textBoxTemp);
                textBoxTemp.Visible = false;////
                textBoxTemp.BringToFront();
                textBoxTemp.Location = new Point(0, 0);
                textBoxTemp.Name = ReceiptModCfg.GetReceiptMainItems()[strReceMainItem].Trim();

                if (strReceMainItem == "仓库" || strReceMainItem == "目标仓库")
                {
                    (new InitFuncs()).InitComboBox(comboBox, "T_StoreHouse", "SHName");
                    comboBox.SelectedIndex = 1;
                }
                else if (strReceMainItem == "发票类型")
                {
                    (new InitFuncs()).InitComboBox(comboBox, "T_Invoice", "ITName");
                    if (this.strReceTypeId == "03" && comboBox.Items.Contains("增值税票"))
                        comboBox.SelectedItem = "增值税票";
                    else if (comboBox.Items.Contains("普通发票"))
                        comboBox.SelectedItem = "普通发票";

                }

                //计算机Panel的宽度
                panel.Width = label.Width + 5 + comboBox.Width;
            }
            else if (strReceMainItem == "预计入库日" || strReceMainItem == "生效起日" ||
                     strReceMainItem == "有效止日" || strReceMainItem == "送货日期" ||
                     strReceMainItem == "收货日期" || strReceMainItem == "送货要求到达时间" ||
                     strReceMainItem == "要求安装时间" || strReceMainItem == "汇款日期" ||
                     strReceMainItem == "单据日期")
            {
                //创建一个DateTimePicker
                DateTimePicker dateTimePicker = new DateTimePicker();
                panel.Controls.Add(dateTimePicker);
                dateTimePicker.Width = 150;
                dateTimePicker.Format = DateTimePickerFormat.Custom;
                dateTimePicker.CustomFormat = "yyyy-MM-dd";
                dateTimePicker.Location = new Point(label.Width + 5, 0);
                dateTimePicker.Name = ReceiptModCfg.GetReceiptMainItems()[strReceMainItem].Trim();
                dateTimePicker.TabIndex = tabIndex;

                //计算机Panel的宽度
                panel.Width = label.Width + 5 + dateTimePicker.Width;

            }
            else
//.........这里部分代码省略.........
开发者ID:TGHGH,项目名称:Warehouse-2,代码行数:101,代码来源:ListModalForm.cs

示例8: LoadControls

        /// <summary>
        /// Loads controls on the panel
        /// </summary>
        private void LoadControls()
        {
            foreach (SearchListBoxItem item in searchFieldsCollection)
            {
                    //add masked textbox or textbox to the panel
                    if (!string.IsNullOrEmpty(item.Pattern))
                    {
                        //Add masked textbox to the panel
                        MaskedTextBox fieldTextBox = new MaskedTextBox();
                        fieldTextBox.Location = new System.Drawing.Point(300, textLinePosition);
                        fieldTextBox.Size = new System.Drawing.Size(286, 20);
                        fieldTextBox.BringToFront();
                        fieldTextBox.Leave += new EventHandler(fieldTextBox_Leave);
                        //                    fieldTextBox.MaskInputRejected += new MaskInputRejectedEventHandler(maskedTextBox_MaskInputRejected);

                        string mask = AppData.Instance.DataPatternsDataTable.GetMaskByPattern(item.Pattern);
                        //fieldTextBox.Mask = AppData.Instance.DataPatternsDataTable.GetExpressionByMask(mask, item.Pattern);
                        fieldTextBox.Tag = item.Type;
                        fieldTextBox.Name = item.Name;
                        //fieldTextBox.Mask = mask;

                        if (item.Type.Equals("Number") || item.Type.Equals("PhoneNumber"))
                        {
                            //    fieldTextBox.PromptChar = '_';
                        }
                        else if (item.Type.Equals("Date") || item.Type.Equals("DateTime"))
                        {
                            //    fieldTextBox.PromptChar = '_';
                            fieldTextBox.Text = String.Format("{0}", string.Empty);
                        }
                        else if (item.Type.Equals("Time"))
                        {
                            //    fieldTextBox.PromptChar = '_';
                            fieldTextBox.Text = String.Format("{0:T}", string.Empty);
                        }

                        splitContainer1.Panel2.Controls.Add(fieldTextBox);
                        textLinePosition += 38;
                        if (myControlDictionaryData.ContainsKey(item.Name.ToString()))
                        {
                            fieldTextBox.Text = myControlDictionaryData[item.Name.ToString()].ToString();
                        }

                        myControlDictionary.Add(item.Name.ToString(), fieldTextBox);
                        myControlItemDictionary.Add(fieldTextBox, item);
                        fieldTextBox.Focus();
                    }
                    else
                    {
                        //if (item.Type.Equals("YesNo"))
                        //{
                        //    ComboBox cbxYesNo = new ComboBox();
                        //    Configuration config = Configuration.GetNewInstance();
                        //    cbxYesNo.Items.AddRange(new object[] { config.Settings.RepresentationOfYes, config.Settings.RepresentationOfNo, config.Settings.RepresentationOfMissing });
                        //    cbxYesNo.Location = new System.Drawing.Point(300, textLinePosition);
                        //    cbxYesNo.Size = new System.Drawing.Size(286, 20);
                        //    cbxYesNo.BringToFront();
                        //    cbxYesNo.Leave += new EventHandler(fieldTextBox_Leave);
                        //    splitContainer1.Panel2.Controls.Add(cbxYesNo);
                        //    textLinePosition += 38;

                        //    myControlDictionary.Add(item.Name.ToString(), cbxYesNo);
                        //    myControlItemDictionary.Add(cbxYesNo, item);
                        //    cbxYesNo.Focus();
                        //}
                        //else
                        {
                            ////add textbox to panel
                            TextBox fieldTextBox = new TextBox();
                            fieldTextBox.Name = item.Name;
                            fieldTextBox.Location = new System.Drawing.Point(300, textLinePosition);
                            fieldTextBox.Size = new System.Drawing.Size(286, 20);
                            fieldTextBox.BringToFront();
                            fieldTextBox.Leave += new EventHandler(fieldTextBox_Leave);
                            splitContainer1.Panel2.Controls.Add(fieldTextBox);
                            textLinePosition += 38;

                            myControlDictionary.Add(item.Name.ToString(), fieldTextBox);

                            myControlItemDictionary.Add(fieldTextBox, item);
                            fieldTextBox.Focus();
                        }
                    }

                    //add field name label to panel
                    Label fieldName = new Label();
                    fieldName.Tag = item.Name.ToString().ToUpper();
                    fieldName.Location = new System.Drawing.Point(26, labelLinePosition);
                    fieldName.Size = new System.Drawing.Size(35, 13);
                    fieldName.AutoSize = true;
                    fieldName.FlatStyle = FlatStyle.System;
                    fieldName.Text = item.Name.ToString();
                    splitContainer1.Panel2.Controls.Add(fieldName);
                    labelLinePosition += 38;

                    //add pattern label to panel
                    Label lblPattern = new Label();
//.........这里部分代码省略.........
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:101,代码来源:FindRecordDialog.cs

示例9: build

        public void build(string str)
        {
            int count = 0;
            int startX = 50;
            int startY = 36;

            string[] strCollection = Regex.Split(str, @"\{(.*?)\}");

            for (int i = 0; i < strCollection.Length; i++)
            {
                int temp = strCollection[i].IndexOf("/");
                count++;

                Point point = createPosition(i, startX, startY);

                if (strCollection[i].ToString() != "")
                {
                    if (temp == 0)
                    {
                        Label txtBox = new Label();
                        txtBox.Name = "txtBoxDynamic" + i.ToString();
                        txtBox.Text = strCollection[i].ToString();
                        txtBox.AutoSize = true;
                        txtBox.Location = point;
                        txtBox.Size = new System.Drawing.Size(50, 25);
                        txtBox.BringToFront();
                        gbREST.Controls.Add(txtBox);
                    }
                    else
                    {
                        //Parameter box
                        TextBox txtBox = new TextBox();
                        txtBox.Name = "txtBoxDynamic" + i.ToString();
                        txtBox.Text = "{" + strCollection[i].ToString() + "}";
                        txtBox.Font = new Font("Times New Roman", 9, FontStyle.Italic);
                        txtBox.Location = point;
                        txtBox.Size = new System.Drawing.Size(200, 25);
                        txtBox.BringToFront();
                        gbREST.Controls.Add(txtBox);
                    }

                }

            }
        }
开发者ID:eliseobeltran,项目名称:ConcurWSForm,代码行数:45,代码来源:Concur.cs

示例10: ParameterForm

 public ParameterForm(string title, IList<string> parameterNameList, IList<string> parameterValueList, IList<bool> canBeNullList = null)
 {
     InitializeComponent();
     if (!string.IsNullOrWhiteSpace(title))
     {
         Text = title;
     }
     if (parameterNameList == null)
     {
         return;
     }
     this.canBeNullList = canBeNullList;
     var labelY = 16;
     var textBoxY = 32;
     var textBoxWidth = mainPanel.Size.Width - 32;
     for (var i = 0; i < parameterNameList.Count; i++)
     {
         var parameter = parameterNameList[i];
         var label = new Label
         {
             Name = string.Format("lbl{0}", parameter),
             Text = string.Format("{0}:", parameter),
             Location = new Point(16, labelY),
             Size = new Size(400, 20)
         };
         mainPanel.Controls.Add(label);
         var textBox = new TextBox
         {
             Name = string.Format("txt{0}", parameter),
             AutoSize = false,
             Size = new Size(textBoxWidth, 24),
             Location = new Point(16, textBoxY),
             Tag = i 
         };
         
         if (parameterNameList.Count == parameterValueList.Count)
         {
             textBox.Text = parameterValueList[i];
         }
         if (canBeNullList != null && 
             parameterValueList.Count == canBeNullList.Count)
         {
             textBox.TextChanged += textBox_TextChanged;
         }
         mainPanel.Controls.Add(textBox);
         textBox.BringToFront();
         labelY += 48;
         textBoxY += 48;
     }
     textBoxList = mainPanel.Controls.Cast<Control>().Where(c => c is TextBox).ToList();
     var delta = parameterNameList.Count*48;
     Size = new Size(Size.Width, Size.Height + delta);
     textBox_TextChanged(null, null);
 }
开发者ID:sscctech,项目名称:ServiceBusExplorer,代码行数:54,代码来源:ParameterForm.cs

示例11: editTextFor

 private void editTextFor(ListViewItem item) {
     item.EnsureVisible();
     txtLineEditBox = new TextBox();
     int x = widthColumn(RESULT_TEXT_COLUMN_INDEX) + lvTargetTextsList.Bounds.X;
     int y = lvTargetTextsList.Bounds.Y + item.Bounds.Y;
     int width = lvTargetTextsList.Width - x;
     int height = item.Bounds.Height;
     txtLineEditBox.Bounds = new Rectangle(x, y, width, height);
     txtLineEditBox.Text = _beforeEditionText = itemText(item);
     txtLineEditBox.LostFocus += new EventHandler(editBox_LostFocus);
     txtLineEditBox.KeyDown += new KeyEventHandler(editBox_KeyDown);
     txtLineEditBox.Tag = item;
     lvTargetTextsList.Parent.Controls.Add(txtLineEditBox);
     txtLineEditBox.BringToFront();
     txtLineEditBox.SelectAll();
     txtLineEditBox.Focus();
     _controlFocusedBeforeEdition = _lastFocusedControl;
     _lastFocusedControl = txtLineEditBox;
 }
开发者ID:satr,项目名称:regexexplorer,代码行数:19,代码来源:EditableListControl.cs

示例12: timer1_Tick_1

        private void timer1_Tick_1(object sender, System.EventArgs e)
	    {


            
		    //int[] xy = new int[2];

		    //GetCursorPos(ref xy(0));

            //int x = System.Windows.Forms.Cursor.Position.X;
            //Y座標を取得する
            //int y = System.Windows.Forms.Cursor.Position.Y;


            // Create a data stream object and listen to events.
           
                     

            //Console.WriteLine(x + "  " + y);

		    //listBox1.Items.Add("Value=" + objAcc.get_accValue(child));

            Accessibility.IAccessible objAcc = default(Accessibility.IAccessible);

            object child = null;
            AccessibleObjectFromPoint((int)gazeX,(int)gazeY, ref objAcc, ref child);

            //listBox1.Items.Clear();
            // ERROR: Not supported in C#: OnErrorStatement

            int[] ltwh = new int[4];
            //objAcc.accLocation((int)ltwh[0], ltwh[1], ltwh[2], ltwh[3], child);

            try
            {
                //listBox1.Items.Add("Name=" + objAcc.get_accName(child));
            }catch{

            }

           


            //label貼り付け
            try
            {
                //Console.WriteLine(objAcc.get_accName(child));

                listUpdate(objAcc.get_accName(child));



                if (!(preWord.Equals(objAcc.get_accName(child))))
                {
                    if (!((objAcc.get_accName(child).Equals("Form1"))||(objAcc.get_accName(child).Equals(" "))))
                    {
                        preWord = objAcc.get_accName(child);
                        sameWord = 0;
                    }

                }
                else
                {
                    if (!((objAcc.get_accName(child).Equals("Form1")) && (objAcc.get_accName(child).Equals(" ")&& (objAcc.get_accName(child).Equals("")))))
                    {
                        sameWord++;
                        if (sameWord == 16 - (allDanger))
                        {

                            //ラベルの生成
                            List<System.Windows.Forms.TextBox> clist = new List<System.Windows.Forms.TextBox>();

                            System.Windows.Forms.TextBox tb = new System.Windows.Forms.TextBox();
                            tb.Top = (int)gazeY+21;
                            tb.Left = (int)gazeX;
                            tb.Height = 10;
                            tb.Width = 70;
                            this.Controls.Add(tb);

                            


                            for (int i = 0; i <= wordBox.Length; i++)
                            {
                                if (objAcc.get_accName(child).Equals(wordBox[i]))
                                {
                                    //最前面へ
                                    tb.BringToFront();
                                    clist.Add(tb);
                                    
                                    tb.Text = wordChangeBox[i];
                                    wordBox[i] = "blank";


                                }
                            }

                            //if (tb.Text.Equals("")) return;
                            tb.BackColor = Color.Red;

//.........这里部分代码省略.........
开发者ID:moyoron64,项目名称:eyeX,代码行数:101,代码来源:Form1.cs

示例13: LoadDataAndShow

        private void LoadDataAndShow()
        {
            try
            {
                tableName = this.UserName.ToString();
                tblInfo = DBEngine.execReturnDataTable(string.Format("select * from tblDataSetting where TableName = '{0}'", this.UserName));
                if (tblInfo != null && tblInfo.Rows.Count > 0)
                {
                    //Load Primary keys
                    if (!tblInfo.Rows[0]["TableEditorName"].ToString().Equals(string.Empty))
                        this.UserName = tblInfo.Rows[0]["TableEditorName"].ToString().Split('|')[0];
                    //m_dtPrimaryKeys = DBEngine.execReturnDataTable("sp_TableEditor_GetPrimaryKeys", "@Tablename", this.UserName.ToString());
                    strViewName = tblInfo.Rows[0]["ViewName"].ToString();
                    if (tblInfo.Rows[0]["IsShowLayout"] != DBNull.Value)
                        IsShowLayout = Convert.ToBoolean(tblInfo.Rows[0]["IsShowLayout"]);
                    else
                        IsShowLayout = false;

                    if (tblInfo.Rows[0]["AllowAdd"] != DBNull.Value)
                        isAllowAdd = Convert.ToBoolean(tblInfo.Rows[0]["AllowAdd"]);
                    else
                        IsAdded = false;
                    if (tblInfo.Rows[0]["ReadOnly"] != DBNull.Value)
                        isReadOnly = Convert.ToBoolean(tblInfo.Rows[0]["ReadOnly"]);
                    if (tblInfo.Rows[0]["IsProcedure"] != DBNull.Value)
                        IsProcedure = Convert.ToBoolean(tblInfo.Rows[0]["IsProcedure"]);
                    if (tblInfo.Rows[0]["IsProcessForm"] != DBNull.Value)
                        IsProcessForm = Convert.ToBoolean(tblInfo.Rows[0]["IsProcessForm"]);
                    strColumnReadOnly = tblInfo.Rows[0]["ReadOnlyColumns"].ToString().Split(',');
                    strColumnFormatFont = tblInfo.Rows[0]["FormatFontColumns"].ToString().Split(',');
                    strColumnPaint = tblInfo.Rows[0]["PaintColumns"].ToString().Split(',');
                    strPaintRows = tblInfo.Rows[0]["PaintRows"].ToString().Split(',');
                    strColumnHide = tblInfo.Rows[0][ColumnHide].ToString().Split(',');
                    strColumnFixed = tblInfo.Rows[0][FixedColumns].ToString().Split(',');
                    strGroupColumns = tblInfo.Rows[0][GroupColumns].ToString().Split(',');
                    strColumnOrderBy = tblInfo.Rows[0][ColumnOrderBy].ToString().Split(',');
                    strColumnCombobox = tblInfo.Rows[0]["ComboboxColumns"].ToString().Split('|');
                    m_dtColumnsName = DBEngine.execReturnDataTable("sp_TableEditor_Columns", "@Tablename", strViewName);
                    m_dtColumnsName.PrimaryKey = new DataColumn[] { m_dtColumnsName.Columns[NAME] };
                    if (IsProcedure)
                    {
                        int height = 0;
                        tableName = tblInfo.Rows[0]["TableEditorName"].ToString();
                        // đọc các tham số truyền vào
                        dtParameter = DBEngine.execReturnDataTable("sp_Export_GetParameter",
                     "@ProcedureName", strViewName,
                     "@LanguageID", UIMessage.languageID);
                        grbFilter.Controls.Clear();
                        if ((dtParameter != null) && (dtParameter.Rows.Count > 0))
                        {
                            hideContainerLeft.Visible = true;
                            cellLocation = new string[3, dtParameter.Rows.Count];// frist used for Name, second used for Location and third used for Value
                            int index = 0;
                            //generate filter condition
                            foreach (DataRow dr in dtParameter.Rows)
                            {
                                //cut lose @LoginID
                                if (dr[P_NAME].ToString().ToLower().Equals(CommonConst.A_LoginID.ToLower()))
                                    continue;
                                height += 25;
                                // set lable
                                Label lbl = new Label() { Name = LBL_PREFIX + dr[P_NAME], Text = dr[Message_P].ToString() };
                                cellLocation[0, index] = lbl.Text;
                                cellLocation[1, index] = dr[CellLocation].ToString();
                                cellLocation[2, index++] = dr[P_NAME].ToString();
                                grbFilter.Controls.Add(lbl);
                                lbl.Location = new Point(10, height);
                                // set input control
                                switch (dr[DataType].ToString().ToLower())
                                {
                                    case "dropdownlist":
                                        {
                                            if (dr[P_NAME].ToString().ToLower() == CommonConst.A_EmployeeID.ToLower())
                                            {
                                                ShowEmployeeList(new Point(110, height), dr[P_NAME].ToString());
                                                break;
                                            }
                                            // create combobox for this once
                                            LookUpEdit cbx = new LookUpEdit() { Name = CBX_PREFIX + dr[P_NAME] };
                                            // set data source
                                            AddDataSource(ref cbx, DBEngine.execReturnDataTable(dr[Query].ToString(), CommonConst.A_LoginID, UserID));
                                            // if the control is month or year list, so set theo current month and year
                                            if (cbx.Name.ToLower().Contains("month"))
                                            {
                                                dtInitValue = DBEngine.execReturnDataTable("select * from tblCurrentWorkingMonth");
                                                cbx.EditValue = dtInitValue.Rows[0]["Month"];
                                            }
                                            if (cbx.Name.ToLower().Contains("year"))
                                            {
                                                dtInitValue = DBEngine.execReturnDataTable("select * from tblCurrentWorkingMonth");
                                                cbx.EditValue = dtInitValue.Rows[0]["Year"];
                                            }
                                            if (cbx.Name.ToLower().Contains("currency"))
                                            {
                                                cbx.EditValue = "VND";
                                            }
                                            grbFilter.Controls.Add(cbx);
                                            cbx.Location = new Point(110, height);
                                            cbx.Width = 200;
                                            cbx.BringToFront();
//.........这里部分代码省略.........
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:101,代码来源:DataSetting.cs

示例14: beginEditIncludeDir

        private void beginEditIncludeDir()
        {
            if(_editingIncludes)
            {
                endEditIncludeDir(true);
            }
            _editingIncludes = true;
            _dialog.unsetCancelButton();
            if(_editingIndex != -1)
            {
                _txtIncludeDir = new TextBox();
                _txtIncludeDir.Text = sliceIncludeList.Items[sliceIncludeList.SelectedIndex].ToString();
                _editingIncludeDir = _txtIncludeDir.Text;
                sliceIncludeList.SelectionMode = SelectionMode.One;

                Rectangle rect = sliceIncludeList.GetItemRectangle(sliceIncludeList.SelectedIndex);
                _txtIncludeDir.Location = new Point(sliceIncludeList.Location.X + 2,
                                                    sliceIncludeList.Location.Y + rect.Y);
                _txtIncludeDir.Width = sliceIncludeList.Width - 50;
                _txtIncludeDir.Parent = sliceIncludeList;
                _txtIncludeDir.KeyDown += new KeyEventHandler(includeDirKeyDown);
                _txtIncludeDir.KeyUp += new KeyEventHandler(includeDirKeyUp);
                groupBox1.Controls.Add(_txtIncludeDir);

                _btnSelectInclude = new Button();
                _btnSelectInclude.Text = "...";
                _btnSelectInclude.Location = new Point(sliceIncludeList.Location.X + _txtIncludeDir.Width,
                                                       sliceIncludeList.Location.Y + rect.Y);
                _btnSelectInclude.Width = 49;
                _btnSelectInclude.Height = _txtIncludeDir.Height;
                _btnSelectInclude.Click += new EventHandler(selectIncludeClicked);
                groupBox1.Controls.Add(_btnSelectInclude);

                _txtIncludeDir.Show();
                _txtIncludeDir.BringToFront();
                _txtIncludeDir.Focus();

                _btnSelectInclude.Show();
                _btnSelectInclude.BringToFront();
            }
        }
开发者ID:bholl,项目名称:zeroc-ice,代码行数:41,代码来源:IncludePathView.cs

示例15: resourceSubPanel

        public resourceSubPanel(int iteration)
        {
            Point resourceNameLabelLocation = new Point(8, 11);
            Point numberRequiredLabelLocation = new Point(8, 37);
            Point resourceNameTextBoxLocation = new Point(87, 7);
            Point numberRequiredTextBoxLocation = new Point(109, 33);
            Point maxRadioButtonLocation = new Point(190, 32);
            Size resourceNameTextBoxSize = new Size(105, 20);
            Size numberRequiredTextBoxSize = new Size(23, 20);

            this.BackColor = Color.DarkGray;
            this.Size = new Size(241, 56);
            this.Show();

            CheckBox minCheckBox = new CheckBox();
            minCheckBox.Text = "Min";
            minCheckBox.Font = GV.generalFont;
            minCheckBox.Location = new Point(75, 33);
            this.Controls.Add(minCheckBox);
            minCheckBox.AutoSize = true;
            minCheckBox.CheckedChanged += new EventHandler(checkBox_CheckedChanged);
            minCheckBox.Name = GV.minResourceRequiredName + "CheckBox";   //"minNumberRequiredCheckBox";

            CheckBox maxCheckBox = new CheckBox();
            maxCheckBox.Text = "Max";
            maxCheckBox.Font = GV.generalFont;
            maxCheckBox.Location = new Point(158, 33);
            maxCheckBox.AutoSize = true;
            maxCheckBox.CheckedChanged += new EventHandler(checkBox_CheckedChanged);
            this.Controls.Add(maxCheckBox);
            maxCheckBox.Name = GV.maxResourceRequiredName + "CheckBox";//"maxNumberRequiredCheckBox";

            TextBox minNumberRequiredTextBox = new TextBox();
            minNumberRequiredTextBox.Size = numberRequiredTextBoxSize;
            minNumberRequiredTextBox.Text = "0";
            minNumberRequiredTextBox.Enabled = false;
            minNumberRequiredTextBox.Location = new Point(125, 31);
            this.Controls.Add(minNumberRequiredTextBox);
            minNumberRequiredTextBox.BringToFront();
            minNumberRequiredTextBox.TextChanged += new EventHandler(resourceTextBox_TextChanged);
            minNumberRequiredTextBox.Name = GV.minResourceRequiredName + "TextBox"; //"minNumberRequiredTextBox";

            TextBox maxNumberRequiredTextBox = new TextBox();
            maxNumberRequiredTextBox.Size = numberRequiredTextBoxSize;
            maxNumberRequiredTextBox.Location = new Point(213, 31);
            maxNumberRequiredTextBox.Text = "0";
            this.Controls.Add(maxNumberRequiredTextBox);
            maxNumberRequiredTextBox.BringToFront();
            maxNumberRequiredTextBox.Enabled = false;
            maxNumberRequiredTextBox.TextChanged += new EventHandler(resourceTextBox_TextChanged);
            maxNumberRequiredTextBox.Name = GV.maxResourceRequiredName + "TextBox"; //"maxNumberRequiredTextBox";

            Label resourceNameLabel = new Label();
            resourceNameLabel.Text = "Resource name:";
            resourceNameLabel.Name = "resourceNameLabel";
            resourceNameLabel.Font = GV.generalFont;
            resourceNameLabel.Location = new Point(8, 9);
            resourceNameLabel.AutoSize = true;

            this.Controls.Add(resourceNameLabel);

            Label numberRequiredLabel = new Label();
            numberRequiredLabel.Text = " Number\nRequired";
            numberRequiredLabel.Name = "numberRequiredLabel";
            numberRequiredLabel.Font = GV.generalFont;
            numberRequiredLabel.Location = new Point(5, 25);
            numberRequiredLabel.AutoSize = true;
            this.Controls.Add(numberRequiredLabel);

            TextBox resourceNameTextBox = new TextBox();
            resourceNameTextBox.Size = resourceNameTextBoxSize;
            resourceNameTextBox.TextChanged += new EventHandler(resourceTextBox_TextChanged);
            resourceNameTextBox.Location = new Point(125, 7);
            this.Controls.Add(resourceNameTextBox);
            resourceNameTextBox.BringToFront();
            resourceNameTextBox.Name = GV.resourceNameTextBoxName;
        }
开发者ID:SamuelLBau,项目名称:MissionCreator,代码行数:77,代码来源:subPanels.cs


注:本文中的System.Windows.Forms.TextBox.BringToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。