Ejemplo n.º 1
0
        private void findLn_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Guide start = new Guide();
            //start.initialiseList();
            String te = start.cmbbox();

            String[] test = te.Split('\n');
            findStn.Items.Clear();
            int name = findLn.SelectedIndex;

            switch (name)
            {
            case 0:
                EW.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 1:
                NS.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 2:
                NE.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 3:
                CC.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 4:
                DT.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 5:
                CG.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;

            case 6:
                BP.ForEach(x =>
                {
                    findStn.Items.Add(x.getName());
                });
                break;
            }
        }
Ejemplo n.º 2
0
        /*Change combo box options based on start line*/
        private void startLn_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            startStn.Items.Clear();
            Guide  start = new Guide();
            String te    = start.cmbbox();

            String[] test = te.Split('\n');


            switch (startLn.SelectedIndex)
            {
            case 0:
                EW.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 1:
                NS.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 2:
                NE.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 3:
                CC.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 4:
                DT.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 5:
                CG.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;

            case 6:
                BP.ForEach(x =>
                {
                    startStn.Items.Add(x.printFullInfo());
                });
                break;
            }
        }
Ejemplo n.º 3
0
        private void endLn_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Guide  end = new Guide();
            String te  = end.cmbbox();

            String[] test = te.Split('\n');

            endStn.Items.Clear();
            int name = endLn.SelectedIndex;

            switch (name)
            {
            case 0:
                EW.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 1:
                NS.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 2:
                NE.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 3:
                CC.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 4:
                DT.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 5:
                CG.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;

            case 6:
                BP.ForEach(x =>
                {
                    endStn.Items.Add(x.printFullInfo());
                });
                break;
            }
        }