private void PropertyView_DoubleClick(object sender, EventArgs e) { lvItem_ = this.GetItemAt(mx_, my_); if (lvItem_ != null) { int x1 = this.Columns[0].Width + 2; if (mx_ >= x1) { int x2 = x1 + this.Columns[1].Width; int r = lvItem_.Index; Property prop = (Property)propList_[r]; if (prop.isSelection()) { addSelections(prop.getOptions()); comboBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height); comboBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top); comboBox_.Show(); comboBox_.Text = lvItem_.SubItems[1].Text; comboBox_.SelectAll(); comboBox_.Focus(); } else { editBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height - 2); editBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top); editBox_.Show(); editBox_.Text = lvItem_.SubItems[1].Text; editBox_.SelectAll(); editBox_.Focus(); } } } }
public void paramListView_DoubleClick(object sender, System.EventArgs e) { // Check the subitem clicked . int colStartX = 0; int colEndX = paramListView.Columns[0].Width; for (int i = 0; i < paramListView.Columns.Count; i++) { if ((firstMouseClickPoint.X > colStartX) && (firstMouseClickPoint.X < colEndX)) { subItemSelected = i; break; } colStartX = colEndX; if (i < (paramListView.Columns.Count - 1)) { colEndX += paramListView.Columns[i + 1].Width; } } subItemText = li.SubItems[subItemSelected].Text; foreach (InterceptedFunctionParameter fp in function.Parameters) { if (fp.Name == li.SubItems[0].Text) { cmbBox.Items.Add(fp.TestValue); } } if ((string)cmbBox.Items[0] != IgnoreParamString) { cmbBox.Items.Add(IgnoreParamString); } string colName = paramListView.Columns[subItemSelected].Text; if (colName == "Value") { Rectangle r = new Rectangle(colStartX, li.Bounds.Y, colEndX, li.Bounds.Bottom); cmbBox.Width = colEndX - colStartX; cmbBox.Height = li.Bounds.Bottom - li.Bounds.Top; cmbBox.Location = new System.Drawing.Point(colStartX, li.Bounds.Y); cmbBox.Show(); cmbBox.Text = subItemText; cmbBox.SelectAll(); cmbBox.Focus(); } }
public void SMKDoubleClick(object sender, System.EventArgs e) { // Check the subitem clicked . int nStart = X; int spos = 0; int epos = this.Columns[0].Width; for (int i = 0; i < this.Columns.Count; i++) { if (nStart > spos && nStart < epos) { subItemSelected = i; break; } spos = epos; epos += this.Columns[i].Width; } Console.WriteLine("SUB ITEM SELECTED = " + li.SubItems[subItemSelected].Text); subItemText = li.SubItems[subItemSelected].Text; string colName = this.Columns[subItemSelected].Text; if (colName == "Continent") { Rectangle r = new Rectangle(spos, li.Bounds.Y, epos, li.Bounds.Bottom); cmbBox.Size = new System.Drawing.Size(epos - spos, li.Bounds.Bottom - li.Bounds.Top); cmbBox.Location = new System.Drawing.Point(spos, li.Bounds.Y); cmbBox.Show(); cmbBox.Text = subItemText; cmbBox.SelectAll(); cmbBox.Focus(); } else { Rectangle r = new Rectangle(spos, li.Bounds.Y, epos, li.Bounds.Bottom); editBox.Size = new System.Drawing.Size(epos - spos, li.Bounds.Bottom - li.Bounds.Top); editBox.Location = new System.Drawing.Point(spos, li.Bounds.Y); editBox.Show(); editBox.Text = subItemText; editBox.SelectAll(); editBox.Focus(); } }
/// <summary> /// Handling double mouse click for changing MetaData info of the loaded data columns /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ListView1_MouseDoubleClick(object sender, forms.MouseEventArgs e) { forms.ListViewHitTestInfo info = listView1.HitTest(X, Y); var row = info.Item.Index; var col = info.Item.SubItems.IndexOf(info.SubItem); var colType = listView1.Items[3].SubItems[col]; li = info.Item; subItemSelected = col; //only first and second Row process the mouse input if (li == null || row > 3 || row < 1 || col < 1) { return; } forms.ComboBox combo = null; if (row == 1) { combo = cmbBox1; } else if (row == 2) { combo = cmbBox2; } else if (row == 3) { combo = cmbBox3; } else { combo = cmbBox1; } var subItm = li.SubItems[col]; if (combo != null) { combo.Bounds = subItm.Bounds; combo.Show(); combo.Text = subItm.Text; combo.SelectAll(); combo.Focus(); } }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { modelPanel1.ClearTargets(); _mergeModels = checkBox1.Checked; if (_mergeModels) { label1.Hide(); comboBox1.Hide(); _baseInf = _externalModel._linker.BoneCache[0]; baseBone.Text = _baseInf.ToString(); modelPanel1.AddTarget(_externalModel, false); modelPanel1.SetCamWithBox(_externalModel.GetBox()); } else { label1.Show(); comboBox1.Show(); GetBaseInfluence(); } }
private void GetBaseInfluence() { if (_node != null) { modelPanel1.RemoveReference(_node); } MDL0BoneNode[] boneCache = _externalModel._linker.BoneCache; if ((_node = (MDL0ObjectNode)comboBox1.SelectedItem).Weighted) { int least = int.MaxValue; foreach (IMatrixNode inf in _node.Influences) { if (inf is MDL0BoneNode && ((MDL0BoneNode)inf).BoneIndex < least) { least = ((MDL0BoneNode)inf).BoneIndex; } } if (least != int.MaxValue) { MDL0BoneNode temp = boneCache[least]; _baseInf = (IMatrixNode)temp.Parent; } } else { _baseInf = _node.MatrixNode; } if (_baseInf is Influence) { label2.Hide(); comboBox2.Hide(); } else if (_baseInf is MDL0BoneNode) { label2.Show(); comboBox2.Show(); } baseBone.Text = _baseInf.ToString(); if (comboBox3.SelectedIndex == 0 && _baseInf is MDL0BoneNode) { int i = 0; foreach (MDL0BoneNode s in comboBox2.Items) { if (s.Name == baseBone.Text) { comboBox2.SelectedIndex = i; break; } i++; } } _node.IsRendering = true; modelPanel1.ClearTargets(); modelPanel1.AddTarget(_node, false); modelPanel1.SetCamWithBox(_node.GetBox()); }
public void ListBoxItemDoubleClick(object sender, System.EventArgs e) { // Check the subitem clicked . if (this.SelectedItems.Count == 0) { return; } listSelectedRow = this.SelectedItems[0].Index; int nStart = X; int spos = 0; int epos = this.Columns[0].Width; for (int i = 0; i < this.Columns.Count; i++) { if (nStart > spos && nStart < epos) { subItemSelected = i; break; } spos = epos; if (i + 1 > Columns.Count - 1) { return; } epos += this.Columns[i + 1].Width; } string colName = this.Columns[subItemSelected].Text; if (colName == "Action") { //li.Checked = true; ComboBox cbAction = bActionInput ? ActionInputCmbBox : ActionCmbBox; cbAction.Location = new System.Drawing.Point(spos, li.Bounds.Y); cbAction.Size = new System.Drawing.Size(this.Columns[0].Width, li.Bounds.Bottom - li.Bounds.Top); cbAction.SelectedItem = this.SelectedItems[0].SubItems[0].Text; cbAction.Show(); //cmbBox.Text = subItemText; cbAction.SelectAll(); cbAction.Focus(); } else if (colName == "Duration") { if (this.SelectedItems[0].Text != "E-mail Event Activity") { DurationCmbBox.Location = new System.Drawing.Point(spos, li.Bounds.Y); DurationCmbBox.Size = new System.Drawing.Size(this.Columns[1].Width, li.Bounds.Bottom - li.Bounds.Top); DurationCmbBox.SelectedItem = this.SelectedItems[0].SubItems[1].Text; DurationCmbBox.Show(); //cmbBox.Text = subItemText; DurationCmbBox.SelectAll(); DurationCmbBox.Focus(); //if ((this.ItemChecked) && (this.SelectedItems >= 0)) //if (this.Items[this.SelectedItems.].Checked) //this.Items[this.SelectedItems].Checked = true; //else //this.Items[this.SelectedItems].Checked = false; } } else if (colName == "Reader ID") { ReaderCmbBox.Location = new System.Drawing.Point(spos, li.Bounds.Y); ReaderCmbBox.Size = new System.Drawing.Size(this.Columns[2].Width, li.Bounds.Bottom - li.Bounds.Top); ReaderCmbBox.SelectedIndex = ReaderCmbBox.FindStringExact(this.SelectedItems[0].SubItems[2].Text); Rectangle rect = GetColumnLocation(4); LocationLabel.Location = new System.Drawing.Point(rect.X, li.Bounds.Y); LocationLabel.Size = new System.Drawing.Size(this.Columns[4].Width, li.Bounds.Bottom - li.Bounds.Top - 1); ReaderCmbBox.Show(); //cmbBox.Text = subItemText; ReaderCmbBox.SelectAll(); ReaderCmbBox.Focus(); // LocationLabel.Show(); } else if (colName == "FGen ID") { FGenCmbBox.Location = new System.Drawing.Point(spos, li.Bounds.Y); FGenCmbBox.Size = new System.Drawing.Size(this.Columns[3].Width, li.Bounds.Bottom - li.Bounds.Top); FGenCmbBox.SelectedIndex = FGenCmbBox.FindStringExact(this.SelectedItems[0].SubItems[3].Text); Rectangle rect = GetColumnLocation(4); LocationLabel.Location = new System.Drawing.Point(rect.X, li.Bounds.Y); LocationLabel.Size = new System.Drawing.Size(this.Columns[4].Width, li.Bounds.Bottom - li.Bounds.Top - 1); FGenCmbBox.Show(); //cmbBox.Text = subItemText; FGenCmbBox.SelectAll(); FGenCmbBox.Focus(); // LocationLabel.Show(); } //else if (colName == "Location") //{ //LocationLabel.Location = new System.Drawing.Point(spos, li.Bounds.Y); //LocationLabel.Size = new System.Drawing.Size(this.Columns[4].Width, li.Bounds.Bottom - li.Bounds.Top); //LocationLabel.Show(); //} }
protected virtual Control _add_standart_combo_box(Panel Panel,int ui,int SelectedIndex,object[] Items,Font font,int HorizontalShift=1,int VerticalShift=5) { ComboBox Result = new ComboBox(); if(font==null)font=new Font(FontFamily.GenericSansSerif,12.25F); Result.Size = new Size(Panel.Width - HorizontalShift*2-15, Result.Height); Result.Font = font; Result.Items.AddRange(Items); Result.SelectedIndex = SelectedIndex; Result.SelectedValueChanged += (sender, e) => { _fcm_on_fcm_data_changed(Result.SelectedIndex, ui, Result); }; Control lcontrol =Panel.Controls.Count>0? Panel.Controls[Panel.Controls.Count - 1]:null; Point lloc=lcontrol!=null? lcontrol.Location:new Point(HorizontalShift,VerticalShift); if(lcontrol!=null)lloc=new Point(HorizontalShift,lloc.Y+VerticalShift+lcontrol.Height); Result.Location = lloc; Panel.Controls.Add(Result); Result.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; Result.Show(); return Result; }
public AgentGUI( string caption ) { m_Id = ++m_IdCounter; RadioGroupUpdater[] tmpOld = m_UpdaterList; m_UpdaterList = new RadioGroupUpdater[m_Id]; if ( tmpOld != null ) for ( int i = 0; i < tmpOld.Length; i++ ) m_UpdaterList[i] = tmpOld[i]; m_UpdaterList[m_Id-1] = new RadioGroupUpdater( SyncPlayerSelectors ); this.Text = caption; this.Width = 430; this.Height = 340; this.MaximizeBox = false; this.FormBorderStyle = FormBorderStyle.FixedSingle; m_GroupBoxPlayer = new GroupBox(); m_GroupBoxPlayer.Text = "Play as"; m_GroupBoxPlayer.Width = 100; m_GroupBoxPlayer.Height = 150; m_GroupBoxPlayer.Left = 10; m_GroupBoxPlayer.Top = 25; m_GroupBoxPlayer.Show(); this.Controls.Add( m_GroupBoxPlayer ); m_PlayerLight = new RadioButton(); m_PlayerLight.Text = "Light"; m_PlayerLight.Width = 50; m_PlayerLight.Left = 25; m_PlayerLight.Top = 50; m_PlayerLight.Checked = true; m_PlayerLight.CheckedChanged += new EventHandler( m_PlayerSelect_Click ); m_PlayerLight.Show(); m_GroupBoxPlayer.Controls.Add( m_PlayerLight ); m_PlayerDark = new RadioButton(); m_PlayerDark.Text = "Dark"; m_PlayerDark.Width = 50; m_PlayerDark.Left = 25; m_PlayerDark.Top = 80; m_PlayerDark.CheckedChanged += new EventHandler( m_PlayerSelect_Click ); m_PlayerDark.Show(); m_GroupBoxPlayer.Controls.Add( m_PlayerDark ); m_PlayerNone = new RadioButton(); m_PlayerNone.Text = "None"; m_PlayerNone.Width = 50; m_PlayerNone.Left = 25; m_PlayerNone.Top = 20; m_PlayerNone.CheckedChanged += new EventHandler( m_PlayerSelect_Click ); m_PlayerNone.Show(); m_GroupBoxPlayer.Controls.Add( m_PlayerNone ); m_PlayerBoth = new RadioButton(); m_PlayerBoth.Text = "Both"; m_PlayerBoth.Width = 50; m_PlayerBoth.Left = 25; m_PlayerBoth.Top = 110; m_PlayerBoth.CheckedChanged += new EventHandler( m_PlayerSelect_Click ); m_PlayerBoth.Show(); m_GroupBoxPlayer.Controls.Add( m_PlayerBoth ); m_EvaluatorLabel = new Label(); m_EvaluatorLabel.Text = "Evaluator"; m_EvaluatorLabel.Left = 10; m_EvaluatorLabel.Top = 190; m_EvaluatorLabel.AutoSize = true; m_EvaluatorLabel.Show(); this.Controls.Add( m_EvaluatorLabel ); m_PluginSelector = new ComboBox(); m_PluginSelector.DropDownStyle = ComboBoxStyle.DropDownList; m_PluginSelector.Left = 10; m_PluginSelector.Top = 210; m_PluginSelector.Width = 100; m_PluginSelector.Items.Add( "None" ); m_PluginSelector.SelectedIndex = 0; m_PluginSelector.Show(); this.Controls.Add( m_PluginSelector ); m_LearnPanel = new Panel(); m_LearnPanel.BorderStyle = BorderStyle.None; m_LearnPanel.Left = 5; m_LearnPanel.Top = 240; m_LearnPanel.Width = 100; m_LearnPanel.Height = 25; m_LearnPanel.Show(); this.Controls.Add( m_LearnPanel ); m_Learn = new CheckBox(); m_Learn.Text = "Learn"; m_Learn.Left = 5; m_Learn.Top = 0; m_Learn.Checked = false; m_Learn.CheckedChanged += new EventHandler( m_Learn_CheckedChanged ); m_Learn.Show(); m_LearnPanel.Controls.Add( m_Learn ); if (m_Id == 1) m_Learn.Checked = true; m_PossibilitiesLabel = new Label(); m_PossibilitiesLabel.Text = "Possible moves and score"; m_PossibilitiesLabel.Left = 130; m_PossibilitiesLabel.Top = 10; m_PossibilitiesLabel.AutoSize = true; m_PossibilitiesLabel.Show(); this.Controls.Add( m_PossibilitiesLabel ); m_PossibilitiesList = new ListBox(); m_PossibilitiesList.Left = 130; m_PossibilitiesList.Top = 30; m_PossibilitiesList.Width = 280; m_PossibilitiesList.Height = 250; m_PossibilitiesList.Show(); this.Controls.Add( m_PossibilitiesList ); m_NumberPossibilitiesLabel = new Label(); m_NumberPossibilitiesLabel.Text = "Possibilities: 0"; m_NumberPossibilitiesLabel.Left = 130; m_NumberPossibilitiesLabel.Top = 280; m_NumberPossibilitiesLabel.AutoSize = true; m_NumberPossibilitiesLabel.Show(); this.Controls.Add( m_NumberPossibilitiesLabel ); SyncAllSelectors(); SyncAllSelectors(); }
private void EditListView_MouseDown(object sender, MouseEventArgs e) { int mx = e.X; lvItem_ = this.GetItemAt(2, e.Y); if (lvItem_ == null) { if (this.Items.Count <= 0) { lvItem_ = addItemWithSubItems(""); } else if (!this.Items[this.Items.Count - 1].Text.Equals("")) { lvItem_ = addItemWithSubItems(""); } else { lvItem_ = this.Items[this.Items.Count - 1]; } } int x1 = 0; int x2 = this.Columns[0].Width; subItemSelected_ = 0; if (mx >= x2) { for (int i = 1; i < this.Columns.Count; i++) { x1 = x2; x2 += this.Columns[i].Width; if (mx < x2) { subItemSelected_ = i; break; } } } x1 += 2; subItemText_ = lvItem_.SubItems[subItemSelected_].Text; string colName = this.Columns[subItemSelected_].Text; if (colName.Equals("Type")) { comboBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height - 2); comboBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top); comboBox_.Show(); comboBox_.Text = subItemText_; comboBox_.SelectAll(); comboBox_.Focus(); } else { editBox_.Size = new System.Drawing.Size(x2 - x1, lvItem_.Bounds.Height); editBox_.Location = new System.Drawing.Point(x1, lvItem_.Bounds.Top); editBox_.Show(); editBox_.Text = subItemText_; editBox_.SelectAll(); editBox_.Focus(); } }
private void cboLogic_SelectedIndexChanged(object sender, EventArgs e) { if (this.cboLogic.Text == "BETWEEN") { /* make an exact copy of the current input control and place it next to the other */ if (this.CurrentInputObject.GetType() == typeof(TextBox)) { TextBox tBox1 = (TextBox)this.CurrentInputObject; TextBox tBox2 = new TextBox(); tBox1.Width = (this.pnlCriteriaInput.Width - 10) / 2; tBox2.Width = (this.pnlCriteriaInput.Width - 10) / 2; tBox2.Left = tBox1.Left + tBox1.Width + 5; this.CurrentInputObject2 = tBox2; this.pnlCriteriaInput.Controls.Add(tBox2); tBox2.Show(); } else if (this.CurrentInputObject.GetType() == typeof(ComboBox)) { ComboBox cBox1 = (ComboBox)this.CurrentInputObject; ComboBox cBox2 = new ComboBox(); cBox1.Width = (this.pnlCriteriaInput.Width - 10) / 2; cBox2.Width = (this.pnlCriteriaInput.Width - 10) / 2; cBox2.Left = cBox2.Left + cBox2.Width + 5; cBox2.DropDownStyle = cBox1.DropDownStyle; this.CurrentInputObject2 = cBox2; foreach (String cboItem in cBox1.Items) { cBox2.Items.Add(cboItem); } cBox2.SelectedIndex = cBox1.SelectedIndex; this.pnlCriteriaInput.Controls.Add(cBox2); cBox2.Show(); } } else { /* not between */ if (this.CurrentInputObject2 != null) { /* this implies that the inputcriteria was setup for between/range, but now does not need to be */ this.pnlCriteriaInput.Controls.Clear(); // now call the initial combobox selector setup this.CurrentInputObject2 = null; this.cboCriteriaID_SelectedIndexChanged(this, new EventArgs()); } } }
private void cboCriteriaID_SelectedIndexChanged(object sender, EventArgs e) { this.lblID.Text = cboCriteriaID.Text; CriteriaRequester cReq = (CriteriaRequester)this.CriteriaList[this.cboCriteriaID.Text]; this.pnlCriteriaInput.Controls.Clear(); if (cReq.CritType == CriteriaRequester.CriteriaType.Text) { TextBox txtSearchCriteriaInput = new TextBox(); this.pnlCriteriaInput.Controls.Add(txtSearchCriteriaInput); txtSearchCriteriaInput.Width = this.pnlCriteriaInput.Width - 10; txtSearchCriteriaInput.Show(); this.CurrentInputObject = txtSearchCriteriaInput; } else if (cReq.CritType == CriteriaRequester.CriteriaType.DropDown) { ComboBox cBox = new ComboBox(); this.pnlCriteriaInput.Controls.Add(cBox); cBox.Width = this.pnlCriteriaInput.Width - 10; cBox.DropDownStyle = ComboBoxStyle.DropDownList; foreach (String ID in cReq.DropDownContent) { cBox.Items.Add(ID); } cBox.Show(); this.CurrentInputObject = cBox; } this.cboLogic_SelectedIndexChanged(this, new EventArgs()); }
protected override void OnDoubleClick(EventArgs e) { base.OnDoubleClick(e); if (currentListItem == null) { return; } // Check the subitem clicked . try { int nStart = lastX; int spos = 0; int epos = Columns[0].Width; for (int i = 0; i < this.Columns.Count; i++) { if (nStart > spos && nStart < epos) { subItemSelected = i; break; } spos = epos; epos += this.Columns[i + 1].Width; } //Console.WriteLine("SUB ITEM SELECTED = " + currentListItem.SubItems[subItemSelected].Text); subItemText = currentListItem.SubItems[subItemSelected].Text; //this causes a problem if the value is empty string colName = this.Columns[subItemSelected].Text; RaiseBeforeTaskChanged(GetTask(currentListItem.Index)); //TODO: can this be generalized or made available in design mode? if (colName == "Status") { Rectangle r = new Rectangle(spos, currentListItem.Bounds.Y, epos, currentListItem.Bounds.Bottom); cmbBox.Size = new System.Drawing.Size(epos - spos, currentListItem.Bounds.Bottom - currentListItem.Bounds.Top); cmbBox.Location = new System.Drawing.Point(spos + 2, currentListItem.Bounds.Y + 1); cmbBox.Visible = true; cmbBox.Show(); cmbBox.Text = subItemText; cmbBox.SelectAll(); cmbBox.Focus(); } else { Rectangle r = new Rectangle(spos, currentListItem.Bounds.Y, epos, currentListItem.Bounds.Bottom); editBox.Size = new System.Drawing.Size(epos - spos, currentListItem.Bounds.Bottom - currentListItem.Bounds.Top); editBox.Location = new System.Drawing.Point(spos + 2, currentListItem.Bounds.Y + 1); editBox.Visible = true; editBox.Show(); editBox.Text = subItemText; editBox.SelectAll(); editBox.Focus(); } currentListItem.Checked = !currentListItem.Checked; //seems double-clicking switches the check state } catch (Exception exc) { } }
private void dmUpDowStringCount_SelectedItemChanged(object sender, EventArgs e) { SavePrevTuning(); ClearOldComboBoxes(); int stringCount = 0; int yLocationIncrement = 30; System.Drawing.Size comboBoxSize = new System.Drawing.Size(121, 24); System.Drawing.Point startLocation = new System.Drawing.Point(29, 69); string stringCountStr = dmUpDowStringCount.SelectedItem as string; if (Int32.TryParse(stringCountStr, out stringCount)) { for (int i = 0; i < stringCount; ++i) { ComboBox temBox = new ComboBox(); temBox.FormattingEnabled = true; temBox.Location = startLocation; temBox.Name = "String_" + i; temBox.Size = comboBoxSize; temBox.TabIndex = i + 1; foreach(string note in G_Rules.Notes) { temBox.Items.Add(note); } temBox.SelectedIndex = 1; Controls.Add(temBox); temBox.Show(); _Strings.Add(temBox); startLocation.Y += yLocationIncrement; } FillInStrings(); SetPrevTuning(); } }
public MainWindow() { this.Size = new System.Drawing.Size(500, 380); this.Text = "Untitled Application"; Application.EnableVisualStyles(); selectFolderBtn = new Button(); selectFolderBtn.Text = "Add folder with images..."; selectFolderBtn.Click += HandleSelectFolderBtnClick; selectFolderBtn.Location = new System.Drawing.Point(5, 210); selectFolderBtn.Size = new System.Drawing.Size(200, 30); selectFolderBtn.Show(); this.Controls.Add(selectFolderBtn); selectImageBtn = new Button(); selectImageBtn.Text = "Add single images..."; selectImageBtn.Click += HandleSelectImageBtnClick; selectImageBtn.Location = new System.Drawing.Point(5, 245); selectImageBtn.Size = new System.Drawing.Size(200, 30); selectImageBtn.Show(); this.Controls.Add(selectImageBtn); deleteSelectedBtn = new Button(); deleteSelectedBtn.Text = "Remove selected image from list"; deleteSelectedBtn.Click += HandleDeleteSelectedBtnClick; deleteSelectedBtn.Location = new System.Drawing.Point(5, 280); deleteSelectedBtn.Size = new System.Drawing.Size(200, 30); deleteSelectedBtn.Show(); this.Controls.Add(deleteSelectedBtn); clearListBtn = new Button(); clearListBtn.Text = "Clear list"; clearListBtn.Click += HandleClearListBtnClick; clearListBtn.Location = new System.Drawing.Point(5, 315); clearListBtn.Size = new System.Drawing.Size(200, 30); clearListBtn.Show(); this.Controls.Add(clearListBtn); fileSelectList = new CheckedListBox(); fileSelectList.Location = new System.Drawing.Point(5, 5); fileSelectList.Size = new System.Drawing.Size(200, 200); fileSelectList.Show(); this.Controls.Add(fileSelectList); startPresentationBtn = new Button(); startPresentationBtn.Text = "Start Presentation"; startPresentationBtn.Location = new System.Drawing.Point(250, 210); startPresentationBtn.Size = new System.Drawing.Size(200, 30); startPresentationBtn.Click += HandleStartPresentationBtnClick; startPresentationBtn.Show(); this.Controls.Add(startPresentationBtn); Label numOfSecondsLbl = new Label(); numOfSecondsLbl.Text = "Delay in seconds:"; numOfSecondsLbl.Location = new System.Drawing.Point(250, 45); numOfSecondsLbl.Size = new System.Drawing.Size(100, 30); numOfSecondsLbl.Show(); this.Controls.Add(numOfSecondsLbl); Label numOfTilesLbl = new Label(); numOfTilesLbl.Text = "Number of tiles:"; numOfTilesLbl.Location = new System.Drawing.Point(250, 85); numOfTilesLbl.Size = new System.Drawing.Size(100, 30); numOfTilesLbl.Show(); this.Controls.Add(numOfTilesLbl); numOfTilesBox = new ComboBox(); numOfTilesBox.DropDownStyle = ComboBoxStyle.DropDownList; for (int i = 1; i < 21; i++) { numOfTilesBox.Items.Add(i*i); } numOfTilesBox.SelectedItem = 16; numOfTilesBox.Location = new System.Drawing.Point(380, 85); numOfTilesBox.Size = new System.Drawing.Size(100, 30); numOfTilesBox.Show(); this.Controls.Add(numOfTilesBox); secondsBox = new NumericUpDown(); secondsBox.Maximum = 60; secondsBox.Minimum = 1; secondsBox.Value = 5; secondsBox.Location = new System.Drawing.Point(380, 45); secondsBox.Size = new System.Drawing.Size(100, 30); secondsBox.Show(); this.Controls.Add(secondsBox); }