Ejemplo n.º 1
0
        //----< handle selections in files listbox >---------------------

        private void Files_SelectionChanged(
            object sender, SelectionChangedEventArgs e
            )
        {
            if (unselecting)
            {
                unselecting = false;
                return;
            }
            if (Swin == null)
            {
                Swin = new SelectionWindow();
                Swin.SetMainWindow(this);
            }
            Swin.Show();

            if (e.AddedItems.Count == 0)
            {
                return;
            }
            string selStr = e.AddedItems[0].ToString();

            selStr = System.IO.Path.Combine(Path, selStr);
            if (!SelectedFiles.Contains(selStr))
            {
                SelectedFiles.Add(selStr);
                Swin.Add(selStr);
            }
        }
Ejemplo n.º 2
0
        //----< shut down the SelectionWindow if open >------------------

        private void Window_Unloaded(object sender, RoutedEventArgs e)
        {
            Swin.Close();
        }