public static Result Run(Window parent, Coder.CodePage codePage = Coder.CodePage.Default, Coder.CodePage detected = Coder.CodePage.None)
		{
			var dialog = new EncodingDialog(codePage, detected) { Owner = parent };
			if (!dialog.ShowDialog())
				return null;
			return dialog.result;
		}
		void Command_File_Encoding_ReopenWithEncoding(EncodingDialog.Result result)
		{
			if (IsModified)
			{
				if (new Message(WindowParent)
				{
					Title = "Confirm",
					Text = "You have unsaved changes.  Are you sure you want to reload?",
					Options = Message.OptionsEnum.YesNo,
					DefaultAccept = Message.OptionsEnum.Yes,
					DefaultCancel = Message.OptionsEnum.No,
				}.Show() != Message.OptionsEnum.Yes)
					return;
			}

			OpenFile(FileName, codePage: result.CodePage);
		}
		void Command_File_Encoding_Encoding(EncodingDialog.Result result) => CodePage = result.CodePage;