Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Drawing;
- using System.IO;
- using System.Windows.Forms;
- namespace IDForm
- {
- public partial class shitsauce : Form
- {
- public shitsauce()
- {
- InitializeComponent();
- }
- private void bitch_Click(object sender, EventArgs e)
- {
- string name = "", address = "", phone = "", dob = ""; //path = "C:/" <== got an access denied for this one..the fuck is that bullshit?
- //long dob = 0;
- name = bawxname.Text;
- address = bawxaddress.Text;
- phone = bawxphone.Text;
- dob = bawxdob.Text;
- //dob = long.Parse(dob.Text); <== Attempted parsing of data types, but that went to horseshit. Im starting to hate me...
- SaveFileDialog n = new SaveFileDialog();// I hate you....
- FileStream rawr = File.Create("C:/users/chris/desktop/fuckshitup.txt");
- //I think because FileStream requires a path overload, it could be conflicting with my SaveFileDialog, but then how do I write the file?
- BinaryWriter write = new BinaryWriter(rawr);
- write.Write(name);
- write.Write(address);
- write.Write(phone);
- write.Write(dob);
- rawr.Close(); //<==Originally tried commenting this out for the save file dialog, but no go there...
- n.FileName = "Document"; //fucking dialog wont allow me to select a file type...
- n.DefaultExt = ".text"; //Docs said this would allow me to default the extension..they were full of shit
- n.Filter = "Text documents (.txt)|*.txt"; //Again, more bullshit. Didnt do anything
- /*
- Nullable<bool> horseshit = n.ShowDialog(); <==got a fucking error for the ShowDialog...what the FUCK?!?! The docs had it EXACTLY like this
- // Configure save file dialog box
- Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
- dlg.FileName = "Document"; // Default file name
- dlg.DefaultExt = ".text"; // Default file extension
- dlg.Filter = "Text documents (.txt)|*.txt"; // Filter files by extension
- // Show save file dialog box
- Nullable<bool> result = dlg.ShowDialog();
- // Process save file dialog box results
- if (result == true)
- {
- // Save document
- string filename = dlg.FileName;
- }
- if (horseshit == true)
- {
- string
- }
- StreamWriter fuck = File.CreateText(path); <== access denied error to C:/ and all paths within
- fuck.Write(name);
- fuck.Write(address);
- fuck.Write(phone);
- */
- }
- private void textFileToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string name = "", address = "", phone = "", dob = "";
- name = bawxname.Text;
- address = bawxaddress.Text;
- phone = bawxphone.Text;
- dob = bawxdob.Text;
- FileStream rawr = File.Create("C:/users/chris/desktop/fuckshitup.txt");
- BinaryWriter write = new BinaryWriter(rawr);
- write.Write(name);
- write.Write(address);
- write.Write(phone);
- write.Write(dob);
- rawr.Close();
- }
- private void exitProgramToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement