Пример #1
0
        /// <summary>
        /// 单独打开一个文件
        /// </summary>
        private void OpenOneFile(string p_fileName)
        {
            //此处进行预打开对象操作
            _Files files = new _Files();

            //创建文件对象
            files.Init(p_fileName);
            if (files.Exists)
            {
                this.buttonEdit1.Text = files.FullName;
                //CResult result = APP.WorkFlows.Operaty.LoadOnlyObject(files);
                CResult result = CActionData.Load(files);
                if (result.Success)
                {
                    _COBJECTS obj = result.Value as _COBJECTS;
                    obj.Files = files;
                    m_ObjectList.Add(obj);
                    //初始化打开的文件对象
                    this.Init();
                }
                else
                {
                    //MessageBox.Show(result.ErrorInformation);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 打开已经有的项目对象(此处修改为线程操作)
        /// </summary>
        private void OpenObjects()
        {
            FileInfo info = new FileInfo(this.openFileDialog1.FileName);

            if (info != null)
            {
                if (info.Exists)
                {
                    //打开指定单位工程逻辑
                    CActionData.Load(info, this.m_Master as ApplicationForm);
                    this.DialogResult = DialogResult.Cancel;
                }
            }
        }
Пример #3
0
        /// <summary>
        /// 打开已经有的项目对象(此处修改为线程操作)
        /// </summary>
        private void OpenSelect2()
        {
            _HeaderInfo info = this.bindingSource2.Current as _HeaderInfo;

            if (info.HFileInfo != null)
            {
                if (info.HFileInfo.Exists)
                {
                    APP.FileType = "项目工程";
                    //打开指定单位工程逻辑
                    //CResult r = APP.WorkFlows.Operaty.Load(info);
                    this.DialogResult = DialogResult.Cancel;
                    CActionData.Load(info.HFileInfo, this.m_Master as ApplicationForm);
                }
            }
        }
Пример #4
0
        /// <summary>
        /// 电子标书
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Open_dzbs_Click(object sender, EventArgs e)
        {
            DialogResult r = this.openFileDialog1.ShowDialog();

            if (r == DialogResult.OK)
            {
                FileInfo info = new FileInfo(this.openFileDialog1.FileName);
                if (info != null)
                {
                    if (info.Exists)
                    {
                        //打开指定单位工程逻辑
                        this.DialogResult = DialogResult.Cancel;
                        CActionData.Load(info, this.m_Master as ApplicationForm);
                    }
                }
            }
        }
Пример #5
0
        /// <summary>
        /// 打开文件(通用处理函数)
        /// </summary>
        public void ShowOpenAction()
        {
            NewProjeByXml form = new NewProjeByXml();

            form.Master = this.MdiParent;
            DialogResult result = form.ShowDialog();

            //处理XML业务
            if (result == DialogResult.OK)
            {
                FileInfo info = new FileInfo(form.buttonEdit1.Text);
                CActionData.Load(info, this.MdiParent as ApplicationForm);
            }
            //处理普通Objects业务
            if (result == DialogResult.Yes)
            {   //
                this.OpenNewBussinessForm(form.CurrentBusiness);
            }
        }
Пример #6
0
        public static CResult Load(_Files p_Files)
        {
            FileInfo info = new FileInfo(p_Files.FullName);

            return(CActionData.Load(info));
        }