예제 #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();
        }
예제 #2
0
파일: Program.cs 프로젝트: war-man/Training
        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();
        }