Exemple #1
0
        private void ConfigureAnalysisClick(object sender, System.EventArgs e)
        {
            var wsSetupModel = new FwWritingSystemSetupModel(_model.WritingSystemContainer, FwWritingSystemSetupModel.ListType.Analysis,
                                                             _model.WritingSystemManager);

            using (var wsDlg = new FwWritingSystemSetupDlg(wsSetupModel, _helpTopicProvider))
            {
                wsDlg.ShowDialog(this);
            }
        }
Exemple #2
0
        /// <summary/>
        public static bool ShowNewDialog(IWin32Window parentForm, LcmCache cache, IHelpTopicProvider helpProvider, IApp app,
                                         FwWritingSystemSetupModel.ListType type, out IEnumerable <CoreWritingSystemDefinition> newWritingSystems)
        {
            newWritingSystems = new List <CoreWritingSystemDefinition>();
            var model    = new FwWritingSystemSetupModel(cache.ServiceLocator.WritingSystems, type, cache.ServiceLocator.WritingSystemManager, cache);
            var oldWsSet = new HashSet <WSListItemModel>(model.WorkingList);

            using (var dlg = new FwWritingSystemSetupDlg(model, helpProvider, app))
            {
                dlg.ShowDialog(parentForm);
                if (dlg.DialogResult == DialogResult.OK)
                {
                    newWritingSystems = model.WorkingList.Where(item => !oldWsSet.Contains(item)).Select(item => item.WorkingWs);
                    return(true);
                }
            }

            return(false);
        }