当前位置: 首页>>代码示例>>C#>>正文


C# ListView.Show方法代码示例

本文整理汇总了C#中System.Windows.Forms.ListView.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.Show方法的具体用法?C# ListView.Show怎么用?C# ListView.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ListView的用法示例。


在下文中一共展示了ListView.Show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AutoResize

        /// <summary>
        /// resize all columns to best fit the header and the contents
        /// </summary>
        /// <param name="lv">The lv.</param>
        public static void AutoResize(ListView lv)
        {
            lv.Hide();
            foreach (ColumnHeader CH in lv.Columns)
            {
                AutoResizeListViewColumn(lv, CH);
            }

            lv.Show();
        }
开发者ID:andreigec,项目名称:ANDREICSLIB,代码行数:14,代码来源:ListViewExtras.cs

示例2: showFiles

      void showFiles(FilesResult files, ListView listToShow)
      {
        
         listToShow.BeginInvoke(new Action(() =>
         {

            //clear contents
            listToShow.Clear();
            // Create columns for the items and subitems.
            listToShow.Columns.Add("Filename", 400, HorizontalAlignment.Left);
            foreach (var file in files.FilesEntry)
            {
               ListViewItem item = new ListViewItem(file.Label, 0);
               item.Tag = file;
               listToShow.Items.Add(item);
            }

            listToShow.Show();

         }));
         StopProgress();
      }
开发者ID:carlosmartinsrodrigues,项目名称:IBMConnections-API-Wrapper,代码行数:22,代码来源:OfficeSideBar.cs

示例3: CCProjectsView

        public CCProjectsView(CCProjectsViewMgr viewMgr, string viewName)
        {
            if (viewName == string.Empty)
            {
                viewName = "NewView" + viewMgr.TabControl.TabCount;
            }

            bUserView = true;
            bReadOnly = false;
            Text = viewName;
            m_viewMgr = viewMgr;
            m_tabPage = CreateTabPage(viewMgr, viewName);
            m_listView = CreateListView(viewMgr, m_tabPage);
            m_tabPage.Show();
            m_listView.Show();
        }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:16,代码来源:ProjectViewMgr.cs

示例4: SwapIndicies

        /// <summary>
        /// swap two rows given by their index
        /// </summary>
        /// <param name="lv">The lv.</param>
        /// <param name="index1">First Index to Swap</param>
        /// <param name="index2">Second Index to Swap</param>
        public static void SwapIndicies(ListView lv, int index1, int index2)
        {
            lv.Hide();
            if (index1 < 0 || index2 < 0 || index1 >= lv.Items.Count || index2 >= lv.Items.Count)
                return;

            //make clones
            var LVI1 = (ListViewItem) lv.Items[index1].Clone();
            var LVI2 = (ListViewItem) lv.Items[index2].Clone();

            //swap the sub items
            lv.Items[index1].SubItems.Clear();
            lv.Items[index1].SubItems.AddRange(SubItemCollectionToRange(LVI2.SubItems));

            lv.Items[index2].SubItems.Clear();
            lv.Items[index2].SubItems.AddRange(SubItemCollectionToRange(LVI1.SubItems));

            //swap the name and text
            lv.Items[index1].Text = LVI1.Text;
            lv.Items[index2].Text = LVI2.Text;

            lv.Items[index1].Name = LVI1.Text;
            lv.Items[index2].Name = LVI2.Text;
            lv.Show();
        }
开发者ID:andreigec,项目名称:ANDREICSLIB,代码行数:31,代码来源:ListViewExtras.cs


注:本文中的System.Windows.Forms.ListView.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。