Ejemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string stateResult = "";

        TextBox1.Text = "";
        Divination Div = new Divination(Convert.ToInt32(TextBox2.Text), Convert.ToInt32(TextBox3.Text));

        Div.GetData();

        TextBox1.Text = Div.result.ToString();

        TextBox4.Text = TextBox1.Text.ToString().Substring(0, 3);
        TextBox5.Text = TextBox1.Text.ToString().Substring(3, 3);


        Divination Div_1 = new Divination();

        Label1.Text = Div_1.GetChineseState(TextBox4.Text);

        Label2.Text = Div_1.GetChineseState(TextBox5.Text);



        HyperLink1.NavigateUrl = Div_1.GetStateHyperLink(Label1.Text + Label2.Text);
        HyperLink1.Target      = "_Blank";

        HyperLink1.Text = Label1.Text + Label2.Text + " 連結";
    }
Ejemplo n.º 2
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        Label3.Text = "";
        Label4.Text = "";

        Divination Div_1 = new Divination();

        Label3.Text = Div_1.GetChineseState(TextBox6.Text);

        Label4.Text = Div_1.GetChineseState(TextBox7.Text);



        HyperLink2.NavigateUrl = Div_1.GetStateHyperLink(Label3.Text + Label4.Text);
        HyperLink2.Target      = "_Blank";

        HyperLink2.Text = Label3.Text + Label4.Text + " 連結";
    }