C# Homework
Dec 6 2008, 2:11 am
By: ClansAreForGays  

Dec 6 2008, 2:11 am ClansAreForGays Post #1



Situation: I have 1 more homework assignment left in my C# class. This one deals with File streams. I have until 12 tonight EST to turn it in.

Dilemma: I've been playing Temple Siege.


Assignment Requirements: [attach=2158] (so that it doesn't showup in google search)

Solution: Here's what I have done so far. [attach=2159]


SEN is not your personal army, but it can be a miracle.




Dec 6 2008, 2:14 am ClansAreForGays Post #2



Would it help if I posted the streaming video of the solution?




Dec 6 2008, 2:15 am Matt Burch Post #3



If you think you're expecting us to do your homework for you while you play Temple Siege then I suggest you to think again.
If you were a little more specific of what you need help with, I might be able to post some info. Sucks that I don't have Windows XP running on my laptop anymore.



None.

Dec 6 2008, 2:27 am ClansAreForGays Post #4



Quote from Matt Burch
If you were a little more specific of what you need help with, I might be able to post some info.
No, I want you to do it for me.




Dec 6 2008, 2:43 am Matt Burch Post #5



The C# you are doing is specifically Windows Programming, not the C# mac version. I can be of no help without my Virtual Machine running. If I had a Windows XP install disc and or a serial number I could help.



None.

Dec 6 2008, 3:29 am cheeze Post #6



No you wouldn't Matt. Tell CAFG to go fail his class.



None.

Dec 6 2008, 3:36 am ClansAreForGays Post #7



Alright Alright.













... I'll give pix.




Dec 6 2008, 3:45 am Oyen Post #8



I know all about File Streams for C++. If I knew C# instead of C++, I gladly would have helped you. But Alas... :-_-:

Post has been edited 1 time(s), last time on Dec 6 2008, 3:53 am by Oyen.



None.

Dec 6 2008, 4:30 am ClansAreForGays Post #9



Starting to get the hang of it, but I don't think I'll be done by 12 :{




Dec 6 2008, 4:47 am Matt Burch Post #10



Post your code on pastebin.com and I'll see if I can help out at all.

I couldn't get filestreaming working properly with C++ in high school, so I don't know how much help I'll be, but I'll give it a shot.
What program are you told to be using?



None.

Dec 6 2008, 5:34 am ClansAreForGays Post #11



SaveFileDialog dialogNew = new SaveFileDialog();// my save dialog box stuff
dialogNew.CheckFileExists = false;//lets me make a new file (i think)

StreamWriter outStream2 = File.CreateText("c:\\temp\\" + dialogNew.FileName);//here's where I get an exception. Here I'm trying to make a test.txt file.

here I'm trying to make a text file in C:\temp\ but when I go to save, it says "The given path's format is not supported." It only seems to work when I have a file already created with the same name. I need to create a new file from nothing.




Dec 6 2008, 5:49 am ClansAreForGays Post #12



I thought I fixed it but I'm still getting the same error.
It's now:

FileStream output = new FileStream("c:\\temp\\" + dialogNew.FileName,FileMode.CreateNew, FileAccess.Write);




Dec 6 2008, 5:51 am ClansAreForGays Post #13



What's the difference between FileStream and streamWriter?




Dec 6 2008, 6:03 am A_of-s_t Post #14

aka idmontie

Are you using Visual C#? Becuase if you are, there's this nifty thing called tab that brings up an AWESOME box with all the stuff you can use. That was pretty much the point of making VISUAL C#, so that its pretty much idiot proof to code something.

As for your actual assignment, I COULD help you, but then again, why should I?



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Dec 7 2008, 5:07 am ClansAreForGays Post #15



Cuz you want hawt cafg pix?




Dec 7 2008, 5:13 am Matt Burch Post #16



I'll do this for you right now. I'll use Java and Swing instead of C#, though. :lol:



None.

Dec 7 2008, 6:05 am ClansAreForGays Post #17



I think I could do something with that, and I'd be learning it while trying to make it work for C#.




Dec 7 2008, 6:11 am ClansAreForGays Post #18





I have to make all those buttons do what they say.




Dec 7 2008, 7:09 am Matt Burch Post #19



I used NetBeans cuz i'm too lazy to do it all in BlueJ at the moment.
JAVA CODE: http://pastebin.com/m41a9bf91
Design: http://machost.exofire.net/design.png

I just used one window, because I didn't feel like making a popup window.

Whoops, didn't do the "Next Score" part yet, by opening the files.. Whatever, you can figure that one out yourself.



None.

Dec 7 2008, 7:54 pm A_of-s_t Post #20

aka idmontie

You really shouldn't do his homework for him... If I were a moderator of this forum, I would have actually closed this topic.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:47 pm]
NimoStar -- If its any consolation, the human brain would still mop the floor with this bot if it wasn't limited by the mechanical interface
[05:34 pm]
NimoStar -- Well. The bot didn't come up with any new strategy. It just has superhuman micro. Hard to beat that. I reckon even the simplest dedicated chess engines are unbeatable for humans now.
[02:13 pm]
Oh_Man -- all g
[10:54 am]
NudeRaider -- Oh_Man
Oh_Man shouted: NudeRaider did u watch the entire video? it's not one game. it's currently dominating the ladder at number 1 position. do ur research first!
Oops, caught me there, no I haven't. :( I was imagining how the game went. Sorry for that. Watching it now. brb
[10:52 am]
NudeRaider -- NimoStar
NimoStar shouted: They were not "Unprepared" that was their fifth loss in a row against the bot. The other replays are also available
that doesn't mean he was prepared. When humans come around with new strategies it often takes weeks until the pros figure out how to shut it down. Oh_Man that's certainly a way more convincing argument for micro being "too good to beat".
[09:43 am]
DiearAnother -- wirefram
[08:35 am]
NimoStar -- Well, pros showed that long ago... half of zerg pros just ling muta rush
[08:35 am]
NimoStar -- " its shown is that you can trade 1000's of apm to make up for lack of strategy"
[03:25 am]
Oh_Man -- https://youtu.be/R_6bsf9REkY anyone ever tried playing SC ghost?
Please log in to shout.


Members Online: O)FaRTy1billion[MM], Prankenstein