示例#1
0
        private void OnDeleteCustomViewportLayoutButtonClick(object sender, RoutedEventArgs e)
        {
            try
            {
                Logger.LogFuncUp();

                var selectedItem = CustomViewportViewModel.SelectedViewportItem;
                if (selectedItem != null &&
                    this.tabItemUser.Visibility == Visibility.Visible &&
                    CustomViewportViewModel.CustomViewportItemCollectionUser.Contains(selectedItem))
                {
                    if (!selectedItem.Destroy())
                    {
                        MessageBoxHandler.Instance.ShowWarning("UID_Filming_Warning_CannotDeleteConfigure",
                                                               response => FilmingViewerContainee.Main.OnExitSecondaryUI());
                        customViewportListBoxOrigin.SelectedItem = null;
                        return;
                    }
                    var selectIndex = CustomViewportViewModel.CustomViewportItemCollectionUser.IndexOf(selectedItem);
                    CustomViewportViewModel.CustomViewportItemCollectionUser.Remove(selectedItem);
                    CustomViewportViewModel.SelectedViewportItemUser =
                        CustomViewportViewModel.CustomViewportItemCollectionUser.ElementAtOrDefault(selectIndex);
                    CustomViewportViewModel.SelectedViewportItem = CustomViewportViewModel.SelectedViewportItemUser;
                    CustomViewportViewModel.Refresh();
                }
            }
            catch (Exception ex)
            {
                Logger.LogFuncException(ex.Message + ex.StackTrace);
            }
        }
示例#2
0
        public void RefreshTest()
        {
            CustomViewportViewModel target = new CustomViewportViewModel(); //

            target.Refresh();
            //Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
示例#3
0
        public void IsEnableSaveTest()
        {
            CustomViewportViewModel target = new CustomViewportViewModel(); //
            bool actual;

            actual = target.IsEnableSave;
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#4
0
        public void ExistViewportHasSameNameWithActiveViewportTest()
        {
            CustomViewportViewModel target = new CustomViewportViewModel(); //
            bool expected = false;                                          //
            bool actual;

            actual = target.ExistViewportHasSameNameWithActiveViewport();
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#5
0
        public void CustomViewportNameTest()
        {
            CustomViewportViewModel target = new CustomViewportViewModel(); //
            string expected = string.Empty;                                 //
            string actual;

            target.CustomViewportName = expected;
            actual = target.CustomViewportName;
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#6
0
        public void SelectedViewportItemTest()
        {
            CustomViewportViewModel target   = new CustomViewportViewModel(); //
            CustomViewportItem      expected = null;                          //
            CustomViewportItem      actual;

            target.SelectedViewportItem = expected;
            actual = target.SelectedViewportItem;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#7
0
        public void CustomViewportItemCollectionTest()
        {
            CustomViewportViewModel target = new CustomViewportViewModel(); //
            ObservableCollection <CustomViewportItem> expected = null;      //
            ObservableCollection <CustomViewportItem> actual;

            target.CustomViewportItemCollectionUser = expected;
            actual = target.CustomViewportItemCollectionUser;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#8
0
 public void CustomViewportViewModelConstructorTest()
 {
     CustomViewportViewModel target = new CustomViewportViewModel();
     //Assert.Inconclusive("TODO: Implement code to verify target");
 }