Guest User

Untitled

a guest
Oct 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using Microsoft.Phone.Controls;
  13.  
  14. namespace PhoneApp31
  15. {
  16. public partial class MainPage : PhoneApplicationPage
  17. {
  18. // Constructor
  19. public MainPage()
  20. {
  21. InitializeComponent();
  22. Stations = new List<Station>();
  23. Stations.Add(new Station{StationName="borivali",StationCode=8});
  24. Stations.Add(new Station { StationName = "kandivali", StationCode=9});
  25. Stations.Add(new Station { StationName = "malad", StationCode = 10 });
  26. Stations.Add(new Station { StationName = "goregaon", StationCode = 11 });
  27. Stations.Add(new Station { StationName = "jogeshwari", StationCode = 12 });
  28. listBox1.ItemsSource = Stations;
  29.  
  30. }
  31. List<Station> Stations = new List<Station>();
  32.  
  33. private void textBox1_TextChanged(object sender, TextChangedEventArgs e)
  34. {
  35.  
  36. }
  37.  
  38.  
  39.  
  40. public void result()
  41. {
  42.  
  43.  
  44. double borivali = 8;
  45. double kandivali = 9, malad = 10;
  46. double churchgate = 28;
  47. double marine= 27;
  48. double charni= 26;
  49. double grant= 25;
  50. double mumbai= 24;
  51. double mahalaxmi= 23;
  52. double lower= 22;
  53. double elphiston= 21;
  54. double dadar= 20;
  55. double matunga= 19;
  56. double mahim= 18;
  57. double bandra= 17;
  58. double khar= 16;
  59. double santacruz= 15;
  60. double vile= 14;
  61. double anderi= 13;
  62.  
  63. double jogeshwari= 12;
  64.  
  65. double goregaon= 11;
  66.  
  67. double dahisar=7 ;
  68.  
  69. double mira= 6;
  70.  
  71. double bhayander=5 ;
  72.  
  73. double naigaon=4 ;
  74.  
  75. double vasai= 3;
  76.  
  77. double nalasopara=2 ;
  78. double virar = 1;
  79.  
  80.  
  81.  
  82. double fare;
  83. fare = borivali - malad;
  84.  
  85. if (fare < 4)
  86. {
  87. tb.Text += "RS" + fare;
  88. }
  89.  
  90.  
  91. }
  92.  
  93. private void onclick(object sender, RoutedEventArgs e)
  94. {
  95. MessageBox.Show(((Station)listBox1.SelectedItem).StationCode.ToString()) ;
  96. result();
  97.  
  98. }
  99.  
  100. public void onchange(object sender, SelectionChangedEventArgs e)
  101. {
  102.  
  103.  
  104. }
  105.  
  106.  
  107.  
  108. }
  109. }
Add Comment
Please, Sign In to add comment