Пример #1
0
        private void FoldersControl_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var item = (FileSystemObjectInfo)e.NewValue;

            if (item != null)
            {
                Cursor = Cursors.Wait;

                var context = (MainViewModel)DataContext;

                // binding manually
                var info = item.FileSystemInfo;
                //context.SelectedFileSystemInfo = info;

                _preSelectPath = info.FullName; //TODO Save

                try
                {
                    StatusLastWrite.Text = info.LastWriteTime.ToString("dd.MM.yy HH:mm");
                    StatusPath.Text      = info.FullName;
                    StatusOwner.Text     = context.GetOwner(info);
                    context.SetPathSelected(info);
                }
                catch { } // Network disconnected

                RulesControl.UpdateLayout();
                UsersControl.UpdateLayout();
                GroupsControl.UpdateLayout();

                Cursor = Cursors.Arrow;
            }
        }
Пример #2
0
        public void Refresh()
        {
            Cursor = Cursors.Wait;

            var context = (MainViewModel)DataContext;

            //_preSelectPath = context.SelectedFileSystemInfo.FullName;
            FoldersControl.Items.Clear();
            InitializeFileSystemObjects();

            context.SetPathSelected();

            RulesControl.UpdateLayout();
            UsersControl.UpdateLayout();
            GroupsControl.UpdateLayout();

            Cursor = Cursors.Arrow;
        }