C# (CSharp) System.Windows.Forms TextBox примеры использования

C# (CSharp) System.Windows.Forms TextBox - 30 примеров найдено. Это лучшие примеры C# (CSharp) кода для System.Windows.Forms.TextBox, полученные из open source проектов. Вы можете ставить оценку каждому примеру, чтобы помочь нам улучшить качество примеров.
Наследование: TextBoxBase
Пример #1
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Labelled));
     this.groupBox1 = new GroupBox();
     this.textBox1 = new TextBox();
     this.groupBox1.SuspendLayout();
     base.SuspendLayout();
     this.groupBox1.Controls.Add(this.textBox1);
     this.groupBox1.Location = new Point(13, 10);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new Size(0x128, 0x189);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "标签说明:";
     this.textBox1.Location = new Point(7, 0x15);
     this.textBox1.Multiline = true;
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new Size(0x11b, 0x162);
     this.textBox1.TabIndex = 0;
     this.textBox1.Text = resources.GetString("textBox1.Text");
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(0x141, 0x199);
     base.Controls.Add(this.groupBox1);
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     base.MaximizeBox = false;
     base.MinimizeBox = false;
     base.Name = "Labelled";
     base.StartPosition = FormStartPosition.CenterScreen;
     this.Text = "Labelled";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     base.ResumeLayout(false);
 }
Пример #2
0
 public FindGolfIdDialog(ref TextBox tb)
 {
     this.tb = tb;
     InitializeComponent();
     golfId_textBox.Text = this.tb.Text;
     UpdateTable();
 }
Пример #3
0
        static void Main(string[] args)
        {
            int n = 4;

            int[] nizBrojeva;  // deklaracija reference na niz

            // TODO: nizBrojeva inicijalizirati kao niz duljine n (pojedine èlanove ostaviti neinicijaliziranima) te ispisati sve èlanove takvog neinicijaliziranog niza




            Control[] nizKontrola;  // deklaracija reference na niz 

            // TODO: nizKontrola inicijalizirati kao niz duljine n (pojedine èlanove ostaviti neinicijaliziranima) te ispisati sve èlanove takvog neinicijaliziranog niza




            // TODO: Pokrenuti program te ispis prekopirati u datoteku "InicijalizacijaNiza.txt" u ovom projektu. Obrazložiti ispise u gornja dva sluèaja.

            // inicijalizacija pojedinih èlanova
            nizKontrola[0] = new Button();
            nizKontrola[1] = new Form();
            nizKontrola[2] = nizKontrola[0];
            nizKontrola[3] = new TextBox();

            for (int i = 0; i < n; ++i)
            {
                Console.WriteLine(string.Format("{0}. kontrola: {1}", i, nizKontrola[i]));
            }

            Console.WriteLine("GOTOVO!!!");
            Console.ReadKey();
        }
Пример #4
0
        private ChemtoolsGui()
        {
            this.Text = "ChemTools";
            this.Size = new Size(640, 640);

            input = new TextBox();
            input.Location = new Point(20, 20);
            input.Size = new Size(250, 20);
            input.TextChanged += new EventHandler(InputChanged);
            input.KeyDown += new KeyEventHandler(InputKeyDown);

            output = new RichTextBox();
            output.Location = new Point(50, 160);
            output.Size = new Size(250, 300);

            savedList = new ListBox();
            savedList.Location = new Point(300, 20);
            savedList.Size = new Size(300, 120);
            savedList.SelectedIndexChanged += new EventHandler(ListSelectChange);
            savedList.KeyDown += new KeyEventHandler(ListKeyDown);
            savedList.BeginUpdate();
            savedList.Items.Add("H2O");
            savedList.Items.Add("CO2");
            savedList.Items.Add("C4H10+O2=CO2+H2O");
            savedList.Items.Add("44.0095gCO2");
            savedList.EndUpdate();

            savedOutput = new RichTextBox();
            savedOutput.Location = new Point(300, 160);
            savedOutput.Size = new Size(250, 300);

            btnAdd = new Button();
            btnAdd.Location = new Point(180, 50);
            btnAdd.Text = "Save";
            btnAdd.Click += new EventHandler(AddClick);

            btnDelete = new Button();
            btnDelete.Location = new Point(180, 100);
            btnDelete.Text = "Delete";
            btnDelete.Click += new EventHandler(DeleteClick);

            btnClear = new Button();
            btnClear.Location = new Point(20, 50);
            btnClear.Text = "Clear";
            btnClear.Click += new EventHandler(ClearClick);

            btnReset = new Button();
            btnReset.Location = new Point(20, 100);
            btnReset.Text = "Reset All";
            btnReset.Click += new EventHandler(ResetClick);

            this.Controls.Add(input);
            this.Controls.Add(output);
            this.Controls.Add(savedList);
            this.Controls.Add(savedOutput);
            this.Controls.Add(btnAdd);
            this.Controls.Add(btnDelete);
            this.Controls.Add(btnClear);
            this.Controls.Add(btnReset);
        }
Пример #5
0
        public MirTextBox()
        {
            BackColour = Color.Black;

            TextBox = new TextBox
            {

                BackColor = BackColour,
                BorderStyle = BorderStyle.None,
                Font = new Font(Settings.FontName, 10F),
                ForeColor = ForeColour,
                Location = DisplayLocation,
                Size = Size,
                Visible = Visible,
                Tag = this,

            };

            TextBox.VisibleChanged += TextBox_VisibleChanged;
            TextBox.ParentChanged += TextBox_VisibleChanged;
            TextBox.KeyUp += TextBoxOnKeyUp;
            Shown += MirTextBox_Shown;
            TextBox.MouseMove += CMain.CMain_MouseMove;

            //    TextBox.TextChanged += new EventHandler(TextBox_TextChanged);
               //     TextBox.AutoCompleteSource =
             //           AutoCompleteSource.CustomSource;
             //   TextBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
        }
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.pocBx = new System.Windows.Forms.TextBox();
     this.label1 = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // pocBx
     //
     this.pocBx.Location = new System.Drawing.Point(128, 8);
     this.pocBx.Name = "pocBx";
     this.pocBx.Size = new System.Drawing.Size(80, 20);
     this.pocBx.TabIndex = 5;
     this.pocBx.Text = "0";
     this.pocBx.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(8, 8);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(104, 24);
     this.label1.TabIndex = 4;
     this.label1.Text = "Percent of Charges";
     //
     // Edit_Ceiling_POC_Ctrl
     //
     this.Controls.Add(this.pocBx);
     this.Controls.Add(this.label1);
     this.Name = "Edit_Ceiling_POC_Ctrl";
     this.Size = new System.Drawing.Size(264, 48);
     this.ResumeLayout(false);
 }
Пример #7
0
		public simple_node_editor(simple_element se,node_info ninf,NodeGenerator.NodeGenerator _ng)
		{
			InitializeComponent();
			if (se!=null)
			{
				extended_simple_element ese=se as extended_simple_element;
				if (ese!=null)
				{
					this.se=ese;
				}
				else
				{
					this.se=new extended_simple_element();
					this.se.val_field_type_name=se.val_field_type_name;
					this.se.field_name=se.field_name;
					this.se.field_type=se.field_type;
				}
			}
			if (this.se==null)
			{
				this.se=new extended_simple_element();
			}
			this.ninf=ninf;
			this.ng=_ng;

			set_element();
		}
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="AFilterFindPanelObject">The FilterFindPanel Object on the main form</param>
        /// <param name="ASuspenseAccountsAllowed">Used to determine if the suspense accounts control be shown.</param>
        public TUC_AccountsListFilterFind(TFilterAndFindPanel AFilterFindPanelObject, bool ASuspenseAccountsAllowed)
        {
            FSuspenseAccountsAllowed = ASuspenseAccountsAllowed;

            FFilterTxtAccountCode = (TextBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("txtAccountCode");
            FFilterCmbAccountType = (TCmbAutoComplete)AFilterFindPanelObject.FilterPanelControls.FindControlByName("cmbAccountType");
            FFilterTxtDescrEnglish = (TextBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("txtDescrEnglish");
            FFilterTxtDescrLocal = (TextBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("txtDescrLocal");
            FFilterChkBankAccount = (CheckBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("chkBankAccount");

            if (ASuspenseAccountsAllowed)
            {
                FFilterChkSuspenseAccount = (CheckBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("chkSuspenseAccount");
            }

            FFilterChkActive = (CheckBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("chkActive");
            FFilterChkSummary = (CheckBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("chkSummary");
            FFilterChkForeign = (CheckBox)AFilterFindPanelObject.FilterPanelControls.FindControlByName("chkForeign");

            FFindTxtAccountCode = (TextBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("txtAccountCode");
            FFindCmbAccountType = (TCmbAutoComplete)AFilterFindPanelObject.FindPanelControls.FindControlByName("cmbAccountType");
            FFindTxtDescrEnglish = (TextBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("txtDescrEnglish");
            FFindTxtDescrLocal = (TextBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("txtDescrLocal");
            FFindChkBankAccount = (CheckBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("chkBankAccount");

            if (ASuspenseAccountsAllowed)
            {
                FFindChkSuspenseAccount = (CheckBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("chkSuspenseAccount");
            }

            FFindChkActive = (CheckBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("chkActive");
            FFindChkSummary = (CheckBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("chkSummary");
            FFindChkForeign = (CheckBox)AFilterFindPanelObject.FindPanelControls.FindControlByName("chkForeign");
        }
Пример #9
0
 internal CustomListBoxTextEditor(CustomListBox listBox, TextBox textBox)
 {
     _listBox = listBox;
     _textBox = textBox;
     _textBox.Validating += OnValidating;
     _textBox.KeyDown += OnKeyDown;
 }
Пример #10
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.textBoxOutput = new System.Windows.Forms.TextBox();
			this.SuspendLayout();
			// 
			// textBoxOutput
			// 
			this.textBoxOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.textBoxOutput.Location = new System.Drawing.Point(8, 8);
			this.textBoxOutput.Multiline = true;
			this.textBoxOutput.Name = "textBoxOutput";
			this.textBoxOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both;
			this.textBoxOutput.Size = new System.Drawing.Size(832, 552);
			this.textBoxOutput.TabIndex = 0;
			this.textBoxOutput.Text = "";
			this.textBoxOutput.WordWrap = false;
			// 
			// SimpleOutputForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(848, 566);
			this.Controls.Add(this.textBoxOutput);
			this.Name = "SimpleOutputForm";
			this.Text = "SimpleOutputForm";
			this.ResumeLayout(false);

		}
Пример #11
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.txtLine = new System.Windows.Forms.TextBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(24, 18);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 16);
			this.label1.TabIndex = 0;
			this.label1.Text = "Line Number";
			// 
			// txtLine
			// 
			this.txtLine.Location = new System.Drawing.Point(104, 16);
			this.txtLine.Name = "txtLine";
			this.txtLine.Size = new System.Drawing.Size(112, 20);
			this.txtLine.TabIndex = 1;
			this.txtLine.Text = "";
			// 
			// btnOK
			// 
			this.btnOK.Location = new System.Drawing.Point(240, 16);
			this.btnOK.Name = "btnOK";
			this.btnOK.TabIndex = 2;
			this.btnOK.Text = "&OK";
			this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCancel.Location = new System.Drawing.Point(240, 48);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 3;
			this.btnCancel.Text = "&Cancel";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// Goto
			// 
			this.AcceptButton = this.btnOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.btnCancel;
			this.ClientSize = new System.Drawing.Size(338, 87);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.txtLine);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "Goto";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Go To";
			this.ResumeLayout(false);

		}
 public VendingDisplayController(TextBox displayTextBox, ICoinPurse coinPurse)
 {
     Display = displayTextBox;
     CoinPurse = coinPurse;
     CoinPurse.RegisterObserver(this);
     DisplayMessage(IntialMessage);
 }
Пример #13
0
 /// <summary>
 /// Та же самая проверка только массивом
 /// </summary>
 /// <param name="_textBox"></param>
 /// <param name="_message"></param>
 /// <returns></returns>
 public static bool Checking_TextBox(TextBox[] _textBox , String[] _message)
 {
     for ( int i = 0; i < _textBox.Length; i++ )
         if ( !Checking_TextBox( _textBox[i] , _message[i] ) )   //Если хоть один false то нет смысла проверять остальные
             return false;
     return true;
 }
Пример #14
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.button1 = new System.Windows.Forms.Button();
     this.textBox1 = new System.Windows.Forms.TextBox();
     this.SuspendLayout();
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(56, 64);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(168, 80);
     this.button1.TabIndex = 0;
     this.button1.Text = "button1";
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // textBox1
     //
     this.textBox1.Location = new System.Drawing.Point(64, 184);
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new System.Drawing.Size(176, 20);
     this.textBox1.TabIndex = 1;
     this.textBox1.Text = "textBox1";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(292, 273);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                   this.textBox1,
                                                                   this.button1});
     this.Name = "Form1";
     this.Text = "Form1";
     this.ResumeLayout(false);
 }
Пример #15
0
        public ProjectReferencePanel(ISelectReferenceDialog selectDialog)
        {
            this.selectDialog = selectDialog;

            ColumnHeader nameHeader = new ColumnHeader();
            nameHeader.Text  = ResourceService.GetString("Dialog.SelectReferenceDialog.ProjectReferencePanel.NameHeader");
            nameHeader.Width = 170;
            Columns.Add(nameHeader);

            ColumnHeader directoryHeader = new ColumnHeader();
            directoryHeader.Text  = ResourceService.GetString("Dialog.SelectReferenceDialog.ProjectReferencePanel.DirectoryHeader");
            directoryHeader.Width = 290;
            Columns.Add(directoryHeader);

            View = View.Details;
            Dock = DockStyle.Fill;
            FullRowSelect = true;

            ItemActivate += delegate { AddReference(); };
            PopulateListView();

            Panel upperPanel = new Panel { Dock = DockStyle.Top, Height = 20 };
            filterTextBox = new TextBox { Width = 150, Dock = DockStyle.Right };
            filterTextBox.TextChanged += delegate { Search(); };

            upperPanel.Controls.Add(filterTextBox);

            this.Controls.Add(upperPanel);
        }
   	public void buildGui()
   	{
   		var topPanel = this.add_Panel();
   		Path = topPanel.insert_Above<TextBox>(20);
		sourceCode = topPanel.add_SourceCodeEditor();
		dataGridView = sourceCode.insert_Above<Panel>(100).add_DataGridView();
		leftPanel = topPanel.insert_Left<Panel>(300);									
		
		Path.onEnter(loadFiles);
		Path.onDrop(
			(fileOrFolder)=>{
								Path.set_Text(fileOrFolder);
								loadFiles(fileOrFolder);
							}); 	   	   	   	   
		dataGridView.SelectionChanged+= 
			(sender,e) => {
					if (dataGridView.SelectedRows.size() == 1)
					{
						var selectedRow = dataGridView.SelectedRows[0]; 
						var filePath = selectedRow.Cells[0].Value.str();
						var filename = selectedRow.Cells[1].Value.str();
						var lineNumber = selectedRow.Cells[2].Value.str();
						"opening up source code: {0}".info(filePath);
						sourceCode.open(filePath.pathCombine(filename));  
						sourceCode.gotoLine(lineNumber.toInt() + 1);
						dataGridView.focus();
					}
			  };
							
	}
Пример #17
0
 private void InitializeComponent()
 {
     this.tbxPrintName = new System.Windows.Forms.TextBox();
     this.label1 = new System.Windows.Forms.Label();
     base.SuspendLayout();
     this.tbxPrintName.set_Location(new System.Drawing.Point(0x4c, 12));
     this.tbxPrintName.set_Margin(new System.Windows.Forms.Padding(4, 4, 4, 4));
     this.tbxPrintName.set_Name("tbxPrintName");
     this.tbxPrintName.set_Size(new System.Drawing.Size(0x1bd, 0x16));
     this.tbxPrintName.set_TabIndex(0);
     this.label1.set_AutoSize(true);
     this.label1.set_Location(new System.Drawing.Point(13, 0x12));
     this.label1.set_Margin(new System.Windows.Forms.Padding(4, 0, 4, 0));
     this.label1.set_Name("label1");
     this.label1.set_Size(new System.Drawing.Size(0x27, 0x10));
     this.label1.set_TabIndex(1);
     this.label1.set_Text("ФИО");
     base.set_AutoScaleDimensions(new System.Drawing.SizeF(8f, 16f));
     base.set_AutoScaleMode(System.Windows.Forms.AutoScaleMode.Font);
     base.set_ClientSize(new System.Drawing.Size(0x213, 0x1cf));
     base.Controls.Add(this.label1);
     base.Controls.Add(this.tbxPrintName);
     this.set_Font(new System.Drawing.Font("Microsoft Sans Serif", 9.75f));
     base.set_Margin(new System.Windows.Forms.Padding(4, 4, 4, 4));
     base.set_Name("AddBenefitResident");
     this.set_Text("AddBenefitResident");
     base.add_Load(new System.EventHandler(this.AddBenefitResident_Load));
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Пример #18
0
        private void InitialiseComponent()
        {
            this.OKButton = new Button();
            this.CancelButton = new Button();
            this.UserInput = new TextBox();

            //Form Properties
            this.Size = new System.Drawing.Size(280, 160);

            //OKButton Properties
            this.OKButton.Location = new System.Drawing.Point(10, 60);
            this.OKButton.Size = new System.Drawing.Size(120, 20);
            this.OKButton.Click += new EventHandler(OKButtonClicked);
            this.OKButton.Enabled = false; //unclickable until user inputs string in the search field
            this.OKButton.Text = "Retrieve WebPage";

            //CancelButton Properties
            this.CancelButton.Location = new System.Drawing.Point(140, 60);
            this.CancelButton.Size = new System.Drawing.Size(120,20);
            this.CancelButton.Click+= new EventHandler(CancelButtonClicked);
            this.CancelButton.Text = "Cancel";

            //UserInput Properties
            this.UserInput.Location = new System.Drawing.Point(0,0);//10,25
            this.UserInput.TextChanged+=new EventHandler(UserInputTextChanged);
            this.UserInput.Size = new System.Drawing.Size(230, 10);

            //Controls
            this.Controls.AddRange(new Control[] { this.OKButton, this.CancelButton, this.UserInput });
        }
Пример #19
0
		private void onLoginLoad(object sender, EventArgs e)
		{
			this.CenterToScreen();
			this.Location = new Point(this.Location.X, this.Location.Y / 2);

			updateViews();

			//if (Program.settings.popupForVersion < 1) {
			//	MessageBox.Show("The Check-In program has been updated,\nplease verify the following settings:\n\n" +
			//		"Login Page\n\n- Server name (e.g. <yourchurch>.tpsdb.com)\n- Username\n- Password\n- Printer\n- Advanced Page Size (Optional)\n\n" +
			//		"Settings Page\n\n- Campus\n- Early Checkin Hours\n- Late Checkin Minutes\n- Checkboxes at the bottom", "New Version", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

			//	Program.settings.setPopupForVersion(1);
			//}

			keyboard = new CommonKeyboard(this);
			keyboard.Show();
			attachKeyboard();

			URL.Text = Program.settings.subdomain;
			username.Text = Program.settings.user;

			if (username.Text.Length > 0) {
				current = password;
				this.ActiveControl = password;
			} else {
				current = URL;
				this.ActiveControl = URL;
			}
		}
Пример #20
0
 internal void ShowFormGetWebURL(TextBox targetTextbox)
 {
     _targetTextbox = targetTextbox;
     this.Show();
     this.BringToFront();
     //selectDefaultNodeSafely();
 }
Пример #21
0
        public ChangeSettings()
        {
            InitializeComponent();

            for (int i = 0; i < Types.Length; i++)
            {
                if (Types[i] != typeof(bool))
                {
                    TextBox tb = new TextBox();
                    tb.Text = set[Names[i, 0]].ToString();
                    tb.Size = new Size(100, lineDist);
                    tb.Location = new Point(185, i * (lineDist + 5) + 20);
                    Controls.Add(tb);
                    controlList.Add(tb);
                    toolTip1.SetToolTip(tb, Names[i, 2]);
                }
                else
                {
                    CheckBox cb = new CheckBox();
                    cb.Checked = (bool)set[Names[i, 0]];
                    cb.Location = new Point(185, i * (lineDist + 5) + 20);
                    Controls.Add(cb);
                    controlList.Add(cb);
                    toolTip1.SetToolTip(cb, Names[i, 2]);
                }

                Label l = new Label();
                l.Text = Names[i, 1];
                l.AutoSize = true;
                l.Location = new Point(180 - TextRenderer.MeasureText(l.Text, new Font(l.Font.FontFamily, l.Font.Size, l.Font.Style)).Width, i * (lineDist + 5) + 20);
                Controls.Add(l);
                toolTip1.SetToolTip(l, Names[i, 2]);
            }
        }
Пример #22
0
        private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // button1
            // 
            this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.button1.Location = new System.Drawing.Point(245, 0);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(45, 42);
            this.button1.TabIndex = 0;
            this.button1.Text = "Find";
            this.button1.UseVisualStyleBackColor = true;
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(0, 12);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(230, 20);
            this.textBox1.TabIndex = 1;
            // 
            // frmFind
            // 
            this.ClientSize = new System.Drawing.Size(292, 56);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.button1);
            this.Name = "frmFind";
            this.Text = "Find";
            this.ResumeLayout(false);
            this.PerformLayout();

        }
Пример #23
0
        // Default Constructor
        //
        // Requires the passing of Main_Screen (object of type Main:Form) to allow
        // for all other classes to interface with the main UI to allow for both
        // debug updates and progress reports.
        public ErrorHandler(Main Main_Screen)
        {
            // Initializes the localized reference form objects
            ErrorBox = Main_Screen.textBox1;

            MainUIReference = Main_Screen;
        }
Пример #24
0
 private void setChange(TextBox txt1, TextBox txt2)
 {
     txt1.Text = "";
     txt2.Text = "";
     txt1.Enabled = !txt1.Enabled;
     txt2.Enabled = !txt2.Enabled;
 }
        public void TestShowWithEvents()
        {
            //---------------Set up test pack-------------------
            System.Windows.Forms.DateTimePicker dateTimePicker = new System.Windows.Forms.DateTimePicker();
            dateTimePicker.ShowCheckBox = true;
            System.Windows.Forms.Form form = new System.Windows.Forms.Form();
            System.Windows.Forms.TextBox textBox = new System.Windows.Forms.TextBox();
            form.Controls.Add(textBox);
            textBox.Dock = System.Windows.Forms.DockStyle.Fill;
            textBox.Multiline = true;
            form.Controls.Add(dateTimePicker);
            dateTimePicker.Dock = System.Windows.Forms.DockStyle.Top;
            dateTimePicker.ValueChanged += delegate
                                               {
                                                   textBox.Text += "EventFired";
                                               };
            System.Windows.Forms.Button button = new System.Windows.Forms.Button();
            form.Controls.Add(button);
            button.Dock = System.Windows.Forms.DockStyle.Bottom;
            button.Click += delegate
                                {
                                    dateTimePicker.Checked = !dateTimePicker.Checked;
                                };
            //-------------Assert Preconditions -------------

            //---------------Execute Test ----------------------
            form.ShowDialog();
            //---------------Test Result -----------------------

        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (initAdd != maxAdd)
            {
                TextBox txF = new TextBox();
                TextBox txL = new TextBox();
                TextBox txM = new TextBox();

                initY += 36;

                recpt.addTextBox(txF, 6, initY, 220, 30, "txtFname" + initAdd.ToString());
                recpt.addTextBox(txL, 235, initY, 220, 30, "txtLname" + initAdd.ToString());
                recpt.addTextBox(txM, 464, initY, 220, 30, "txtEmail" + initAdd.ToString());
                btnAdd.Location = new Point(690, initY);
                btnRemove.Location = new Point(727, initY);

                initAdd++;

                this.panel1.Controls.Add(txF);
                this.panel1.Controls.Add(txL);
                this.panel1.Controls.Add(txM);
            }
            else
            {
                btnAdd.Visible = false;
            }
        }
Пример #27
0
        public ByteArrayPanel( ResourceContentControl parentControl )
        {
            textHexCheckBox = new CheckBox( );
            textBox = new TextBox( );

            SuspendLayout( );

            Dock = DockStyle.Fill;
            DockPadding.All = 5;

            textHexCheckBox.FlatStyle = FlatStyle.System;
            textHexCheckBox.Location = new Point( 3, 3 );
            textHexCheckBox.TabIndex = 1;
            textHexCheckBox.Text = "Show as Hex";
            textHexCheckBox.Checked = false;
            textHexCheckBox.CheckedChanged += new EventHandler( OnCheckedChangedTextCheckBox );

            textBox.Location = new Point( 3, 30 );
            textBox.Multiline = true;
            textBox.ReadOnly = true;
            textBox.ScrollBars = ScrollBars.Vertical;
            textBox.Font = new Font( FontFamily.GenericMonospace, 8 );
            textBox.WordWrap = true;

            Controls.Add( textBox );
            Controls.Add( textHexCheckBox );

            ResumeLayout( false );
        }
Пример #28
0
        /// <summary>
        /// @author:khoaht
        /// @cratedate:9/17/2008
        /// @description: Lay dinh dang diem
        /// </summary>
        /// <param name="txtBox"></param>
        public static void GetMarkString(TextBox txtBox)
        {
            string mark = txtBox.Text;
            string strMark = "";
            if (mark.Length == 1)
            {
                if (char.IsNumber(mark[0]))
                    strMark = mark;
            }
            else if (mark.Length == 2)
            {
                if (char.IsNumber(mark[0]) && char.IsNumber(mark[1]))
                    strMark = mark[0] + "." + mark[1];
            }
            else if (mark.Length == 3)
            {
                if (char.IsNumber(mark[0]) && char.IsNumber(mark[2]) && mark[1] == '.')
                    strMark = mark;
            }
            else if (mark.Length == 4)
            {
                if (char.IsNumber(mark[0]) && char.IsNumber(mark[2]) && char.IsNumber(mark[3]))
                    strMark = mark[0] + "." + mark[2] + mark[3];
            }
            else if (mark.Length > 4)
                strMark = mark.Substring(3, 1);

            txtBox.Text = strMark;
            txtBox.SelectionStart = strMark.Length;
        }
Пример #29
0
		protected TextBox BuildDirPanel(Control parent, String name)
		{
			Panel panel = new Panel();
			panel.Dock = DockStyle.Top;
			panel.Height = 60;

			Label l = new Label();
			l.Location = new Point(0, 0);
			l.Dock = DockStyle.Left;
			l.Text = name;
			l.AutoSize = true;
			panel.Controls.Add(l);

			TextBox textBox = new TextBox();
			textBox.Location = new Point(10, 20);
			textBox.Width = ((ICustPanel)this).PreferredSize.Width - 40;
			panel.Controls.Add(textBox);
			
			// Don't have a reasonable directory browser and don't feel
			// like doing the P/Invoke for the underlying one.  Sigh.
			/*****
			Button b = new Button();
			b.Location = new Point(120, 20);
			b.Width = 20;
			b.Text = "...";
			b.Tag = textBox;
			b.Click += new EventHandler(DirButtonClicked);
			panel.Controls.Add(b);
			*****/
			
			parent.Controls.Add(panel);
			
			return textBox;
		}
Пример #30
0
 public ProcessLayer()
 {
     m_lb_Status = null;
     m_txt_Log = null;
     bIsRun = false;
     bIsShow = false;
 }