Esempio n. 1
0
        private static void ListOrders()
        {
            var items = from v in ComparerRepository.ListItems()
                        orderby v.Key
                        select v.Value;

            Console.WriteLine("Available orders:");
            Console.WriteLine("----------------");
            Console.WriteLine();
            foreach (var i in items)
            {
                Console.WriteLine("  - " + i);
                Console.WriteLine();
            }
        }
Esempio n. 2
0
        private void AddOrderItems()
        {
            var items = from v in ComparerRepository.ListItems()
                        orderby v.Key
                        select v.Value;

            foreach (var v in items)
            {
                var i = comboOrder.Items.Add(v);
                if (v.Name == "title")
                {
                    comboOrder.SelectedIndex = i;
                }
            }
        }