CairoExplorer.Properties.InitWithFile C# (CSharp) Метод

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

public InitWithFile ( WrapperFileSystemInfo file, object caller ) : void
file WrapperFileSystemInfo
caller object
Результат void
        public void InitWithFile(WrapperFileSystemInfo file, object caller)
        {
            _file = file;
            _caller = caller;

            Name.Text = file.Info.Name;
            Type.Text = file.Type.BaseExtension;
            Size.Text = file.Size;
            DateModified.Text = "Last Modified " + file.Info.DateModified.ToFileDateTime();
            Title.Text = file.Type.Folder ? "Folder" : "File";
            Icon.Source = file.Icon;

            if(Window.IsActive)
                Show();
        }

Usage Example

Пример #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);
         }
     }
 }
All Usage Examples Of CairoExplorer.Properties::InitWithFile