none
xamarin textbox yerine RRS feed

  • Question

  • I don't know programing, but 10 years ago I wrote simple calculating program with VB. now I want to write with Xamarin but I cannot find instead of textbox. VB text box I wrote some dim for textbox and calculation result shown other textbox.  

    programlama konusunda cok bilgili degilim, ama 10 sene once VB de basit bir hesap program yazmistim. simdi aynisini Xamarin ile telefonda kullabilirini yazmak istedim ama VB deki textbox lar daki degerleri degiskenlere atayip o degiskenleri matematiksel islemlerden sonra cikan sonucu baska bir textbox yazdiriyorudum. buna karsilik gelecek kodlari bulamadim. Ne onerebilirsiniz.?

    VB de daha once yazdigim kodlar asadaki gibidir. 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim akenari, bkenari, Dh, Des, Dort, A, U, Aes, debi, Vort, EE, EEb, EEb1, EEb2, Re, Re1, Re2, lamda, L1, L2, L3, L4, kayip As Double
            akenari = Val(TextBox1.Text)
            bkenari = Val(TextBox2.Text)
            A = (akenari * bkenari)
            U = 2 * (akenari + bkenari)
            Dh = 4 * A / (U)
            Des = 1.265 * (((akenari ^ 3) * (bkenari ^ 3) / (akenari + bkenari)) ^ (1 / 5))
            Dort = (Dh + Des) / 2
            Aes = (Math.PI * (Des / 100) ^ 2) / 4
            debi = Val(TextBox3.Text) / 3600
            Vort = debi / Aes
            TextBox4.Text = Math.Round(Vort, 2)


    • Edited by cmseven77 Sunday, May 17, 2020 8:31 AM
    Sunday, May 17, 2020 8:24 AM

All replies

  • I found myself answer :) 

    -----------------------------------

    <StackLayout>

            <!-- Place new controls here -->
            <Label Text="Welcome to Xamarin.Forms!"
               HorizontalOptions="Center"
               VerticalOptions="CenterAndExpand" />
            <Entry x:Name="entery1"/>
            <Entry x:Name="entery2"/>
           
            <Label x:Name="label1"
                Text=""/>
            <Button Text="tikla"
                    x:Name="tikla"
                    Clicked="tikla_Clicked"/>  


        </StackLayout>

    ---------------------------------------

    private void tikla_Clicked(object sender, EventArgs e)
            {
                string metin = entery1.Text;
                this.label1.Text = metin;
                this.entery1.Text = metin;
             }

    Monday, May 18, 2020 2:27 PM