public CoefficientsForm(CoefficientTypeEnum type) { InitializeComponent(); this.coefficientType = type; ToolTip tip = new ToolTip(); tip.SetToolTip(buttonShiftUp, "shift all values up by .01"); tip.SetToolTip(buttonShiftDown, "shift all values down by .01"); switch (type) { case CoefficientTypeEnum.Lift: this.labelTitle.Text = "Lift Coefficient vs Alpha"; this.Text = "Lift Coefficient"; this.labelDescription.Text = "This graph represents the lift coefficient (Y-axis) in relation to the angle of attack or alpha (X-axis). The more efficient the wing, the higher this curve will be. " + "Usually the curve reaches a maximum between 20° and 30° (the 'stall angle') and then drops lower when the wing looses lift after a stall"; break; case CoefficientTypeEnum.Drag: this.labelTitle.Text = "Drag Coefficient vs Alpha"; this.Text = "Drag Coefficient"; this.labelDescription.Text = "This graph represents the drag coefficient (Y-axis) in relation to the angle of attack or alpha (X-axis). The more aerodynamic the aircraft and wing, the lower this curve will be. " + "Note that this curve descibes the drag of the entire aircraft, not just the wing."; break; case CoefficientTypeEnum.SideLift: this.labelTitle.Text = "Sideways Lift Coefficient vs Beta"; this.Text = "Sideways Lift Coefficient"; this.labelDescription.Text = "This graph represents the lift coefficient (Y-axis) in relation to the sideways angle of attack or beta (X-axis). The beta angle corresponds to the yaw angle. " + "The higher this curve, the more lift the airframe generates when flying on its side."; break; case CoefficientTypeEnum.SideDrag: this.labelTitle.Text = "Sideways Drag Coefficient vs Beta"; this.Text = "Sideways Drag Coefficient"; this.labelDescription.Text = "This graph represents the sideways drag coefficient (Y-axis) in relation to the sideways angle of attack or beta (X-axis). The beta angle corresponds to the yaw angle. " + "Ths higher this curve, the more drag the airframe generates when flying on its side."; break; case CoefficientTypeEnum.LiftFlaps: this.labelTitle.Text = "Lift Coefficient vs Alpha with flaps"; this.Text = "Lift Coefficient (flaps)"; this.labelDescription.Text = "This graph represents the lift coefficient (Y-axis) in relation to the angle of attack or alpha (X-axis) with flaps fully extendend. The more efficient the wing, the higher this curve will be."; break; case CoefficientTypeEnum.DragFlaps: this.labelTitle.Text = "Drag Coefficient vs Alpha with flaps"; this.Text = "Drag Coefficient (flaps)"; this.labelDescription.Text = "This graph represents the drag coefficient (Y-axis) in relation to the angle of attack or alpha (X-axis) with flaps fully extended. The more aerodynamic the aircraft and wing, the lower this curve will be."; break; } }
/// <summary> /// tdLiteralD /// </summary> /// <returns>ID of new row inserted to database.</returns> private int SetLiteralSetting(long minLength, long maxLength, CoefficientTypeEnum coefficientType, int equivalenceClassDBID, GaceTypeEnum gaceType, LiteralTypeEnum literalType, int oneParticularCategoryDBID, int booleanPartialCedentDBID, int attributeDBID) { string equivalenceClassColumn = "EquivalenceClassID,"; string equivalenceClassValue = "NULL,"; if (equivalenceClassDBID != 0) { equivalenceClassColumn = "EquivalenceClassID,"; equivalenceClassValue = equivalenceClassDBID.ToString() + ","; } string categoryDBID = (oneParticularCategoryDBID == 0) ? "NULL" : oneParticularCategoryDBID.ToString(); string tableName = "tdLiteralD"; string autoIncrementColumn = GetAutoIncrementColumnName(tableName); int autoIncrementValue = GetTableAutoIncrementValue(tableName, 1); string query = "INSERT INTO " + tableName + " (" + autoIncrementColumn + ",CedentDID,QuantityID,CategoryID,LiteralTypeID,GaceTypeID," + equivalenceClassColumn + "CoefficientTypeID,MinLen,MaxLen) VALUES " + "(" + autoIncrementValue + "," + booleanPartialCedentDBID + "," + attributeDBID + "," + categoryDBID + "," + constants.LiteralTypeEnumDictionary[literalType] + "," + constants.GaceTypeEnumDictionary[gaceType] + "," + equivalenceClassValue + +constants.CoefficientTypeEnumDictionary[coefficientType] + "," + minLength + "," + maxLength + ")"; ExecuteInsertQuery(query, tableName); return autoIncrementValue; }