예제 #1
0
 private void cSize_UpdateFieleSum(long sum)
 {
     this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart) delegate()
     {
         //txtSize.Text = SizeFileInString.GetSizeInStr(sum);
         ccSize.Content = SizeFileInString.GetSizeInStrWPF(sum);
     }
                            );
 }
예제 #2
0
        public void SetData(CustomFileSystemCover fsCover)
        {
            if (fsCover.GetType() == typeof(DirectoryCover))
            {
                //txtSize.Text = LanguagesManager.GetCurrLanguage().SPDir;
                ccSize.SetResourceReference(ContentControl.ContentProperty, "SPDir");

                btnSumCalculate.MinWidth        = 20;
                btnSumCalculate.BorderThickness = new Thickness(4);
                btnSumCalculate.Visibility      = System.Windows.Visibility.Visible;
            }
            else if (fsCover.GetType() == typeof(FileCover))
            {
                FileInfo fi = (FileInfo)fsCover.FileSystemElement;

                //txtSize.Text = SizeFileInString.GetSizeInStr(fi.Length);
                ccSize.Content = SizeFileInString.GetSizeInStrWPF(fi.Length);

                btnSumCalculate.BorderThickness = new Thickness(0);
                btnSumCalculate.MinWidth        = 0;
                btnSumCalculate.Width           = 0;
                btnSumCalculate.Visibility      = System.Windows.Visibility.Hidden;
            }
        }