InitWithFile() публичный Метод

public InitWithFile ( WrapperFileSystemInfo file, object caller ) : void
file WrapperFileSystemInfo
caller object
Результат void
Пример #1
0
 private static void LoadWindow(WrapperFileSystemInfo path, Properties p, object caller, Point?pos)
 {
     p.WindowStartupLocation = WindowStartupLocation.Manual;
     p.Opacity = 1;
     if (pos != null)
     {
         p.Left = pos.Value.X;
         p.Top  = pos.Value.Y;
     }
     if (path != null)
     {
         p.CurrentPath = path.Info.Path;
         if (!path.Type.File)
         {
             CairoExplorerWindow.AsyncGetSizeOfDirectory(path.Info.Path, path, delegate(WrapperFileSystemInfo file, double size, object param)
             {
                 Application.Current.Dispatcher.Invoke(new Action(delegate()
                 {
                     file.ByteSize = size;
                     if (p.CurrentPath == file.Info.Path)
                     {
                         p.InitWithFile(file, caller);
                     }
                 }));
             });
         }
         else
         {
             p.InitWithFile(path, caller);
         }
     }
 }
 private static void LoadWindow(WrapperFileSystemInfo path, Properties p, object caller, Point? pos)
 {
     p.WindowStartupLocation = WindowStartupLocation.Manual;
     p.Opacity = 1;
     if (pos != null)
     {
         p.Left = pos.Value.X;
         p.Top = pos.Value.Y;
     }
     if (path != null)
     {
         p.CurrentPath = path.Info.Path;
         if (!path.Type.File)
             CairoExplorerWindow.AsyncGetSizeOfDirectory(path.Info.Path, path, delegate(WrapperFileSystemInfo file, double size, object param)
             {
                 Application.Current.Dispatcher.Invoke(new Action(delegate()
                 {
                     file.ByteSize = size;
                     if(p.CurrentPath == file.Info.Path)
                         p.InitWithFile(file, caller);
                 }));
             });
          else
             p.InitWithFile(path, caller);
     }
 }