Example #1
0
        /// <summary>
        /// Initializes the current window in all existing objects
        /// </summary>
        public PresentationBusses(string auInput)
        {
            InitializeComponent();
            bl = BLApi.Factory.GetBL("1");
            a  = bl.GetAllBusses().ToList();
            busOptions.Items.Add("TRAVELING");
            busOptions.Items.Add("READY_FOR_DRIVE");
            busOptions.Items.Add("TREATING");
            busOptions.Items.Add("REFULING");

            au = auInput;

            if (au == "PASSENGER")
            {
                AddButton.Visibility = Visibility.Collapsed;
                foreach (BO.Bus bus in a)
                {
                    bus.Show = BO.status.REFULING;
                }
            }
            else
            {
                foreach (BO.Bus bus in a)
                {
                    bus.Show = BO.status.READY_FOR_DRIVE;
                }
            }


            DataContext         = this;
            busList.DataContext = a;
        }
        /// <summary>
        /// constractor of the window
        /// </summary>
        public StopManagerAdd()
        {
            InitializeComponent();
            bl = BLApi.Factory.GetBL("1");

            ProgressBar();
        }
Example #3
0
 /// <summary>
 /// Initializes the current window in all existing objects
 /// </summary>
 public StartTravel(BO.Bus mBus)
 {
     InitializeComponent();
     tempBus = mBus;
     bl      = BLApi.Factory.GetBL("1");
     lineListBox.ItemsSource   = bl.GetAllLines().ToList();
     DriverListBox.ItemsSource = bl.GetAllUsers(user => user.Permission == BO.authority.Driver).ToList();
 }
        /// <summary>
        /// constractor of the window
        /// </summary>
        public AddStopToLine(BO.Stop stop)
        {
            InitializeComponent();
            managingStop = stop;

            bl = BLApi.Factory.GetBL("1");
            lines.DataContext = bl.GetAllLines();
        }
Example #5
0
        /// <summary>
        /// Defines actions to be performed when a  button is pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void information_Click(object sender, RoutedEventArgs e)
        {
            BLApi.IBL bl;
            bl = BLApi.Factory.GetBL("1");
            Button a = (Button)sender;

            tempLine = (BO.Line)a.DataContext;
            new LineInfo(tempLine).Show();
        }
        /// <summary>
        /// Initializes the current window in all existing objects
        /// </summary>
        public FirstPage()
        {
            InitializeComponent();

            worker                            = new BackgroundWorker();
            worker.DoWork                    += Worker_DoWor;
            worker.ProgressChanged           += Worker_ProgressChanged;
            worker.RunWorkerCompleted        += Worker_RunWorkerCompleted;
            worker.WorkerReportsProgress      = true;
            worker.WorkerSupportsCancellation = true;
            bl = BLApi.Factory.GetBL("1");
            //busFunc();
            TimeSpan ts    = new TimeSpan(0, 0, 0);
            TimeSpan toAdd = new TimeSpan(0, 5, 0);

            for (int i = 0; i < 48 * 5; i++)
            {
                TimeList.Items.Add(ts);
                ts = ts.Add(toAdd);
            }
            //myMedia.Play();
        }