#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.0 KiB

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using System.Text;
using System.Windows;
using ICSharpCode.SharpDevelop;
namespace ICSharpCode.AvalonEdit.AddIn
{
/// <summary>
/// Interaction logic for ChooseEncodingDialog.xaml
/// </summary>
public partial class ChooseEncodingDialog : Window
{
public ChooseEncodingDialog()
{
InitializeComponent();
encodingComboBox.ItemsSource = SD.FileService.AllEncodings;
encodingComboBox.SelectedItem = SD.FileService.DefaultFileEncodingInfo;
}
public Encoding Encoding {
get { return ((EncodingInfo)encodingComboBox.SelectedItem).GetEncoding(); }
set { encodingComboBox.SelectedItem = SD.FileService.AllEncodings.Single(e => e.CodePage == value.CodePage); }
}
void okButton_Click(object sender, RoutedEventArgs e)
{
DialogResult = true;
Close();
}
}
}