private void GitExt_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "ActiveRepositories")
     {
         Task.Run(async() =>
         {
             var isv = _tes.IsGitLabRepo();
             await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
             IsVisible = isv;
         }).Forget();
     }
 }
示例#2
0
 public override void Refresh()
 {
     ThreadHelper.JoinableTaskFactory.RunAsync(async() =>
     {
         _tes.IsGitLabRepo();
         await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
         base.Refresh();
     }
                                               );
 }
 public override void Initialize(object sender, SectionInitializeEventArgs e)
 {
     base.Initialize(sender, e);
     ThreadHelper.JoinableTaskFactory.RunAsync(async() =>
     {
         var isvisible = !_tes.IsGitLabRepo();
         await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
         IsVisible = isvisible;
     }
                                               );
 }
示例#4
0
 public override void Invalidate()
 {
     if (DateTime.Now.Subtract(dateTime).TotalSeconds > 5 || !lastIsVisible.HasValue)
     {
         IsVisible = false;
         ThreadHelper.JoinableTaskFactory.Run(async() =>
         {
             lastIsVisible = _tes.IsGitLabRepo() && _tes.Project != null;
             await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
             IsVisible = lastIsVisible.GetValueOrDefault();
             dateTime  = DateTime.Now;
         });
     }
     else
     {
         IsVisible = lastIsVisible.GetValueOrDefault();
     }
 }
        public override void Initialize(object sender, SectionInitializeEventArgs e)
        {
            base.Initialize(sender, e);

            IsVisible = !_tes.IsGitLabRepo();
        }
示例#6
0
 public override void Refresh()
 {
     base.Refresh();
     IsVisible = _tes.IsGitLabRepo();
 }
 public override async void Invalidate()
 {
     IsVisible = false;
     IsVisible = await System.Threading.Tasks.Task.Factory.StartNew(() => _tes.IsGitLabRepo()) && _tes.Project != null;
 }
        public override async void Refresh()
        {
            IsVisible = await System.Threading.Tasks.Task.Factory.StartNew(() => _tes.IsGitLabRepo());

            base.Refresh();
        }
 private bool CanPublish()
 {
     return(_storage.IsLogined && !_tes.IsGitLabRepo());
 }