用.net编程可以操控flash游戏吗?

解决方案 »

  1.   

    int RecorderCount,PageCount,CurrentPage,PageSize,startindex;//总记录条数,总页数,当前页,每页数量,开始页
    private void Page_Load(object sender, System.EventArgs e)
    {
    PageSize = 10; if(!IsPostBack)
    {

    RecorderCount =GetRecorderCount();
    rcount.Text = RecorderCount.ToString();//rcount总记录的label PageCount = (RecorderCount-1)/PageSize+1;//计算总页数
    pcount.Text = PageCount.ToString();//显示总页数
    ViewState["pagecount"] = PageCount; CurrentPage = 0;
    ViewState["PageIndex"] = CurrentPage;
    BindList();
    }

    } //RecorderCount计算总记录数 
    public int GetRecorderCount()
    {
    SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
    SqlCommand comm = new SqlCommand("select Count(*) from CMRC_Products",conn);
    conn.Open();
        int result =(int)comm.ExecuteScalar();
    conn.Close();
    return result;
    }
    ICollection GreatSource()
    {
    SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
    SqlCommand comm = new SqlCommand("select * from CMRC_Products",conn);
    SqlDataAdapter sda = new SqlDataAdapter(comm); startindex = CurrentPage * PageSize;//没页从那里开始索引,也就是说没页从哪条数据开始载入list里面 DataSet ds = new DataSet();
    sda.Fill(ds,startindex,PageSize,"porducts");
    return ds.Tables["porducts"].DefaultView;
    }
    public void BindList()
    {
    LinkButtonUp.Enabled = true;//翻页按钮的初始状态
    LinkButtonDown.Enabled = true; PageCount =(int)ViewState["pagecount"];
    DataListGetProducts.DataSource = GreatSource();
    DataListGetProducts.DataBind(); if(CurrentPage ==0) LinkButtonUp.Enabled = false; if(CurrentPage == PageCount-1) LinkButtonDown.Enabled = false; ViewState["PageIndex"] = CurrentPage;
    cpcount.Text = Convert.ToString(CurrentPage+1);
    }
    //回翻
    private void LinkButtonUp_Click(object sender, System.EventArgs e)
    {
    CurrentPage = (int)ViewState["PageIndex"];
    if(CurrentPage > 0)
    {
    CurrentPage--;
    ViewState["PageIndex"] = CurrentPage;
    }
    BindList();

    //后翻
    private void LinkButtonDown_Click(object sender, System.EventArgs e)
    {
    CurrentPage = (int)ViewState["PageIndex"];
    PageCount = (int)ViewState["pagecount"];
    if(CurrentPage < PageCount)
    {
    CurrentPage++;
    ViewState["PageIndex"] = CurrentPage;
    }
    BindList();
    }
      

  2.   

    可以通过.net生成xml来进行通信,其他的不怎么了解