Beispiel #1
0
        private async void Form1_LoadAsync(object sender, EventArgs e)
        {
            SysImageListHelper helper = new SysImageListHelper(olvFiles);

            olvColumn1.ImageGetter = delegate(object o)
            {
                var item = o as KFile;
                return(helper.GetImageIndex(item.Name, item.IsFolder));
            };
            olvColumn3.AspectGetter = delegate(object o)
            {
                var item = (KFile)o;
                if (item.operation != Operation.NOCHANGE)
                {
                    return(item.operation);
                }
                return(null);
            };
            olvColumn4.AspectGetter = delegate(object o)
            {
                var item = (KFile)o;
                if (item.IsFolder)
                {
                    return(item.CountFile);
                }
                return(null);
            };
            olvFiles.CustomSorter = delegate(OLVColumn column, SortOrder order) {
                olvFiles.ListViewItemSorter = new KColumnComparer(column, order);
            };

            cbDrive.SelectedIndex = 0;
            await get_google_credential();
        }
Beispiel #2
0
        public ImportSourceFileBrowser()
        {
            InitializeComponent();

            sysImgHelper = new SysImageListHelper(this.olvFiles);
            this.olvFilesCustomize();
        }
Beispiel #3
0
        public ArchiveDetailView(string pathIconLibrary, string pathArchive)
        {
            InitializeComponent();


            //_iconReader = new IconReader();
            //archiveTree.ImageList = new ImageList();
            //_iconReader.ReadIcons(pathIconLibrary).ForEach(o => archiveTree.ImageList.Images.Add(o.Icon));
            UxTheme.SetWindowTheme(lvArchiveDetails.Handle, "Explorer", 0);
            SysImageListHelper.SetListViewImageList(lvArchiveDetails, lst, false);
            SevenZipExtractor.SetLibraryPath(IntPtr.Size == 8 ? "7z64.dll" : "7z32.dll");
            _pathArchive = pathArchive;

            Shown += ShowArchiveContent;
        }
Beispiel #4
0
        private void InitTree()
        {
            SysImageListHelper helper = new SysImageListHelper(this.navigator);

            this.olvFileName.ImageGetter = this.olvName.ImageGetter = delegate(object x)
            {
                var info = (MyFileSystemInfo)x;

                return(helper.GetImageIndex(info.FullName));
            };

            this.navigator.CanExpandGetter = delegate(object x)
            {
                return(((MyFileSystemInfo)x).IsDirectory);
            };

            this.navigator.ChildrenGetter = delegate(object x)
            {
                return(this.GetChildren(x as MyFileSystemInfo, true));
            };

            this.LoadRoots();
        }