private void rbtnSwivelBearing_CheckedChanged(object sender, EventArgs e) { CleanResultTextboxes(); if (rbtnSwivelBearing.Checked) { framePropertiesOfSteppedColumn = framePropertiesOfSteppedColumn & ~FramePropertiesOfSteppedColumn.BearingOfRafter; // xxxx xx0x | см. описание unum FrameProperties } else { framePropertiesOfSteppedColumn = framePropertiesOfSteppedColumn | FramePropertiesOfSteppedColumn.BearingOfRafter; // xxxx xx1x | см. описание unum FrameProperties } DrawPictures(); }
// Обработка событий // обработка изменения состояния радиокнопок private void rbtnOneSpan_CheckedChanged(object sender, EventArgs e) { CleanResultTextboxes(); if (rbtnOneSpan.Checked) { framePropertiesOfSteppedColumn = framePropertiesOfSteppedColumn & ~FramePropertiesOfSteppedColumn.NumberOfSpans; // xxxx xxx0 | см. описание unum FrameProperties } else { framePropertiesOfSteppedColumn = framePropertiesOfSteppedColumn | FramePropertiesOfSteppedColumn.NumberOfSpans; // xxxx xxx1 | см. описание unum FrameProperties } DrawPictures(); }
public void SetLastControlState() { designOfEffectiveLenghtOfSteppedColumn.ReadEffectiveLength(); { framePropertiesOfSteppedColumn = designOfEffectiveLenghtOfSteppedColumn.framePropertiesSteppedColumn; if ((framePropertiesOfSteppedColumn & FramePropertiesOfSteppedColumn.NumberOfSpans) == 0) { rbtnOneSpan.Checked = true; } else { rbtnMultipleSpans.Checked = true; } if ((framePropertiesOfSteppedColumn & FramePropertiesOfSteppedColumn.BearingOfRafter) == 0) { rbtnSwivelBearing.Checked = true; } else { rbtnRigidBearing.Checked = true; } SetTextboxLastValue(tbForceTop, designOfEffectiveLenghtOfSteppedColumn.forceTop); SetTextboxLastValue(tbMomInertTop, designOfEffectiveLenghtOfSteppedColumn.momInertTop); SetTextboxLastValue(tbLengthTop, designOfEffectiveLenghtOfSteppedColumn.lengthTop); SetTextboxLastValue(tbForceBottom, designOfEffectiveLenghtOfSteppedColumn.forceBottom); SetTextboxLastValue(tbMomInertBottom, designOfEffectiveLenghtOfSteppedColumn.momInertBottom); SetTextboxLastValue(tbLengthBottom, designOfEffectiveLenghtOfSteppedColumn.lengthBottom); SetTextboxLastValue(tbMuTop, Math.Round(designOfEffectiveLenghtOfSteppedColumn.muTop, 3)); SetTextboxLastValue(tbEffectLengthTop, Math.Round(designOfEffectiveLenghtOfSteppedColumn.effectiveLenghtTop, 3)); SetTextboxLastValue(tbMuBottom, Math.Round(designOfEffectiveLenghtOfSteppedColumn.muBottom, 3)); SetTextboxLastValue(tbEffectLengthBottom, Math.Round(designOfEffectiveLenghtOfSteppedColumn.effectiveLenghtBottom, 3)); if (tbMuBottom.Text == String.Empty && tbEffectLengthBottom.Text == String.Empty) { actualResults = false; } else { actualResults = true; } } }
public void ReadEffectiveLength() // Ф-ция восстанавливающая состояние контролов и их значения { if (File.Exists(fileName)) { using (BinaryReader reader = new BinaryReader(File.Open(fileName, FileMode.Open))) { _framePropertiesSteppedColumn = (FramePropertiesOfSteppedColumn)reader.ReadByte(); _forceTop = reader.ReadDouble(); _momInertTop = reader.ReadDouble(); _lengthTop = reader.ReadDouble(); _forceBottom = reader.ReadDouble(); _momInertBottom = reader.ReadDouble(); _lengthBottom = reader.ReadDouble(); _muTop = reader.ReadDouble(); _muBottom = reader.ReadDouble(); _effectiveLenghtTop = reader.ReadDouble(); _effectiveLenghtBottom = reader.ReadDouble(); } } }