Ejemplo n.º 1
0
 public void SetDialogTitle_Configure()
 {
     // Configure subclass of CustomListDlg
     using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA))
     {
         // Dialog Title should default to "Configure List"
         Assert.AreEqual("Configure List", dlg.Text,
                         "Dialog default title for ConfigureList dialog is wrong.");
     }
 }
Ejemplo n.º 2
0
        public void SetWsComboSelectedItem()
        {
            // SUT
            using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA))
            {
                dlg.SelectedWs = WritingSystemServices.kwsVerns;

                // Verify
                Assert.AreEqual(WritingSystemServices.kwsVerns, dlg.SelectedWs,
                                "Wrong writing system in combo box.");
            }
        }
Ejemplo n.º 3
0
        public bool OnConfigureList(object argument)
        {
            CheckDisposed();

            if (Clerk != null && Clerk.OwningObject != null && (Clerk.OwningObject is ICmPossibilityList))
            {
                using (var dlg = new ConfigureListDlg(m_mediator, (ICmPossibilityList)Clerk.OwningObject))
                    dlg.ShowDialog(this);
            }

            return(true);               // handled
        }
Ejemplo n.º 4
0
        public void SetCheckBoxesToOtherValues()
        {
            using (var dlg = new ConfigureListDlg(null, null, Cache.LangProject.LocationsOA))
            {
                // SUT; Set non-default checkbox values
                dlg.SupportsHierarchy = true;
                dlg.SortByName        = true;
                dlg.AllowDuplicate    = false;

                // Verify
                Assert.IsTrue(dlg.SupportsHierarchy, "'Support hierarchy' value should be set to true.");
                Assert.IsTrue(dlg.SortByName, "'Sort items by name' value should be set to true.");
                Assert.IsFalse(dlg.AllowDuplicate, "'Allow duplicate items' value should be set to false.");
            }
        }
Ejemplo n.º 5
0
        public void SetWsComboSelectedItem()
        {
            // SUT
            using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA))
            {
                dlg.SelectedWs = WritingSystemServices.kwsVerns;

                // Verify
                Assert.AreEqual(WritingSystemServices.kwsVerns, dlg.SelectedWs,
                    "Wrong writing system in combo box.");
            }
        }
Ejemplo n.º 6
0
 public void SetDialogTitle_Configure()
 {
     // Configure subclass of CustomListDlg
     using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA))
     {
         // Dialog Title should default to "Configure List"
         Assert.AreEqual("Configure List", dlg.Text,
             "Dialog default title for ConfigureList dialog is wrong.");
     }
 }
Ejemplo n.º 7
0
        public void SetCheckBoxesToOtherValues()
        {
            using (var dlg = new ConfigureListDlg(null, Cache.LangProject.LocationsOA))
            {
                // SUT; Set non-default checkbox values
                dlg.SupportsHierarchy = true;
                dlg.SortByName = true;
                dlg.AllowDuplicate = false;

                // Verify
                Assert.IsTrue(dlg.SupportsHierarchy, "'Support hierarchy' value should be set to true.");
                Assert.IsTrue(dlg.SortByName, "'Sort items by name' value should be set to true.");
                Assert.IsFalse(dlg.AllowDuplicate, "'Allow duplicate items' value should be set to false.");
            }
        }
Ejemplo n.º 8
0
        public bool OnConfigureList(object argument)
        {
            CheckDisposed();

            if (Clerk != null && Clerk.OwningObject != null && (Clerk.OwningObject is ICmPossibilityList))
                using (var dlg = new ConfigureListDlg(m_mediator, (ICmPossibilityList) Clerk.OwningObject))
                    dlg.ShowDialog(this);

            return true;	// handled
        }