Esempio n. 1
0
        /// <summary>
        /// 汇总
        /// </summary>
        /// <param name="k">斜率</param>
        /// <returns></returns>
        public ccwx_tpjing_model calculate(double k)
        {
            if (tpjing == null)
            {
                return(null);
            }
            try
            {
                ccwx_tpjing_model model = new ccwx_tpjing_model();
                double            kh    = calculate_kh(k);
                model.jh             = tpjing.jh;
                model.kh             = kh;
                model.k1             = kh / (tpjing.yxhd - tpjing.zzhd) * (tpjing.zrfs - tpjing.zzrfs) / 100;
                model.k2             = kh / tpjing.zzhd * tpjing.zzrfs / 100;
                model.r1             = 0;
                model.r2             = 0;
                model.calculate_type = 1;

                return(model);
            }
            catch (Exception e)
            {
                throw e;
            }
            //return null;
        }
Esempio n. 2
0
        /// <summary>
        /// 求k1 k2 r1 r2 kxd
        /// </summary>
        /// <param name="tpjing"></param>
        /// <param name="function_type">拟合函数类型</param>
        /// <param name="value_a">参数</param>
        /// <param name="value_b">参数</param>
        /// <param name="value_c">常数</param>
        public void set_tpjing_info(ccwx_tpjing_model tpjing, string function_type, double value_a, double value_b, double value_c)
        {
            Func <double, double, double, double> funcDelegate;

            if (function_type.Equals("ZS_Func"))
            {
                funcDelegate = new Func <double, double, double, double>(FunctionType.ExponentialFunction);
            }
            else
            {
                funcDelegate = new Func <double, double, double, double>(FunctionType.PowerFunction);
            }

            if (tpjing == null)
            {
                return;
            }
            foreach (ccwx_tpjing_model item in oc_tpjing_info)
            {
                if (item.jh == tpjing.jh)
                {
                    item.k1             = tpjing.k1;
                    item.k2             = tpjing.k2;
                    item.zzdkxd         = funcDelegate(tpjing.k2, value_a, value_b) - value_c;
                    item.fddkxd         = funcDelegate(tpjing.k1, value_a, value_b) - value_c;
                    item.r1             = Math.Sqrt(item.k1 * 8 / (item.fddkxd / 100));
                    item.r2             = Math.Sqrt(item.k2 * 8 / (item.zzdkxd / 100));
                    item.ybhd           = tpjing.ybhd;
                    item.calculate_type = tpjing.calculate_type;
                }
            }
        }
Esempio n. 3
0
        public ccwx_lhf_bll(ccwx_tpjing_model tpjing)
        {
            this.tpjing = tpjing;
            oc_yajiang  = new ObservableCollection <ccwx_yajiang_model>();
            qkcs qkcs = readParam();

            u = qkcs == null ? 10 : qkcs.Qtgn;
        }
Esempio n. 4
0
 public CCWX_LHF(ccwx_tpjing_model tpjing)
 {
     InitializeComponent();
     if (tpjing == null)
     {
         return;
     }
     gb_left.Header  = string.Format("{0} 井 压降数据表", tpjing.jh);
     gb_right.Header = string.Format("{0} 井 压降曲线图", tpjing.jh);
     bll             = new ccwx_lhf_bll(tpjing); // 实例化 bll,并加载被选中的调剖井
     DataContext     = bll;
 }
Esempio n. 5
0
 public CCWX_CKF(ccwx_tpjing_model tpjing)
 {
     InitializeComponent();
     if (tpjing == null)
     {
         return;
     }
     gb_left.Header  = string.Format("{0} 井 小层数据", tpjing.jh);
     gb_right.Header = string.Format("{0} 井 沉积柱状图", tpjing.jh);
     bll             = new ccwx_ckf_bll(tpjing); // 实例化 bll,并加载被选中的调剖井
     create_chart();
     DataContext = bll;
 }
Esempio n. 6
0
 public ccwx_gsf_bll(ccwx_tpjing_model tpjing)
 {
     if (tpjing == null)
     {
         return;
     }
     this.tpjing = tpjing;
     oc_xcsj     = new ObservableCollection <ccwx_xcsj_model>();
     oc_csrq     = new ObservableCollection <DB_XSPM_MONTH>();
     oc_xspm     = new ObservableCollection <DB_XSPM_MONTH>();
     init_oc_xcsj();
     init_oc_csrq();
     init_oc_xspm();
 }
Esempio n. 7
0
        /// <summary>
        /// 汇总计算
        /// </summary>
        /// <returns></returns>
        public ccwx_tpjing_model calculate()
        {
            ccwx_tpjing_model ccwx_Tpjing_Model;

            try
            {
                //斜率<0
                ccwx_Tpjing_Model = bll.calculate(Math.Abs(k));
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                ccwx_Tpjing_Model = new ccwx_tpjing_model();
            }
            // 汇总计算
            return(ccwx_Tpjing_Model);
        }
Esempio n. 8
0
        }                              // bll

        public CCWX_GSF(ccwx_tpjing_model tpjing)
        {
            InitializeComponent();

            if (tpjing == null)
            {
                tb_left_jh.Text    = "**";
                tb_right_jh.Text   = "**";
                tb_right_csrq.Text = "**";
                return;
            }

            tb_left_jh.Text    = tpjing.jh;
            tb_right_jh.Text   = tpjing.jh;
            tb_right_csrq.Text = tpjing.csrq == string.Empty ? "**" : tpjing.csrq;
            bll = new ccwx_gsf_bll(tpjing); // 实例化 bll,并加载被选中的调剖井
            create_chart();
            DataContext = bll;
        }
Esempio n. 9
0
 public ccwx_ckf_bll(ccwx_tpjing_model tpjing)
 {
     this.tpjing = tpjing;
     oc_xcsj     = new ObservableCollection <ccwx_xcsj_model>();
     loading_oc_xcsj();  // 加载小层数据
 }