Exemplo n.º 1
0
        public Form4()
        {
            InitializeComponent();
            lnwd_textBox.Text        = "40";
            zfwd_textBox.Text        = "5";
            ytgld_textBox.Text       = "5";
            xqgrd_textBox.Text       = "5";
            zlj_comboBox.DataSource  = coolItems;
            gjdy_comboBox.DataSource = ysdianyuanItems;
            nrjb_comboBox.DataSource = nrjibiItems;
            cool   = zlj_comboBox.Text;
            nrjibi = nrjb_comboBox.Text;
            string str = System.IO.Directory.GetCurrentDirectory();
            String dir = str + "/Lisen.mdb";

            mdbHelp = new readMDB(dir);
            try
            {
                mdbHelp.Open();     // 打開數據庫
                System.Diagnostics.Debug.WriteLine(str);



                // mdbHelp.Close();    // 關閉數據庫
            }
            finally
            {
                // mdbHelp = null;
            }
        }
Exemplo n.º 2
0
        public Form2()
        {
            var compressorList = new List <String>();

            InitializeComponent();
            set_chart(20, -20, 75, 10);
            ysrongtiao_TB.Text    = Convert.ToString(n);
            pqwendu_TB.Text       = Convert.ToString(pqwdqiwang);
            zfwendu_textBox1.Text = Convert.ToString(5);
            lnwendu_textBox1.Text = Convert.ToString(40);
            xqguore_TB.Text       = Convert.ToString(5);
            ytguoleng_TB.Text     = Convert.ToString(5);
            string str = System.IO.Directory.GetCurrentDirectory();
            String dir = str + "/Lisen.mdb";

            mdbHelp = new readMDB(dir);
            try
            {
                mdbHelp.Open();     // 打開數據庫
                System.Diagnostics.Debug.WriteLine(str);
                var ds = mdbHelp.GetDataSet("select  * from 压缩机基础数据");

                System.Diagnostics.Debug.WriteLine(ds.Tables[0].Rows[0]["压缩机型号"]);
                int row = ds.Tables[0].Rows.Count;
                for (int i = 0; i < row; i++)
                {
                    compressorList.Add((String)ds.Tables[0].Rows[i][1]);
                }

                // mdbHelp.Close();    // 關閉數據庫
            }
            finally
            {
                // mdbHelp = null;
            }

            cool_comboBox.DataSource        = coolItems;
            compressor_comboBox.DataSource  = compressorList;
            power_comboBox.DataSource       = ysdianyuanItems;
            nrjibi_comboBox.DataSource      = nrjibiItems;
            lqfangshi_combox.DataSource     = lqfangshiItems;
            this.chart1.Series[0].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
            this.chart1.Series[0].Name      = "Series1";
            this.chart1.Series[1].Points.AddXY(0, 0);
            this.chart1.Series[0].BorderWidth = 3;
            chartArea2.AxisX.Interval         = 5D;
            chartArea2.AxisX.Maximum          = 20D;
            chartArea2.AxisX.Minimum          = -20D;
            chartArea2.AxisY.Interval         = 10D;
            chartArea2.AxisY.Maximum          = 75D;
            chartArea2.AxisY.Minimum          = 10D;
            //cal();
        }