Example #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            List <Tuple <string, string> > pathVariants = ApplicationDirectory.GetAll();

            listViewInfo.BeginUpdate();
            foreach (Tuple <string, string> pathVariant in pathVariants)
            {
                listViewInfo.Items.Add(new ListViewItem(new[] { pathVariant.Item1, pathVariant.Item2 }));
            }
            listViewInfo.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
            listViewInfo.EndUpdate();
        }
Example #2
0
        static void Main()
        {
            List <Tuple <string, string> > pathVariants = ApplicationDirectory.GetAll();
            int maxRemLen = pathVariants.Max(v => v.Item1.Length);

            foreach (Tuple <string, string> pathVariant in pathVariants)
            {
                Console.WriteLine("{0}: {1}", pathVariant.Item1.PadRight(maxRemLen), pathVariant.Item2);
            }

            Console.ReadLine();
        }