示例#1
0
        public static int Start(string infomartion)
        {
            try
            {
                Console.WriteLine(infomartion);
                LoadDlls();
                var mainHwnd = Process.GetCurrentProcess().MainWindowHandle;
                CallWndProcHook.Hook();
                CallWndProcHook.SendDataMessage(mainHwnd, Encoding.Default.GetBytes("CallWndProc Hooked!"));

                var address = AddressManager.GetAddress();
                if (address == null)
                {
                    Console.WriteLine("Addr NotFound!");
                }
                else
                {
                    var nAddr = address.Value;
                    Console.WriteLine($"DemoClass_SendMsg Addr: {nAddr.DemoClass_SendMsg.ToString("X")}");
                    DemoClass_SendMsgHook.Hook(nAddr.DemoClass_SendMsg);
                }
                Console.ReadKey();
                CallWndProcHook.UnHook();
                DemoClass_SendMsgHook.UnHook();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            return(1);
        }
示例#2
0
    private Vivina.Erp.DataClasses.Address LoadPostalCode(string postalCode)
    {
        Vivina.Erp.DataClasses.Address address = null;
        if (!String.IsNullOrEmpty(postalCode))
        {
            var manager = new AddressManager(this);
            address = manager.GetAddress(postalCode.Replace("-", ""));

            if (address != null)
            {
                txtNeighborhood.Text        = address.Neighborhood;
                txtCity.Text                = address.City;
                txtAddress.Text             = address.Name;
                cboStates.SelectedValue     = address.StateId;
                ViewState["NeighborhoodId"] = address.NeighborhoodId;
                ViewState["CityId"]         = address.CityId;
                ViewState["StateId"]        = address.StateId;
                ViewState["addressExists"]  = true;
            }
        }
        else
        {
            ViewState["addressExists"] = false;
            txtNeighborhood.Text       = String.Empty;
            txtCity.Text    = String.Empty;
            txtAddress.Text = String.Empty;
            txtNumber.Text  = String.Empty;
            cboStates.ClearSelection();
        }
        EnableValidators(true);
        return(address);
    }
    private Vivina.Erp.DataClasses.Address LoadPostalCode(string postalCode)
    {
        Vivina.Erp.DataClasses.Address address = null;
        if (!String.IsNullOrEmpty(postalCode))
        {
            var manager = new AddressManager(this);
            address = manager.GetAddress(postalCode.Replace("-", ""));

            if (address != null)
            {
                txtNeighborhood.Text = address.Neighborhood;
                txtCity.Text = address.City;
                txtAddress.Text = address.Name;
                cboStates.SelectedValue = address.StateId;
                ViewState["NeighborhoodId"] = address.NeighborhoodId;
                ViewState["CityId"] = address.CityId;
                ViewState["StateId"] = address.StateId;
                ViewState["addressExists"] = true;
            }
        }
        else
        {
            ViewState["addressExists"] = false;
            txtNeighborhood.Text = String.Empty;
            txtCity.Text = String.Empty;
            txtAddress.Text = String.Empty;
            txtNumber.Text = String.Empty;
            cboStates.ClearSelection();

        }
        EnableValidators(true);
        return address;
    }