/// <summary> /// Check that data is valid. /// </summary> public override void CheckData() { base.CheckData(); HostLabel = HostLabel.CheckSqlInjection(); Information = Information.CheckSqlInjection(); Label = Label.CheckSqlInjection(); Name = Name.CheckSqlInjection(); }
public void Hide() { HostLabel.Hide(); PortLabel.Hide(); HostTextBox.Hide(); PortTextBox.Hide(); StartStopWaitingConnectionBtn.Hide(); ReturnToMenuBtn2.Hide(); }
/// <summary> /// Create a WebFactor instance. /// </summary> /// <param name='dataReader'>An open data reader.</param> public WebFactor(DataReader dataReader) { Id = dataReader.GetInt32(FactorData.ID); Name = dataReader.GetString(FactorData.NAME); Label = dataReader.GetString(FactorData.LABEL); Information = dataReader.GetString(FactorData.INFORMATION); SortOrder = dataReader.GetInt32(FactorData.SORT_ORDER, -1); HostLabel = dataReader.GetString(FactorData.HOST_LABEL); IsTaxonomic = HostLabel.IsNotNull(); DefaultHostParentTaxonId = dataReader.GetInt32(FactorData.DEFAULT_HOST_PARENT_TAXON_ID, 0); FactorUpdateModeId = dataReader.GetInt32(FactorData.FACTOR_UPDATE_MODE_ID, -1); FactorDataTypeId = dataReader.GetInt32(FactorData.FACTOR_DATA_TYPE_ID, -1); FactorOriginId = dataReader.GetInt32(FactorData.FACTOR_ORIGIN_ID, -1); IsPublic = dataReader.GetBoolean(FactorData.IS_PUBLIC, false); IsPeriodic = dataReader.GetBoolean(FactorData.IS_PERIODIC, false); IsLeaf = dataReader.GetBoolean(FactorData.IS_LEAF, false); base.LoadData(dataReader); }
public void Show(bool isServerSide) { HostLabel.Show(); PortLabel.Show(); HostTextBox.Show(); PortTextBox.Show(); StartStopWaitingConnectionBtn.Show(); ReturnToMenuBtn2.Show(); StartStopWaitingConnectionBtn.Text = "Waiting for connection"; HostTextBox.ReadOnly = isServerSide; if (isServerSide) { HostTextBox.Text = "127.0.0.1"; PortTextBox.Text = "20"; } else { HostTextBox.Text = "localhost"; PortTextBox.Text = "20"; } }