Example #1
0
        private void btn_His_Click(object sender, EventArgs e)
        {
            #region 输入与输出路径条件判断
            if (this.TextBox_ObserPath.Text.Equals(""))
            {
                MessageBox.Show("请选择输入地面观测数据文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            #endregion
            //地面观测数据文件
            string sFilename_Obser = this.TextBox_ObserPath.Text.Trim();
            ObserFilename = sFilename_Obser;
            #region
            //IDLSav的路径
            string sIDLSavPath = FileManage.getApplicatonPath();
            sIDLSavPath = sIDLSavPath + "IDLSav\\Histogram.pro";

            HistogramShow vHistogramShow = new HistogramShow(this);
            vHistogramShow.ShowDialog();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
            #endregion
        }
Example #2
0
        private void btn_His_Click(object sender, EventArgs e)
        {
            #region 输入与输出路径条件判断
            if (this.TextBox_ObserPath.Text.Equals(""))
            {
                MessageBox.Show("请选择输入地面观测数据文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            #endregion
            //地面观测数据文件
            string sFilename_Obser = this.TextBox_ObserPath.Text.Trim();
            ObserFilename = sFilename_Obser;
            #region
            //IDLSav的路径
            string sIDLSavPath = FileManage.getApplicatonPath();
            sIDLSavPath = sIDLSavPath + "IDLSav\\Histogram.pro";
            COM_IDL_connectLib.COM_IDL_connectClass oCom = new COM_IDL_connectLib.COM_IDL_connectClass();
            //try
            //{
            //初始化
            oCom.CreateObject(0, 0, 0);
            //参数设置

            oCom.SetIDLVariable("ObserFilename", sFilename_Obser);

            //编译idl功能源码
            oCom.ExecuteString(".compile -v '" + sIDLSavPath + "'");
            oCom.ExecuteString("Histogram,ObserFilename,Message=Message");
            object objArr = oCom.GetIDLVariable("Message");
            ////返回错误消息
            //if (objArr != null)
            //{
            //    MessageBox.Show(objArr.ToString());
            //    oCom.DestroyObject();
            //    return;
            //}
            //oCom.DestroyObject();
            oCom.DestroyObject();
            HistogramShow vHistogramShow = new HistogramShow(this);
            vHistogramShow.ShowDialog();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
            #endregion
        }
Example #3
0
        private void btn_His_Click(object sender, EventArgs e)
        {
            #region 输入与输出路径条件判断
            if (this.TextBox_ObserPath.Text.Equals(""))
            {
                MessageBox.Show("请选择输入地面观测数据文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            #endregion
            //地面观测数据文件
            string sFilename_Obser = this.TextBox_ObserPath.Text.Trim();
            ObserFilename = sFilename_Obser;
            #region
            //IDLSav的路径
            string sIDLSavPath = FileManage.getApplicatonPath();
            sIDLSavPath = sIDLSavPath + "IDLSav\\Histogram.pro";

            HistogramShow vHistogramShow = new HistogramShow(this);
            vHistogramShow.ShowDialog();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
            #endregion
        }
Example #4
0
        private void btn_His_Click(object sender, EventArgs e)
        {
            #region 输入与输出路径条件判断
            if (this.TextBox_ObserPath.Text.Equals(""))
            {
                MessageBox.Show("请选择输入地面观测数据文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            #endregion
            //地面观测数据文件
            string sFilename_Obser = this.TextBox_ObserPath.Text.Trim();
            ObserFilename = sFilename_Obser;
            #region
            //IDLSav的路径
            string sIDLSavPath = FileManage.getApplicatonPath();
            sIDLSavPath = sIDLSavPath + "IDLSav\\Histogram.pro";
            COM_IDL_connectLib.COM_IDL_connectClass oCom = new COM_IDL_connectLib.COM_IDL_connectClass();
            //try
            //{
            //初始化
            oCom.CreateObject(0, 0, 0);
            //参数设置

            oCom.SetIDLVariable("ObserFilename", sFilename_Obser);

            //编译idl功能源码
            oCom.ExecuteString(".compile -v '" + sIDLSavPath + "'");
            oCom.ExecuteString("Histogram,ObserFilename,Message=Message");
            object objArr = oCom.GetIDLVariable("Message");
            ////返回错误消息
            //if (objArr != null)
            //{
            //    MessageBox.Show(objArr.ToString());
            //    oCom.DestroyObject();
            //    return;
            //}
            //oCom.DestroyObject();
            oCom.DestroyObject();
            HistogramShow vHistogramShow = new HistogramShow(this);
            vHistogramShow.ShowDialog();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
            #endregion
        }