Example #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;
            }
        }
Example #2
0
        private void UsersControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Cursor = Cursors.Wait;

            var context = (MainViewModel)DataContext;

            context.SetUserSelected();
            GroupsControl.UpdateLayout();

            Cursor = Cursors.Arrow;
        }
Example #3
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;
        }