private void OnEditWsLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			using (var d = new WritingSystemSetupDialog(_wsModel))
			{
				if (_wsModel.HasCurrentSelection)
				{
					d.ShowDialog(_wsModel.CurrentRFC4646);
				}
				else
				{
					d.ShowDialog();
				}
			}
		}
Exemple #2
0
		public void WritingSystemSetupDialog()
		{
			var runner = new CrossThreadTestRunner();
			runner.RunInSTA(
				delegate
				{
					using (var folder = new TemporaryFolder("WS-Test"))
					{
						//var dlg = new WritingSystemSetupDialog(folder.Path,
						//	DummyWritingSystemHandler.onMigration,
						//	DummyWritingSystemHandler.onLoadProblem);
						//that constructor is now obsolete, create repo first
						var repository = LdmlInFolderWritingSystemRepository.Initialize(folder.Path,
							DummyWritingSystemHandler.onMigration,
							DummyWritingSystemHandler.onLoadProblem);
						var dlg = new WritingSystemSetupDialog(repository);
						dlg.WritingSystemSuggestor.SuggestVoice = true;
						dlg.ShowDialog();
					}
				});
		}
Exemple #3
0
		private void OnWritingSystemSetupDialogClicked(object sender, EventArgs e)
		{
			string tempPath = Path.GetTempPath() + "WS-Test";
			Directory.CreateDirectory(tempPath);
			if (!_KeyboardControllerInitialized)
			{
				KeyboardController.Initialize();
				_KeyboardControllerInitialized = true;

				foreach (string key in ErrorReport.Properties.Keys)
					Console.WriteLine("{0}: {1}", key, ErrorReport.Properties[key]);
			}
			var wsRepo = LdmlInFolderWritingSystemRepository.Initialize(tempPath, onMigration, onLoadProblem);
			using (var dialog = new WritingSystemSetupDialog(wsRepo))
			{
				dialog.WritingSystems.LocalKeyboardSettings = Settings.Default.LocalKeyboards;
				dialog.ShowDialog();
				Settings.Default.LocalKeyboards = dialog.WritingSystems.LocalKeyboardSettings;
				Settings.Default.Save();
			}
		}
 private void OnWritingSystemSetupDialogClicked(object sender, EventArgs e)
 {
     string tempPath = Path.GetTempPath() + "WS-Test";
     Directory.CreateDirectory(tempPath);
     KeyboardController.Initialize();
     try
     {
         var wsRepo = LdmlInFolderWritingSystemRepository.Initialize(tempPath, onMigration, onLoadProblem);
         using (var dialog = new WritingSystemSetupDialog(wsRepo))
         {
             dialog.WritingSystems.LocalKeyboardSettings = Settings.Default.LocalKeyboards;
             dialog.ShowDialog();
             Settings.Default.LocalKeyboards = dialog.WritingSystems.LocalKeyboardSettings;
             Settings.Default.Save();
         }
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         KeyboardController.Shutdown();
     }
 }