ShowDialog() public method

sets up the dialog without actually showing it.
public ShowDialog ( IWritingSystem ws ) : int
ws IWritingSystem The writing system which properties will be displayed
return int
 public void WsListContent()
 {
     // Setup dialog to show Kalaba (xkal) related wss.
     m_dlg.ShowDialog(m_wsKalaba);
     m_dlg.VerifyListBox(new[] { "Kalaba", "Kalaba (International Phonetic Alphabet)" });
     m_dlg.VerifyRelatedWritingSystem("kal");
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba");
     // Select Kalaba (IPA) and verify dialog is setup for that one.
     m_dlg.WsList.SelectedItem = m_dlg.WsList.Items.Cast <IWritingSystem>().Single(ws => ws.DisplayLabel == "Kalaba (International Phonetic Alphabet)");
     m_dlg.VerifyLoadedForListBoxSelection("Kalaba (International Phonetic Alphabet)");
 }
Exemplo n.º 2
0
        public void NoCache_DoesNotThrow()
        {
            var wsManager = new WritingSystemManager();
            CoreWritingSystemDefinition ws = wsManager.Set("qaa-x-kal");

            ws.Language = new LanguageSubtag(ws.Language, "Kalaba");
            IWritingSystemContainer wsContainer = new MemoryWritingSystemContainer(wsManager.WritingSystems, wsManager.WritingSystems,
                                                                                   Enumerable.Empty <CoreWritingSystemDefinition>(), Enumerable.Empty <CoreWritingSystemDefinition>(), Enumerable.Empty <CoreWritingSystemDefinition>());

            using (var dlg = new DummyWritingSystemPropertiesDialog(wsManager, wsContainer))
            {
                dlg.ShowDialog(ws);
                dlg.LanguageNameTextBox.Text = "Kalab";
                Assert.DoesNotThrow(() => dlg.PressOk());
                Assert.That(ws.DisplayLabel, Is.EqualTo("Kalab"));
            }
        }