diff --git a/Hawk.ETL/Managements/DataProcessManager.cs b/Hawk.ETL/Managements/DataProcessManager.cs index 9ea6590..8bf5a94 100644 --- a/Hawk.ETL/Managements/DataProcessManager.cs +++ b/Hawk.ETL/Managements/DataProcessManager.cs @@ -628,15 +628,11 @@ public override bool Init() { GitHubApi.Connect(ConfigFile.GetConfig().Get("Login"), ConfigFile.GetConfig().Get("Password")); MarketProjects.Clear(); - if (DataMiningConfig.GetConfig().AutoConnectGithub) - { - ControlExtended.SetBusy(ProgressBarState.Indeterminate,message:GlobalHelper.Get("get_remote_projects")); - MarketProjects.AddRange(await GitHubApi.GetProjects(ConfigFile.GetConfig().Get("MarketUrl"))); + OnPropertyChanged("MarketProjects"); ControlExtended.SetBusy(ProgressBarState.NoProgress); -} }, icon: "refresh")); @@ -866,26 +862,27 @@ private void PrintReferenced(IDataProcess obj) public ListCollectionView ProcessCollectionView { get; set; } private ListCollectionView marketCollectionView; public ListCollectionView MarketProjectList { - get + get { if (marketCollectionView == null) { - if (!DataMiningConfig.GetConfig().AutoConnectGithub) - { - return null; - } - GitHubApi.Connect(ConfigFile.GetConfig().Get("Login"), ConfigFile.GetConfig().Get("Password")); - var result = GitHubApi.GetProjects(ConfigFile.GetConfig().Get("MarketUrl")).Result; + + ControlExtended.SafeInvoke( () => { - MarketProjects.Clear(); - MarketProjects.AddRange(result); marketCollectionView = new ListCollectionView(MarketProjects); } ,LogType.Info, GlobalHelper.Get("market_login"),true); - - + if (DataMiningConfig.GetConfig().AutoConnectGithub) + { + GitHubApi.Connect(ConfigFile.GetConfig().Get("Login"), + ConfigFile.GetConfig().Get("Password")); + var result =GitHubApi.GetProjects(ConfigFile.GetConfig().Get("MarketUrl")).Result; + MarketProjects.AddRange(result); + } + + } return marketCollectionView; } diff --git a/Hawk/Properties/AssemblyInfo.cs b/Hawk/Properties/AssemblyInfo.cs index ec67aca7..aa1e5e3 100644 --- a/Hawk/Properties/AssemblyInfo.cs +++ b/Hawk/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.0.0")] +[assembly: AssemblyVersion("5.2.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]