Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Display the punctuation dialog box, using the specified guid to determine what
		/// tab on the dialog is initially brought to front.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void ShowPunctuationDialog(Guid initialTab)
		{
			ILgWritingSystemFactory lgwsf = m_cache.LanguageWritingSystemFactoryAccessor;
			int hvoWs = m_cache.DefaultVernWs;
			IWritingSystem ws = lgwsf.get_EngineOrNull(hvoWs);
			LanguageDefinition langDef = new LanguageDefinition(ws);
			LgWritingSystem lgWs = new LgWritingSystem(m_cache, hvoWs);

			using (PunctuationDlg dlg = new PunctuationDlg(m_cache, FwApp.App,
				langDef, lgWs.Name.UserDefaultWritingSystem, initialTab))
			{
				if (dlg.ShowDialog(this) == DialogResult.OK)
				{
					ws.SaveIfDirty(m_cache.DatabaseAccessor);
					langDef.Serialize();
				}
			}
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handles the Click event of the btnPunctuation control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
		/// ------------------------------------------------------------------------------------
		private void btnPunctuation_Click(object sender, EventArgs e)
		{
			using (PunctuationDlg dlg = new PunctuationDlg(m_cache, m_helpTopicProvider,
				m_langDefCurrent, m_FullNameGeneral, StandardCheckIds.kguidMatchedPairs))
			{
				dlg.ShowDialog(this);
			}
		}
		private void btnPunctuation_Click(object sender, EventArgs e)
		{
			using (var dlg = new PunctuationDlg(m_cache, m_wsContainer, m_helpTopicProvider, m_app,
				CurrentWritingSystem, CurrentWritingSystem.DisplayLabel, StandardCheckIds.kguidMatchedPairs))
			{
				dlg.ShowDialog(this);
			}
		}