Jump to content
Xtreme .Net Talk

bpayne111

Avatar/Signature
  • Posts

    335
  • Joined

  • Last visited

Everything posted by bpayne111

  1. i'm using divils article to teach me how to do plug ins.... I've gotten stuck... This is my main file where i'd like to use the plug... the rest of the files mimic divil's *note i removed his form and included that in the 'main' file. i hope this code is enough public class jrnMain { public static void Main() { jrn.IjrnHost objHost = new jrn.Host(); int index; //get a list of plugins jrn.PlugServices.availablePlug[] plugins = jrn.PlugServices.findPlug(Path.GetDirectoryName(Application.ExecutablePath), "jrn.IjrnPlug"); //loop through available plugins, creating instances and adding them to listbox for(index = 0; index <= plugins.Length - 1;index++) { jrn.IjrnPlug objPlug; objPlug = (jrn.IjrnPlug)PlugServices.CreateInstance(plugins[index]); objPlug.Initialize(objHost); Console.WriteLine(((jrn.IjrnPlug)objPlug).Name()); }//for } }//class I get the following error "object reference not set to an instance of an object" on the line Console.WriteLine( .....Name); I understand what that error means but i don't get how i'm supposed to create an instance. In Divil's vb version he does a DirectCast. Which ithought my line of code was the = of. I'm just confused. I had all this working at one point now it's seems shot. Any ideas? thanks brandon
  2. it wont' allow the semicolon... if i remove that, well it obviously doesn't work in my interface ... what's the deal? thanks for the help brandon
  3. I created an icon in vs.net using it's supplied editor. When set the icon property on my form to this icon... it doesn't display my icon correctly. It displays an 'icon, icon'.to explain, when you create a new icon file in vs.net there is an image beside it in the template list that represents the icon. This is the image showing up instead of my icon. Why? thanks brandon
  4. public interface myPlug { void Initialize(test.IHost host); string Name { get{} }; void Go(object[] objs); } joe i was not allowed to create a readonly property this way for Name. there has to be a way to do it... arrrg thanks brandon
  5. I'd like my client/server app to be 'bandwidth friendly'. What i mean is, i'd like my client to check how 'busy' it's internet connection is and have it sit back and wait for the traffic to slow down before it does it's job. I'd like to do this because my clients use dial up for email and virus updates. When both of these go at once... it gets nasty. Any ideas?
  6. yes i think you are right... i will probably change it thanks brandon
  7. thansk for you your help... i figured it out after some more time i just used a function instead of a readonly property... DOH!
  8. public interface myPlug { void Initialize(test.IHost host); readonly string Name(); void Go(object[] objs); } blue squiggly on 'Name' "The modifier 'readonly' is not valid for this item" Why? what's wrong with this? i feel small Brandon
  9. just what i needed guys. thanks brandon
  10. How can i add a switch to my console app. ie myapp/? would display help about my app (hmm look familiar to anyone?) thanks brandon
  11. I'd like the ability to automatically burn certain files on a cd from an app. I'd also like to password protect all folders on the cd. I don't even know where to begin to look. There has to be a dll somewhere with some quick easy ways to go about this. any ideas? brandon
  12. actually i'm looking for the 'name' of the adapter. i got the value i want but it took 100 lines of code to do it thanks for the link though i'll keep that code on file brandon
  13. as long as my integer of 1000 is a dword i'm happy thanks man brandon
  14. I don't see why that is a dword value? it would seem you need to specify 'dword' somewhere in the code. What am i missing?
  15. C# string s = "abc{e4e5f4} def"; I have this string and i'd like to extract the string between { }. Can Regex do this for me quick and easy? thanks brandon
  16. thanks for the help guys i'm switching to Regex i think it seems more fit to do the job i want thanks brand0on
  17. i can make the mail send easy as regular smtp.work.com but if my user is connected to our vpn (and they will be) i can't send the mail users connect to the vpn solely for the purpose of email. i'll check the link
  18. SmtpServer is a string propterty of SmtpMail not it's own object :( so msexchange server mail will work using hte smtp objects? it seems something is missing thanks for the help brandon
  19. why won't this text split correctly? temp2 ="Description . . . . . . . . : Wireless USB Adapter"; if(temp2.StartsWith("Description")) { string[] splitText; char[] splitter = new char[':']; splitText = temp2.Split(splitter); Console.WriteLine(splitText[0]); } i'm stuck... any help?
  20. CHEERS to you and that wonderful code... that's just what i needed
  21. it's not the mac address it's some big long crazy hex number (like 25 digits) that is sort of the 'name' of the adapter ie the 'Ethernet Adapter LAN' line (or similiar) thanks for the link i'll check it out
  22. there is this stupid hex value in ipconfig that i need to get in code somehow. (no it's not an ip and no i'm not trying to take over the world) what i'd like to do is run ipconfig in code somehow and stream it's output into a variable so i can find this stupid hex thing and store it. i'll be glad to give my legitimate reason for doing this if you have the time to listen. (pm me or something so i don't spam the board) thanks brandon
  23. well i'm ipmorting System.Web in a Console App. Where do i input the user logon info? also i'd like to have the mail sent in the background so it doesn't bother them. will they know it's being sent? also do i just use the smtpServer object and put the vpn ip there instead of smtp.xxxx.com? thanks for your help brandon
  24. hey thanks... that's some great code but the mac address isn't what i'm looking for. the property i'm looking for well i'm not really sure of the name. (i can't even think of how to explain it) how could i make that return all properties for the adapter? so i can browse through them and get the thing i'm looking for? ohh and just so you know why i'm looking for this info... (to show it's for good purpose) i'm trying to check a registry entry for users on our vpn, to ensure it was input correctly. if not i want to add the value myself.) thanks brandon
  25. ok if you run ipconfig/all you'll see a line that says 'Ethernet Adapter' somtimes this adapter has a huge hex value next to it. i'd like to be able to run ip config and extract this crazy hex value from it. any ideas? thanks brandon
×
×
  • Create New...