private void _ConfigureSettingsFormForANN(BaseSettingsForm oSettingsForm) { oSettingsForm.MainTableLayout.RowStyles.Add(new RowStyle(SizeType.AutoSize)); oSettingsForm.MainTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); oSettingsForm.MainTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); { oSettingsForm.MainTableLayout.Controls.Add(UIExtensions.LabelWithTextAndName(strings.hiddenCountsLabelText, "hiddenCountsLabel"), 0, oSettingsForm.MainTableLayout.GetRowHeights().Length); } { TextBox hiddenCountsTextBox = new TextBox(); hiddenCountsTextBox.Name = "hiddenCountsTextBox"; hiddenCountsTextBox.Text = string.Join(" ", ANNmodelBuilder.kDefaultNeuronsCount.Take(ANNmodelBuilder.kDefaultNeuronsCount.Count() - 1)); hiddenCountsTextBox.Validating += new System.ComponentModel.CancelEventHandler(_settingsFormHiddenCountsTextBox_Validating); hiddenCountsTextBox.Validated += new EventHandler(_settingsFormHiddenCountsTextBox_Validated); oSettingsForm.MainTableLayout.Controls.Add(hiddenCountsTextBox, 1, oSettingsForm.MainTableLayout.GetRowHeights().Length - 1); } { oSettingsForm.MainTableLayout.Controls.Add(UIExtensions.LabelWithTextAndName(strings.activationFuncLabelText, "activationFuncLabel"), 0, oSettingsForm.MainTableLayout.GetRowHeights().Length); } { ComboBox activationFuncComboBox = new ComboBox(); activationFuncComboBox.Items.AddRange(ANNmodelBuilder.ActivationFunctionsDict.Keys.ToArray()); activationFuncComboBox.Text = ANNmodelBuilder.kDefaultActivationFunction; activationFuncComboBox.AdjustWidth(); activationFuncComboBox.AutoCompleteSource = AutoCompleteSource.ListItems; activationFuncComboBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; activationFuncComboBox.SelectedIndexChanged += new EventHandler(_settingsFormActivationFuncComboBox_SelectedIndexChanged); activationFuncComboBox.Name = "activationFuncComboBox"; oSettingsForm.MainTableLayout.Controls.Add(activationFuncComboBox, 1, oSettingsForm.MainTableLayout.GetRowHeights().Length - 1); } oSettingsForm.SecondaryTableLayout.RowStyles.Add(new RowStyle(SizeType.AutoSize)); oSettingsForm.SecondaryTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); oSettingsForm.SecondaryTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); { oSettingsForm.SecondaryTableLayout.Controls.Add(UIExtensions.LabelWithTextAndName(strings.maxIterationsCountLabelText, "maxIterationsCountLabel"), 0, oSettingsForm.SecondaryTableLayout.GetRowHeights().Length); } { TextBox maxIterationsCountTextBox = new TextBox(); maxIterationsCountTextBox.Name = "hiddenCountsTextBox"; maxIterationsCountTextBox.Text = ANNmodelBuilder.kMaxInterationsNum.ToString(); maxIterationsCountTextBox.Validating += new System.ComponentModel.CancelEventHandler(UIExtensions.uintTextBox_Validating); maxIterationsCountTextBox.Validated += new EventHandler(_settingsFormHiddenCountsTextBox_Validated); oSettingsForm.SecondaryTableLayout.Controls.Add(maxIterationsCountTextBox, 1, oSettingsForm.SecondaryTableLayout.GetRowHeights().Length - 1); } { oSettingsForm.SecondaryTableLayout.Controls.Add(UIExtensions.LabelWithTextAndName(strings.stopErrorLabelText, "stopErrorLabel"), 0, oSettingsForm.SecondaryTableLayout.GetRowHeights().Length); } { TextBox stopErrorTextBox = new TextBox(); stopErrorTextBox.Name = "stopErrorTextBox"; stopErrorTextBox.Text = ANNmodelBuilder.kStopError.ToString(); stopErrorTextBox.Validating += new System.ComponentModel.CancelEventHandler(UIExtensions.doubleTextBox_Validating); stopErrorTextBox.Validated += new EventHandler(_settingsFormStopErrorTextBox_Validated); oSettingsForm.SecondaryTableLayout.Controls.Add(stopErrorTextBox, 1, oSettingsForm.SecondaryTableLayout.GetRowHeights().Length - 1); } oSettingsForm.MainTabControl.Size = new Size(Math.Max(oSettingsForm.MainTableLayout.Size.Width, oSettingsForm.SecondaryTableLayout.Size.Width) + 10, Math.Max(oSettingsForm.MainTableLayout.Size.Height, oSettingsForm.SecondaryTableLayout.Size.Height) + 50); //TODO: VERY MESSY! CONSIDER CREATING CUSTOM CONTROLS, THAT FIT THE NEEDS!! }
private void _ConfigureSettingsFormForGMDHANN(BaseSettingsForm oSettingsForm) { throw new NotImplementedException(); }