Ejemplo n.º 1
0
        private void ConfirmInfoTip(object state)
        {
            uint processId;

            NativeApi.GetWindowThreadProcessId(base.HWnd, out processId);
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.InfoTipWindow, base.HWnd, processId);

            fill.DoFillWork(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 对指定节点进行追加。
        /// </summary>
        /// <param name="node">要对其进行追加的节点句柄。</param>
        /// <param name="name">追加的节点的后缀名称。</param>
        public void AppendNode(IntPtr node, string name)
        {
            this.ClickAppendMenu(node);
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.InputFileNameWindow, this, processId);

            fill.DoFillWork(new FillValue3C()
            {
                Value = name
            });
        }
Ejemplo n.º 3
0
        private void ListenMultiValueAndNoteWindow(object value)
        {
            _asyncHandle.Reset();
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.MultiValueAndNote, this, processId);

            fill.DoFillWork(value);
            if (_asyncHandle != null)
            {
                _asyncHandle.Resume();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 监听Select类型窗口。
        /// </summary>
        /// <param name="value"></param>
        private void ListenListBoxWindow(object value)
        {
            _asyncHandle.Reset();
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.ListCheckBoxWindow, this, processId);

            fill.DoFillWork(value);
            if (_asyncHandle != null)
            {
                _asyncHandle.Resume();
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 监听输入文件名窗口。
        /// </summary>
        /// <param name="value"></param>
        private void ListenInputFileNameWindow(object value)
        {
            _asyncHandle.Reset();
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.InputFileNameWindow, this, processId);

            fill.DoFillWork(_pageData["文件名"]);
            if (_asyncHandle != null)
            {
                _asyncHandle.Resume();
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 监听附件窗口
        /// </summary>
        /// <param name="value"></param>
        internal void ListenAttachWindow(object value)
        {
            _asyncHandle.Reset();
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.AttachWindow, this, processId);

            fill.DoFillWork(value);
            if (_asyncHandle != null)
            {
                _asyncHandle.Resume();
            }
        }
Ejemplo n.º 7
0
        private void StartFillSelectFirm(object state)
        {
            FillValue3C value = state as FillValue3C;

            if (value != null)
            {
                uint processId;
                NativeApi.GetWindowThreadProcessId(base.HWnd, out processId);
                FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.FirmWindow, processId);
                fill.DoFillWork(value.Value);
            }
        }
Ejemplo n.º 8
0
        private void FillOpenFileDialog(object fileName)
        {
            uint processId;

            NativeApi.GetWindowThreadProcessId(addButton, out processId);
            FillDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.OpenFileWindow, processId);

            if (fill != null)
            {
                fill.DoFillWork(fileName);
            }
        }
Ejemplo n.º 9
0
        private void GetTreeView()
        {
            treeView = main.TreeView;
            FillDialog_3C dialog = null;

            dialog = FillDialog_3C.GetFillDialog(CCCWindowType.PropertyWindow, main, this.processId);
            string category = _data["车辆类别"] == null ? "" : (_data["车辆类别"] as FillValue3C).Value;
            string property = _data["车辆属性"] == null ? "" : (_data["车辆属性"] as FillValue3C).Value;

            dialog.DoFillWork(new string[] { category, property });
            dialog = FillDialog_3C.GetFillDialog(CCCWindowType.InputFileNameWindow, main, this.processId);
            dialog.DoFillWork(new FillValue3C()
            {
                Value = Guid.NewGuid().ToString()
            });
            uint count = 0;

            while (count == 0)
            {
                count = treeView.GetCount();
                System.Threading.Thread.Sleep(500);
            }
        }
Ejemplo n.º 10
0
        private void FillWorker(object state)
        {
            string        windowType = null;
            FillDialog_3C fill       = FillDialog_3C.GetFillDialog(out windowType, processId);

            try
            {
                // 存储数据文件所在目录下的所有文件(不包括子文件夹中的文件)
                _fillParameters = this.ReadFillParameter(state as string);
                TreeValue root = ReadAndConvertData();
                windowType = null;
                FillDialog_3C.BeginListen();
                fill = FillDialog_3C.GetFillDialog(out windowType, processId);
                if (fill != null)
                {
                    if (windowType == CCCWindowType.LoginWindow)
                    {
                        fill.FillValue = _data["厂商关系"] as FillValue3C;
                        fill.DoFillWork(_data["登录证书"]);
                    }
                    else if (windowType == CCCWindowType.FirmWindow)
                    {
                        FillValue3C value = _data["厂商关系"] as FillValue3C;
                        fill.DoFillWork(value == null ? "" : value.Value);
                    }
                }

                main = Main_3C.GetMainWindow(base.DataProvider.DataSourceFile, processId);
                //this.SetWindowPos();
                //main.FileTable = this.files;
                main.FillParameters = this._fillParameters;
                main.Records        = this._records;
                if (main.TreeView.GetCount() == 0)
                {
                    this.GetTreeView();
                }
                else
                {
                    main.UpdateSelectedNode();
                }
                main.TreeValue = root;
                FillDialog_3C.BeginListenSaveRequire(main);
                do
                {
                    System.Threading.Thread.Sleep(200);
                    main.FillPage();
                } while (main.SelectNextNode(true));
                this.EndFill();
                OnFinished(EventArgs.Empty);
                WebFillManager.ShowMessageBox("填报完成!", "消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                if (main != null)
                {
                    LogHelper.Write(ex);
                    MessageBox.Show(ex.StackTrace + ex.Message);
                    this.EndFill();
                }
            }
        }