Пример #1
0
        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);
        }
Пример #2
0
 /// <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);
 }
Пример #3
0
 public virtual object GetViewObject(TextView.DecompilerTextView textView)
 {
     return(null);
 }
Пример #4
0
 /// <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));
 }
Пример #5
0
 /// <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);
 }
Пример #6
0
 public override bool Save(TextView.DecompilerTextView textView)
 {
     Save();
     return(true);
 }