Example #1
0
        //private class Route
        //{
        //    public int Id { get; set; }
        //    public string Climate { get; set; }
        //    public string Country { get; set; }
        //    public string Hotel { get; set; }
        //    public int Duration { get; set; }
        //    public float Cost { get; set; }

        //    public Route(int id, string climate, string country, string hotel, int duration, float cost)
        //    {
        //        Id = id;
        //        Climate = climate;
        //        Country = country;
        //        Hotel = hotel;
        //        Duration = duration;
        //        Cost = cost;
        //    }
        //}

        public Routes(MainWindow mainWindow)
        {
            InitializeComponent();

            this.mainWindow = mainWindow;
            routesWindow = this;

            loadRoutes();
        }
Example #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.routes = ((travelAgency.Routes)(target));
     
     #line 10 "..\..\Routes.xaml"
     this.routes.Closing += new System.ComponentModel.CancelEventHandler(this.routes_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.routesList = ((System.Windows.Controls.ListView)(target));
     return;
     case 3:
     this.AddRouteBtn = ((System.Windows.Controls.Button)(target));
     
     #line 51 "..\..\Routes.xaml"
     this.AddRouteBtn.Click += new System.Windows.RoutedEventHandler(this.AddRouteBtn_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.EditRouteBtn = ((System.Windows.Controls.Button)(target));
     
     #line 55 "..\..\Routes.xaml"
     this.EditRouteBtn.Click += new System.Windows.RoutedEventHandler(this.EditRouteBtn_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.DeleteRouteBtn = ((System.Windows.Controls.Button)(target));
     
     #line 59 "..\..\Routes.xaml"
     this.DeleteRouteBtn.Click += new System.Windows.RoutedEventHandler(this.DeleteRouteBtn_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.BackBtn = ((System.Windows.Controls.Button)(target));
     
     #line 63 "..\..\Routes.xaml"
     this.BackBtn.Click += new System.Windows.RoutedEventHandler(this.BackBtn_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Example #3
0
 private void RoutesBtn_Click(object sender, RoutedEventArgs e)
 {
     var routes = new Routes(mainWindow);
     routes.Show();
     Hide();
 }