Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Animation;
- using System.Windows.Shapes;
- using Microsoft.Phone.Controls;
- namespace PhoneApp31
- {
- public partial class MainPage : PhoneApplicationPage
- {
- // Constructor
- public MainPage()
- {
- InitializeComponent();
- Stations = new List<Station>();
- Stations.Add(new Station{StationName="borivali",StationCode=8});
- Stations.Add(new Station { StationName = "kandivali", StationCode=9});
- Stations.Add(new Station { StationName = "malad", StationCode = 10 });
- Stations.Add(new Station { StationName = "goregaon", StationCode = 11 });
- Stations.Add(new Station { StationName = "jogeshwari", StationCode = 12 });
- listBox1.ItemsSource = Stations;
- }
- List<Station> Stations = new List<Station>();
- private void textBox1_TextChanged(object sender, TextChangedEventArgs e)
- {
- }
- public void result()
- {
- double borivali = 8;
- double kandivali = 9, malad = 10;
- double churchgate = 28;
- double marine= 27;
- double charni= 26;
- double grant= 25;
- double mumbai= 24;
- double mahalaxmi= 23;
- double lower= 22;
- double elphiston= 21;
- double dadar= 20;
- double matunga= 19;
- double mahim= 18;
- double bandra= 17;
- double khar= 16;
- double santacruz= 15;
- double vile= 14;
- double anderi= 13;
- double jogeshwari= 12;
- double goregaon= 11;
- double dahisar=7 ;
- double mira= 6;
- double bhayander=5 ;
- double naigaon=4 ;
- double vasai= 3;
- double nalasopara=2 ;
- double virar = 1;
- double fare;
- fare = borivali - malad;
- if (fare < 4)
- {
- tb.Text += "RS" + fare;
- }
- }
- private void onclick(object sender, RoutedEventArgs e)
- {
- MessageBox.Show(((Station)listBox1.SelectedItem).StationCode.ToString()) ;
- result();
- }
- public void onchange(object sender, SelectionChangedEventArgs e)
- {
- }
- }
- }
Add Comment
Please, Sign In to add comment