Example #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Respond to the Tools/Options menu option to bring up the options dialog.
		/// </summary>
		/// <param name="args"></param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected bool OnToolsOptions(object args)
		{
			int origUiWs = m_cache.DefaultUserWs;
			using (ToolsOptionsDialog dlg = new ToolsOptionsDialog(m_app, m_app, m_cache.ServiceLocator.WritingSystemManager))
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					MaxStyleLevel = ToolsOptionsDialog.MaxStyleLevel;
					InitStyleComboBox();
					if (m_cache.DefaultUserWs != origUiWs)
					{
						using (new DataUpdateMonitor(null, "Updating Key Term Localizations"))
						{
							TeKeyTermsInit.EnsureCurrentLocalization(
								m_cache.WritingSystemFactory.GetStrFromWs(m_cache.DefaultUserWs), m_scr, m_app, this);
						}
					}
					m_app.RefreshAllViews();
				}
			}

			return true;
		}
Example #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Respond to the Tools/Options menu option to bring up the options dialog.
		/// </summary>
		/// <param name="args"></param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected bool OnToolsOptions(object args)
		{
			using (ToolsOptionsDialog dlg = new ToolsOptionsDialog())
			{
				if (dlg.ShowDialog() == DialogResult.OK)
				{
					MaxStyleLevel = ToolsOptionsDialog.MaxStyleLevel;
					InitStyleComboBox();
					FwApp.App.RefreshAllViews(m_cache);
				}
			}

			return true;
		}