Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Handles creating new sessions from the selected files.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void HandleCreateSessionsButtonClick(object sender, EventArgs e)
        {
            Hide();

            using (var dialog = new MakeSessionsFromFileProgressDialog(_viewModel.GetSourceAndDestinationPairs(), _viewModel.CreateSingleSession))
            {
                dialog.ShowDialog(Form.ActiveForm);
            }
        }
 public void GetSourceAndDestinationPairs_UnselectedFileIsIgnored()
 {
     using (var temp = new TempFile())
     {
         //var path = _mainAppFldr.Combine("dog.wav");
         //File.CreateText(path).Close();
         var sessionFile = new NewSessionFile(temp.Path);
         sessionFile.Selected = false;
         using (var model = new NewSessionsFromFileDlgViewModel())
         {
             model.Files.Add(sessionFile);
             Assert.AreEqual(0, model.GetSourceAndDestinationPairs().Count());
         }
     }
 }