public override bool Save(TextView.DecompilerTextView textView) { EmbeddedResource er = r as EmbeddedResource; if (er != null) { SaveFileDialog dlg = new SaveFileDialog(); dlg.FileName = DecompilerTextView.CleanUpName(er.Name); if (dlg.ShowDialog() == true) { Stream s = er.GetResourceStream(); s.Position = 0; using (var fs = dlg.OpenFile()) { s.CopyTo(fs); } } return(true); } return(false); }
/// <summary> /// Used to implement special save logic for some items. /// This method is called on the main thread when only a single item is selected. /// If it returns false, normal decompilation is used to save the item. /// </summary> public virtual bool Save(TextView.DecompilerTextView textView) { return(false); }
public virtual object GetViewObject(TextView.DecompilerTextView textView) { return(null); }
/// <summary> /// Used to implement special save logic for some items. /// This method is called on the main thread when only a single item is selected. /// If it returns false, normal decompilation is used to save the item. /// </summary> public virtual Task <bool> Save(TextView.DecompilerTextView textView) { return(Task.FromResult(false)); }
/// <summary> /// Used to implement special view logic for some items. /// This method is called on the main thread when only a single item is selected. /// If it returns false, normal decompilation is used to view the item. /// </summary> internal virtual bool View(TextView.DecompilerTextView textView) { return(false); }
public override bool Save(TextView.DecompilerTextView textView) { Save(); return(true); }