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


C# Pipeline.StartWork方法代码示例

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


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

示例1: RefreshFolder

        public void RefreshFolder(KExplorerNode folderNode, bool folderOnly )
        {
            folderNode.Stale = true;

            string drive = null;
            // Make sure it's initialized...
            if ( folderNode.DirInfo == null )
            {
                drive = folderNode.Text.Substring(0,1);
            }
            else if ( !folderNode.Text.Equals( folderNode.DirInfo.Name ) )
            {
                // Make sure it isn't a drive letter node.
                if ( !folderNode.Text.Substring(1,1).Equals(":") )
                {
                    this.renamedNode = folderNode;

                    this.mainGUI.MainForm.Invoke( new InvokeDelegate( this.RefreshNodeName ) );

                }
                drive = folderNode.DirInfo.FullName.Substring(0,1);
            }
            else
            {
                drive = folderNode.DirInfo.FullName.Substring(0,1);
            }

            Pipeline drivePipeline = (Pipeline)this.mainController.DrivePipelines[ drive ];
            if ( drivePipeline == null )
            {
                // The maincontroller is initialized from only one Tab and if that tab
                // removed from view a certain drive, then there'll be no drive pipeline
                // for it.  So, just make it here.
                drivePipeline = new Pipeline( this.mainGUI );
                this.mainController.DrivePipelines[ drive ] = drivePipeline;

                drivePipeline.StartWork();
            }

            // If it's a drive, perhaps now it's online...
            if ( folderNode.Text.Substring(1,1).Equals(":" ))
            {
                drivePipeline.AddJob( new DriveLoaderWorkUnit( folderNode, drive, this.mainGUI, this.mainGUIFlagger ));

                return;

            }
            drivePipeline.AddJob( new FolderWorkUnit( folderNode
                , this.mainGUI
                , this.mainGUIFlagger ));

            //this.mainController.MainPipeLine.AddJob( new FolderWorkUnit( folderNode
            //													, this.mainGUI
            //													, this.mainGUIFlagger ) );

            if ( !folderOnly )
            {
                this.mainController.MainPipeLine.AddPriorityJob( new FileListWorkUnit( folderNode, this.mainGUI
                    , this.mainGUIFlagger ));
            }
        }
开发者ID:kcsampson,项目名称:Kexplorer,代码行数:61,代码来源:ScriptHelper.cs


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