Пример #1
0
		/// <summary>
		/// Show a dialog to allow the user to select/unselect multiple writing systems
		/// at a time, whether or not to display them (if they don't have data)
		/// If they do have data, we show the fields anyhow.
		/// </summary>
		/// <param name="args"></param>
		/// <returns></returns>
		public bool OnDataTreeWritingSystemsConfigureDlg(object args)
		{
			CheckDisposed();

			Set<int> wsSet = new Set<int>(HvosFromWss(WritingSystemOptionsForDisplay));
			ObjectLabelCollection labels = new ObjectLabelCollection(m_cache, wsSet);
			ReloadWssToDisplayForPart();
			List<int> wssToDisplay = HvosFromWss(WritingSystemsSelectedForDisplay);
			using (ReallySimpleListChooser chooser = new ReallySimpleListChooser(null, labels, "DataTreeWritingSystems", m_cache, wssToDisplay.ToArray(), false))
			{
				chooser.ForbidNoItemChecked = true;
				IVwStylesheet stylesheet = (Control as LabeledMultiStringView).StyleSheet;
				chooser.SetFontForDialog(new int[] { Cache.DefaultVernWs, Cache.DefaultAnalWs }, stylesheet, Cache.LanguageWritingSystemFactoryAccessor);
				chooser.InitializeExtras(ConfigurationNode, Mediator);
				chooser.Text = String.Format(DetailControlsStrings.ksSliceConfigureWssDlgTitle, this.Label);
				chooser.InstructionalText = DetailControlsStrings.ksSliceConfigureWssDlgInstructionalText;
				if (chooser.ShowDialog() == DialogResult.OK)
				{
					PersistAndRedisplayWssToDisplayForPart(chooser.ChosenHvos);
				}
			}
			return true;
		}