Esempio n. 1
0
        public void GetMyItems()
        {
            var tfs = new TfsApi("https://msk-tfs1.securitycode.ru/tfs/Endpoint%20Security");
            {
                var all = tfs.GetMyWorkItems();

                Assert.IsTrue(all.Any());
            }
        }
Esempio n. 2
0
        public void GetTaskLinks()
        {
            var tfs = new TfsApi("https://msk-tfs1.securitycode.ru/tfs/Endpoint%20Security");
            {
                var items = tfs.GetMyWorkItems().Where(x => x.Type.Name.Equals(WorkItemTypes.Task)).ToList();

                foreach (var task in items)
                {
                    var name = task.Title;

                    foreach (Link link in task.Links)
                    {
                    }
                }
            }
        }
Esempio n. 3
0
        private void RunTests()
        {
            //var notifier = new Notifier(cfg =>
            //{
            //    cfg.PositionProvider = new PrimaryScreenPositionProvider(Corner.BottomRight, 10, 10);

            //    cfg.LifetimeSupervisor = new TimeAndCountBasedLifetimeSupervisor(TimeSpan.FromMinutes(1),
            //        MaximumNotificationCount.FromCount(10));
            //});

            //Task.Run(async () =>
            //{
            //    await Task.Delay(TimeSpan.FromSeconds(5));

            //    try
            //    {
            //        notifier.ShowError("ОШИИИБКАААААА");
            //    }
            //    catch (Exception e)
            //    {
            //        Trace.WriteLine(e);
            //    }

            //});

            //var w1 = new Window
            //{
            //    VerticalContentAlignment = VerticalAlignment.Top,
            //    Content = new FilterViewModel(TfsAPI.Constants.WorkItemTypes.Task, TfsAPI.Constants.WorkItemTypes.Pbi)
            //};

            //w1.ShowDialog();

            //CultureInfo ci = CultureInfo.InstalledUICulture;

            //Thread.CurrentThread.CurrentUICulture = ci;
            //Thread.CurrentThread.CurrentCulture = ci;

            //var w = new Window
            //{
            //    Content = new Calendar()
            //};

            //w.Language = XmlLanguage.GetLanguage(ci.IetfLanguageTag);

            //w.ShowDialog();

            var id  = 80439;
            var api = new TfsApi("https://msk-tfs1.securitycode.ru/tfs/Endpoint Security");

            var item     = api.FindById(id);
            var assigned = new ItemsAssignedBaloonViewModel(new[] { item }, "Новый элемент был назначен");

            WindowManager.ShowBaloon(assigned);


            var write = new WriteOffBaloonViewModel(new ScheduleWorkArgs(item, 4));

            WindowManager.ShowBaloon(write);

            var items = api.GetMyWorkItems();

            //var response = new NewResponsesBaloonViewModel(items.Where(x => x.IsTypeOf(WorkItemTypes.ReviewResponse)),
            //    items.Where(x => x.IsTypeOf(WorkItemTypes.CodeReview)), api, "Мои проверки кода");

            //WindowManager.ShowBaloon(response);


            //var vm = new SettingsViewModel("", null);
            //WindowManager.ShowDialog(vm, "Настройки", 450, 500);

            //WindowManager.ShowBaloon(new WriteOffBaloonViewModel("Таймер списания времени"));

            //WindowManager.ShowDialog(new TestDialogViewModel(true, true), "Wait for error", width: 300, height: 200);
            //WindowManager.ShowDialog(new TestDialogViewModel(false, false), "No error no awaiting", width: 300, height: 200);
        }