What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

HB explodes when using FileDialogs? (open/save)

z0mg

New Member
Joined
Jan 15, 2010
Messages
77
Reaction score
0
See thread title...

is it just something I'm doing wrong, or will those simply not work with the pluginsystem here (fu! :mad:;))?

quick demo of 1 of those dialogs (and crashes Honorbuddy when I open it, while it should work just fine):
Code:
            Stream SW;
            string storePath;
            SaveFileDialog dialog = new SaveFileDialog();
            dialog.Title = "Where do you want to save these settings?";
            dialog.AddExtension = true;
            dialog.DefaultExt = "talents";
            dialog.Filter = "Talent File (*.talents)|*.talents|Any (*.*)|*.*";
            dialog.RestoreDirectory = true;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                if ((SW = dialog.OpenFile()) != null)
                {
                    storePath = dialog.FileName;
                    StreamWriter wText = new StreamWriter(SW);
                    wText.WriteLine(talentBox.Text);
                    wText.Close();
                    SW.Close();
                }
            }

It appearently hates:
Code:
            if (dialog.ShowDialog() == DialogResult.OK)
Great :(.
</pre>
 
Last edited:
Back
Top