public override void LoadDataAsync(LoadCommand cmd, LoadDataAsyncParameters cmdParam, Action<PaneViewModelBase> success = null, Action<PaneViewModelBase, Exception> error = null)
 {
     base.LoadDataAsync(cmd, cmdParam, success, error);
     switch (cmd)
     {
         case LoadCommand.Load:
             WorkHandler.Run(
                 () =>
                 {
                     _packageContent = (BinaryContent)cmdParam.Payload;
                     _stfs = ModelFactory.GetModel<StfsPackage>(_packageContent.Content);
                     return true;
                 },
                 result =>
                     {
                         IsLoaded = true;
                         Tabs.Add(new ProfileRebuilderTabItemViewModel(Resx.FileStructure, ParseStfs(_stfs)));
                         SelectedTab = Tabs.First();
                         if (success != null) success.Invoke(this);
                     },
                 exception =>
                 {
                     if (error != null) error.Invoke(this, exception);
                 });
             break;
     }
 }
Пример #2
0
 public void LoadPackage(BinaryContent content)
 {
     _contentType = content.ContentType;
     _stfs = ModelFactory.GetModel<StfsPackage>(content.Content);
 }