コード例 #1
0
 public void Export_NoCurrentSelection_Throws()
 {
     _model.ClearSelection();
     Assert.Throws <InvalidOperationException>(
         () => _model.ExportCurrentWritingSystemAsFile("a.ldml")
         );
 }
コード例 #2
0
        private void ExportMenuClick(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter           = "LDML files (*.ldml;*.xml)|*.ldml;*.xml|All files (*.*)|*.*";
            dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            dialog.RestoreDirectory = true;
            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                _model.ExportCurrentWritingSystemAsFile(dialog.FileName);
            }
        }