Ejemplo n.º 1
0
        private void ListenAttachWindow(object state)
        {
            AttachWindow_3C attachWindow = FillDialog_3C.GetFillDialog(CCCWindowType.AttachWindow, this.Main, this.Main.ProcessId) as AttachWindow_3C;

            if (attachWindow != null)
            {
                attachWindow.DoFillWork(state);
            }
        }
Ejemplo n.º 2
0
        private void FillWorker(object state)
        {
            FillDialog_3C.BeginListen();
            string        windowType = null;
            FillDialog_3C fill       = FillDialog_3C.GetFillDialog(out windowType);

            try
            {
                _fillParameters = this.ReadFillParameter(@"..\..\..\演示数据\CCC\CCC填报规则.xlsx");
                TreeValue root = this.ReadData(DataFile);
                FillDialog_3C.BeginListen();
                windowType = null;
                fill       = FillDialog_3C.GetFillDialog(out windowType);
                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(this.DataFile);
                //this.SetWindowPos();
                main.FillParameters = this._fillParameters;
                this.GetTreeView();
                main.TreeValue = root;
                while (main.SelectNextNode(true))
                {
                    main.FillPage();
                }
            }
            catch
            {
                this.EndFill();
            }
        }
Ejemplo n.º 3
0
 public void EndFill()
 {
     try
     {
         NativeApi.SetWindowPos(main.HWnd, new IntPtr(1), 0, 0, 0, 0, 0x3);
         main.Dispose();
         _fillThread.Abort();
     }
     catch
     {
     }
     finally
     {
         _fillThread = null;
         main        = null;
         _data.Clear();
         container = IntPtr.Zero;
         FillDialog_3C.EndListen();
     }
 }
Ejemplo n.º 4
0
        private void GetTreeView()
        {
            treeView = main.TreeView;
            FillDialog_3C dialog = null;

            dialog = FillDialog_3C.GetFillDialog(CCCWindowType.PropertyWindow, main.HWnd);
            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.HWnd);
            dialog.DoFillWork(new FillValue3C()
            {
                Value = Guid.NewGuid().ToString()
            });
            uint count = 0;

            while (count == 0)
            {
                count = treeView.GetCount();
                System.Threading.Thread.Sleep(500);
            }
        }