Пример #1
0
        private async void LeftPanel_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var listView = sender as ListView;

            if (e.AddedItems.Count == 0)
            {
                return;
            }

            if (listView.SelectionMode == ListViewSelectionMode.Single)
            {
                using (ProgressManager pm = new ProgressManager(MainContent, ProgressLayer, ProgressRingHandler))
                {
                    foreach (File file in e.AddedItems)
                    {
                        if (file.IsDirectory)
                        {
                            await vm.ChangeLeftDir(file);
                        }
                        else
                        {
                            await vm.CopyToRigth(file);
                        }
                    }
                }
            }
            else if (listView.SelectionMode == ListViewSelectionMode.Multiple)
            {
                foreach (File file in e.AddedItems)
                {
                    if (file.IsDirectory)
                    {
                        listView.SelectedItems.Remove(file);
                    }
                }
            }
        }
Пример #2
0
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            vm = App.CommanderVM;

            DataContext = null;
            LeftFlipView.DataContext  = null;
            RightFlipView.DataContext = null;

            DataContext = vm;
            LeftFlipView.DataContext  = vm.LeftPanel;
            RightFlipView.DataContext = vm.RightPanel;

            MainContent.SelectedIndex = vm.CurrentActivePanel;

            await vm.ChangeLeftDir();

            await vm.ChangeRightDir();
        }
Пример #3
0
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            vm = App.CommanderVM;

            DataContext = null;
            LeftFlipView.DataContext = null;
            RightFlipView.DataContext = null;

            DataContext = vm;
            LeftFlipView.DataContext = vm.LeftPanel;
            RightFlipView.DataContext = vm.RightPanel;

            MainContent.SelectedIndex = vm.CurrentActivePanel;

            await vm.ChangeLeftDir();
            await vm.ChangeRightDir();
        }