예제 #1
0
        private void frmAnalysiseCurve_Load(object sender, EventArgs e)
        {
            //m_SR = GetSR((ushort)_fmMain.m_SensorArray[_fmMain.m_LSensorArray[0].SensorIndex].scale);

            _ResultPanel = this.zedGraphControl.GraphPane;
            initResultCurve(this.zedGraphControl);
            this.zedGraphControl.Invalidated += new InvalidateEventHandler(zedGraphControl_Invalidated);
            this.cmbYr.SelectedIndex          = int.Parse(RWconfig.GetAppSettings("ShowY"));
            this.cmbXr.SelectedIndex          = int.Parse(RWconfig.GetAppSettings("ShowX"));
            this.zedGraphControl.RestoreScale(this.zedGraphControl.GraphPane);

            m_zedGraphSyb              = new Symbol();
            m_zedGraphSyb.IsAntiAlias  = true;
            m_zedGraphSyb.Type         = SymbolType.Circle;
            m_zedGraphSyb.Size         = 4;
            m_zedGraphSyb.Border.Width = 2;
            m_zedGraphSyb.Fill.Color   = Color.DarkRed;
            m_zedGraphSyb.IsVisible    = true;

            if (this._List_Data == null)
            {
                MessageBox.Show(this, "曲线数据不存在!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                this.Close();
                this.Dispose();
            }

            //将计算后的值呈现在Label上
            m_t = new HR_Test.BLL.GBT3354_Samples();
            m_m = m_t.GetModel(_TestSampleNo);
            if (m_m != null)
            {
                m_S0  = (double)m_m.S0;
                m_Ll  = (double)m_m.lL;
                m_Lt  = (double)m_m.lT;
                m_Ez1 = (double)m_m.εz1;
                m_Ez2 = (double)m_m.εz1;
            }
        }
예제 #2
0
        private void cmbXr_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.zedGraphControl.GraphPane.GraphObjList.Clear();
            initResultCurve(this.zedGraphControl);
            //switch (this._TestType)
            //{
            //case "tensile":
            InitCurve(this.zedGraphControl, this.tslblSampleNo.Text, "GBT3354-2014", _lineColor);
            //break;
            //    case "compress":
            //        InitCurve(this.zedGraphControl, this.tslblSampleNo.Text, "Compress", _lineColor);
            //        break;
            //    case "bend":
            //        InitCurve(this.zedGraphControl, this.tslblSampleNo.Text, "Bend", _lineColor);
            //        break;
            //}
            switch (cmbXr.SelectedIndex)
            {
            case 0:
                _ResultPanel.XAxis.Title.Text = "X1";
                break;

            case 1:
                _ResultPanel.XAxis.Title.Text = "时间,s";
                //_ResultPanel.XAxis.Scale.MaxAuto = false;
                //_ResultPanel.XAxis.Scale.Max = (int)(_List_Data[_List_Data.Count - 1].Ts / 10) * 10 + 10;
                break;

            case 2:
                _ResultPanel.XAxis.Title.Text     = "位移,mm";
                _ResultPanel.XAxis.Scale.LabelGap = 0;
                break;

            case 3:
                _ResultPanel.XAxis.Title.Text = "应变,%";
                //_ResultPanel.XAxis.Scale.MaxAuto = false;
                //_ResultPanel.XAxis.Scale.Max = (int)(_List_Data[_List_Data.Count - 1].YB1) +1;
                break;

            case 4:
                _ResultPanel.XAxis.Title.Text = "变形,mm";
                break;

            case 5:
                _ResultPanel.XAxis.Title.Text = "应力,MPa";

                break;

            default:
                _ResultPanel.XAxis.Title.Text = "X1";
                break;
            }
            switch (cmbYr.SelectedIndex)
            {
            case 0:
                this._ResultPanel.YAxis.Title.Text = "Y1";
                _ResultPanel.YAxis.Scale.LabelGap  = 0;
                break;

            case 1:
                _ResultPanel.YAxis.Title.Text     = "负荷,N";
                _ResultPanel.YAxis.Scale.LabelGap = 0;
                break;

            case 2:
                _ResultPanel.YAxis.Title.Text     = "应力,MPa";
                _ResultPanel.YAxis.Scale.LabelGap = 0;
                break;

            case 3:
                _ResultPanel.YAxis.Title.Text     = "变形,mm";
                _ResultPanel.YAxis.Scale.LabelGap = 0;
                break;

            case 4:
                _ResultPanel.YAxis.Title.Text     = "位移,mm";
                _ResultPanel.YAxis.Scale.LabelGap = 0;
                break;
            }
            RWconfig.SetAppSettings("ShowX", this.cmbXr.SelectedIndex.ToString());

            RestoreZScale();
            //RestoreZScale();
        }