Пример #1
0
        private async void ButtonStart_Click(object sender, RoutedEventArgs e)
        {
            model.IsBusy    = true;
            model.forceStop = false;

            for (int i = 0; i < model.Queue.Count; i++)
            {
                ListQueue.ScrollIntoView(model.Queue[i]);

                if (!model.Queue[i].IsRemote)
                {
                    await model.SendFile(model.Queue[i]);
                }
                else
                {
                    await model.ReceiveFile(model.Queue[i]);
                }

                if (model.forceStop)
                {
                    break;
                }

                model.Queue.Remove(model.Queue[i]);
                i--;
            }

            model.IsBusy = false;

            model.NavigateLocal(model.LocalPath);
            model.NavigateRemote(model.RemotePath);
        }