Visual Basic OCR - 构建错误

时间:2016-07-16 18:05:49

标签: vb.net visual-studio-2015

我正在尝试将OCR与VB一起使用,我在互联网上找到了这个很棒的代码,但是当我完成项目并运行它时,它给了我这些错误:

错误1'Private Sub Button1_Click(sender As Object,e As System.EventArgs)'具有多个具有相同签名的定义。

错误2'Private Sub Timer1_Tick(sender As Object,e As System.EventArgs)'具有多个具有相同签名的定义。

代码:

    <?php
class User extends Admin_Controller{
    public function __construct()
    {
        parent::__construct();
    }

    public function index()
    {
        $this->data['users'] = $this->user_m->get_by();
        $this->data['subview'] = 'admin/user/index';
        $this->load->view('admin/_layout_main');
    }

    public function edit($id=NULL)
    {

    }

    public function delete($id)
    {

    }



    public function login()
    {
        $dashboard = 'admin/dashboard';
        $this->user_m->loggedin() == FALSE || redirect($dashboard);
        $rules = $this->user_m->rules;
        $this->form_validation->set_rules($rules);

        if ($this->form_validation->run()==true) {

            if ($this->user_m->login() == TRUE) {
                redirect($dashboard);
            }else{
                $this->session->set_flashdata('error', 'That email and password combination does not exit');
                redirect('admin/user/login', 'refresh');
            }
        }

        $this->data['subview'] = 'admin/user/login';
        $this->load->view('admin/_layout_modal', $this->data);
    }
}

1 个答案:

答案 0 :(得分:0)

看起来您正在使用Windows窗体?或网页表格?无论如何,设计人员可能已经在后面的代码中插入了这些事件的处理程序。尝试使用show all files查看设计器代码。或者更好的是打开设计器转到事件属性表(单击相关控件)并删除(或重命名)设计器的处理程序。如果您希望设计师的处理程序也能运行,请重命名自己。

相关问题