Ejemplo n.º 1
0
        private async void HandleCopyDialogResults(global::SM.EventTypes.CopyDialogEventArgs copyEventAgrs)
        {
            if (copyEventAgrs.ConfirmationDialog == global::SM.EventTypes.ConfirmationDialog.OK)
            {
                FormProgress formProgress = new FormProgress();
                formProgress.Show();

                IEnumerable <string> selectedDirectories = _currentListView.Items.Cast <ListViewItem>().Where(x => x.Checked).Select(x => (x.Tag as Entity).Path);

                CancellationToken cancellationToken = new CancellationToken(false);
                await GetDirectoryAggregatorInfoAsync(selectedDirectories, cancellationToken).ConfigureAwait(true);

                global::Helper.EventAggregator.EventAggregator.Instance.UnSubscribe(_copyDialogSubscription);

                global::SM.EventTypes.CopyProgressEventArgs copyProgressEventArgs = new global::SM.EventTypes.CopyProgressEventArgs();
                copyProgressEventArgs.OperationStatus = global::SM.EventTypes.OperationStatus.Initiated;
                global::Helper.EventAggregator.EventAggregator.Instance.Publish(copyProgressEventArgs);

                string[] directories = _currentListView.Items.Cast <ListViewItem>().Where(x => x.Checked).Select(x => (x.Tag as Entity).Path).ToArray();
                _logger.Info("Copy: " + "Operation started.");
                await Task.Run(() => HelperIO.DirectoryCopy(directories, @"R:\", true, true)).ConfigureAwait(true);

                _logger.Info("Copy: " + "Operation ended successfully.");
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            HelperIO.PrintDirection();

            var  table = HelperMapTable.CreateTableMap();
            bool OK    = true;

            while (OK)
            {
                HelperMapTable.PrintTableMap(table);

                PositionMover.Movement(table);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Инициализация необходимых объектов.
 /// </summary>
 public UnpackerViewModel(IUnpacker unpacker, string name)
 {
     _unpacker = unpacker;
     _helperIO = new HelperIO();
     Name      = name;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Инициализация необходимых объектов для работы.
 /// </summary>
 /// <param name="name">Название стеганографического
 ///     алгоритма упаковки.</param>
 /// <param name="packer">Стеганографический упаковщик.</param>
 public PackerViewModel(IPacker packer, string name)
 {
     _packer   = packer;
     _helperIO = new HelperIO();
     Name      = name;
 }