Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //main = Common.GetIntPtrByProcess("taskmgr");
            List <WindowInfo> windowInfos = new List <WindowInfo>();

            Common.GetWindows(Config.MainWindow, ref windowInfos);
            var ctrl = windowInfos.Where(p => (p.DlgCtrlID == ".00000000.0000E900.0000E901.00000000.00008016".ToUpper() && p.isVisible == 1)).ToArray();

            //if (ctrl.Length > 0)
            //    MessageBox.Show(ctrl.Length.ToString());
            StockService.SellStock("300446", (decimal)17.12, 100);
            StockService.BuyStock("300446", (decimal)17.12, 100);
            MessageBox.Show(Common.GetTitle(Common.GetWindowByCtrlID(StockService.windows, Config.BuyCtrlPrice)));
            //MessageBox.Show(StockService.GetMyAsset().availableMoney.ToString());
            //MessageBox.Show(StockService.GetMyAsset().moratoriumMoney.ToString());
            //MessageBox.Show(StockService.GetMyAsset().stockMoney.ToString());
            //MessageBox.Show(StockService.GetMyAsset().allAsset.ToString());
            //main = Common.GetIntPtrByProcess("xiadan");
            //IntPtr treePtr = Common.GetIntPtrByControlID(main, "00000000.0000E900.0000E900.00000081.000000C8.00000081");

            //SysTreeView32 tree = new SysTreeView32(treePtr);
            //SysTreeView32_Item i = tree.FirstItem;
            //while(i!=null)
            //{
            //    richTextBox1.AppendText(i.text + "\n");
            //    i = i.NextItem;
            //}
        }