ScriptUO

Casa de TrailMyx => Programming / Operating Systems => .NET Programming => Topic started by: Scrripty on March 18, 2011, 12:54:47 AM

Title: Who?
Post by: Scrripty on March 18, 2011, 12:54:47 AM
Who are all the c# programmers here?  I'm having a lot of fun in visual studio 2010.  Damn they made it easy.  A trained monkey could probly get an 80k job doing this...  Designing menus in 2010 is a breeze...  And the damn thing nearly codes everything you need itself.  Crazy.  Who's got the coolest free c# code repository websites bookmarked? :)
Title: Re: Who?
Post by: gimlet on March 18, 2011, 06:05:39 AM
I'd start here if you haven't already been here.

http://en.csharp-online.net/CSharp_Code_Snippets#C.23_Code_snippets_.2F_C.23_Examples_.2F_C.23_Samples (http://en.csharp-online.net/CSharp_Code_Snippets#C.23_Code_snippets_.2F_C.23_Examples_.2F_C.23_Samples)


and then look here

http://www.tenouk.com/cpluscodesnippetnew/ (http://www.tenouk.com/cpluscodesnippetnew/)
Title: Re: Who?
Post by: Scrripty on March 18, 2011, 11:20:45 AM
I'd start here if you haven't already been here.

http://en.csharp-online.net/CSharp_Code_Snippets#C.23_Code_snippets_.2F_C.23_Examples_.2F_C.23_Samples (http://en.csharp-online.net/CSharp_Code_Snippets#C.23_Code_snippets_.2F_C.23_Examples_.2F_C.23_Samples)


and then look here

http://www.tenouk.com/cpluscodesnippetnew/ (http://www.tenouk.com/cpluscodesnippetnew/)

Ohhh that first one is very nice. :)  Thanks.
Title: Re: Who?
Post by: TrailMyx on March 18, 2011, 11:59:10 AM
That's also why I really loved the UOMachine project.  Too bad Xenoglyph has disappeared.  His project was really darn cool!!!

All the power of a client interface wrapped with all the power of .NET Forms!  That's just sexy.

Actually, if you follow the work of BTBN at EasyUO, he's done some interfacing between C# and OpenEUO.

If his editor did reflection/autocompletion, would have never started using LuaEUO.  But it was hard to script/debug without being able to have autocompletion from assemblies.
Title: Re: Who?
Post by: Scrripty on March 18, 2011, 01:26:48 PM
That's also why I really loved the UOMachine project.  Too bad Xenoglyph has disappeared.  His project was really darn cool!!!

All the power of a client interface wrapped with all the power of .NET Forms!  That's just sexy.

Actually, if you follow the work of BTBN at EasyUO, he's done some interfacing between C# and OpenEUO.

If his editor did reflection/autocompletion, would have never started using LuaEUO.  But it was hard to script/debug without being able to have autocompletion from assemblies.

I seriously like typing one or two letters and hitting tab. :)  It's shorthand on crack!
Title: Re: Who?
Post by: Scrripty on March 18, 2011, 07:08:43 PM
I mean seriously... how easy is this?  Half a day of playin around learning the whereabouts of the interface and what the commands do?  I can't believe it's that easy...  Do you have 2010?  Cause 2010 Ultimate is very nice. 
Title: Re: Who?
Post by: TrailMyx on March 18, 2011, 07:13:34 PM
I've played with 2010 a bit, but since it's not mainstream (most people are still only used to .NET 2.0) I do most of my development in 2005.  ScriptUO is still only .NET 2.0.

I try to keep compatible with Mono also, and 2010 kinda kills Mono.

Hmm, I wonder if I can even compile ScriptUO now that I've migrated to a new computer?

Actually, I really don't use Microsoft tools.  I still develop with SharpDevelop 3.0...
Title: Re: Who?
Post by: Scrripty on March 18, 2011, 07:52:13 PM
I've played with 2010 a bit, but since it's not mainstream (most people are still only used to .NET 2.0) I do most of my development in 2005.  ScriptUO is still only .NET 2.0.

I try to keep compatible with Mono also, and 2010 kinda kills Mono.

Hmm, I wonder if I can even compile ScriptUO now that I've migrated to a new computer?

Actually, I really don't use Microsoft tools.  I still develop with SharpDevelop 3.0...

Well it's all backwards compatible by drop down menu isn't it?  I can setup the actual code to be compatible with 08 or 05 or .net 2.0 or whatever by drop down menu I thought...?  I've been having too much fun playing with the newest tools tho.  That file there was all cut and paste.  I didn't have to code really much of anything.  Amazing how simple it is.
Title: Re: Who?
Post by: TrailMyx on March 18, 2011, 08:16:58 PM
Not really.  It's all about what .NET revision you have installed.  Since not everyone has .NET 4.0 installed, it can be annoying to try and distribute programs that try and push the envelope.  So for ScriptUO, I kept in sync with Razor since that was going to drive the UO crowd within the .NET framework.

Having said that, left to play with things, I wish the OEUO community would think more seriously about using modern .NET in the scripting sphere.  Like you're experiencing, it's a joy to use, but Cheffe consistently pisses all over it.  Shame really since .NET really solves most of the existing OEUO UI issues.

Cheffe has made it abundantly clear his disdain of the .NET architecture, so I'm not filled with hope for .NET compatibility.

With all that said, I still have fun with .NET daily, and because of that, I make waaay more than 80K/yr.  ;)
Title: Re: Who?
Post by: gimlet on March 18, 2011, 08:36:16 PM
When i wrote the crystal porter I didnt know any better and set to use  net 4  as the default (with visual studio 2010).

I now have switched to netframework 2 as my default for all I write - the code size is a bit bigger but i'll trade that so people dont have to install another program so they can use mine.

I am attaching a picture of my next release that will work with both the classic and enhanced client and should be released in a few days.
Title: Re: Who?
Post by: Scrripty on March 18, 2011, 08:43:24 PM
I've never been concerned with what other people do.  I write for me first and foremost.  Next is everyone else... heh  I should probly stop now and go back then to 2.0 tho since it's still the most compatible with most, and is the most marketable skill still. :)
Title: Re: Who?
Post by: TrailMyx on March 18, 2011, 08:54:14 PM
You can/should use the latest tools like you're doing, but if you intend to distribute, you should build for 2.0.  Normally, it's not a big deal, but if you link in methods that rely on >2.0, then you won't be able to distribute.  

I try to build first for everyone else since sometimes it's difficult to backtrack from the sweetness of 4.0.  If I stick with 2.0, then it's easy to publish.  When I build ScriptUO, I compile theSharpDevelop Editor with 2.0 then I compile all my ScriptUO code with 2.0.

But anyhow, because of ScriptUO, I have to think of the masses before I think of me.... ;)
Title: Re: Who?
Post by: Scrripty on March 19, 2011, 01:21:40 AM
I'll develop what I'm working on for more people after I get the hang of object oriented programming a bit better. :)  The whole namespace thing is a bit much to consume when you're learning from scratch. heh  It's all easy so far from what I've learned, it's just pushing out my comfort zone with it from a very small zone.  And learning the most usefull commands inside and out from the thousands and thousands of commands available.  Its wierd getting used to the bracketing of EVERYTHING too and I still have a bit of trouble with the caps/non caps thing.  Ugh.  I'm so used to just breezing through typing without a worry about capitalization until the end. :)
Title: Re: Who?
Post by: Scrripty on March 19, 2011, 02:41:15 AM
I found an amazing book and I thought I'd share. :)  Thinking In C Sharp.  Revision 1.  By Bruce Eckel.  Amazing descriptions.  Probly best for someone with a BIT of experience tho.  You probly need to have the basic concepts down before reading it.  If you can't see why this is a GREAT example, probly not for you yet. heh

Code: [Select]
Type name:
Light

Interface:
On()
Off()
Brighten()
Dim()

Light lt = new Light();
lt.On();
Title: Re: Who?
Post by: gimlet on March 19, 2011, 03:46:40 AM
I found an amazing book and I thought I'd share. :)  Thinking In C Sharp.  Revision 1.  By Bruce Eckel.  Amazing descriptions.  Probly best for someone with a BIT of experience tho.  You probly need to have the basic concepts down before reading it.  If you can't see why this is a GREAT example, probly not for you yet. heh

Code: [Select]
Type name:
Light

Interface:
On()
Off()
Brighten()
Dim()

Light lt = new Light();
lt.On();



hehehehehehehehe - a whole lotta light and dark going on
Title: Re: Who?
Post by: UOMaddog on March 19, 2011, 08:31:24 PM
Any one of you C# guru's want to write up a web service for me?? All my previous web services have been done in Java, but our new client runs everything on Windows Server 2008 (64) with IIS 7.0 so we need a web service in C# to run on it. Basically just consume requests, query a SQL database, and spit back the responses. Very basic, but it's been forever since I've done anything in C (or C++/C#)

I can probably even get you a paycheck for it!!

PM me if interested!
Title: Re: Who?
Post by: foobio on April 28, 2012, 05:12:34 PM
All this talk about .NET lib versions and nothing about how much WinForms Sucks ... USER32.dll should swim with the fishes.

Personally, have found better alternatives in WPF and Silverlight.  UIs are much cleaner and behave much better under different resolutions.  Faster, cleaner ... better.

And, of course, XAML just sounds cool (zammel).

Oh, and by the way ... I have migrated to .NET 4.0 on all my projects that use MS technology.  Much more optimized under the hood and the WCF enhancements make it well worth the migration since I am working a great deal in Web Service land. 

Of course - I do shy away from the stock MS stuff and deal more with Infragistics, Telerik, and ComponentOne.

Data grids in Microsoft land make databinding feel like chewing on tinfoil.
Title: Re: Who?
Post by: TrailMyx on April 29, 2012, 10:19:47 PM
Do you have some links or advice for the things you mentioned?  I'm always looking for some good new tools to play with.
Title: Re: Who?
Post by: foobio on April 30, 2012, 11:32:51 AM
There is a good overview of WPF on MSDN:

http://msdn.microsoft.com/en-us/library/ms754130.aspx

What I like about WPF is that the underlying graphics technoligy is NOT GDI/GDI+ ... it is DirectX.  Better yet ... it bases its scaling on a system DPI setting versus the physical display.  This makes UIs much more sane.

In terms of UI ... even the lamest of appications can get anti-aliasing and transparency and transforms the work to the graphics card.  However - if you aren't at vista or better ... you aren't getting the benefits of WDDM (Windows Display Driver Model) since the older OS don't support it.

There is much good in WPF .. Silverlight is a step up on it.  In WPF, you have the DirectX dependency which limits you to MS platforms.  The eventing model is better as well ...

In Silverlight - drawing is further abstracted.  THis provides some more open platform independence.  Silverlight has an oper-source counterpart "Moonlight" based on the Mono project.   Outside of Visual Studio ... haven't really played with any open source alternatives.  In my day job ... I use Visual Studio 2K10.


http://www.silverlight.net/

The link above is where you can snag the SDK and other useful tools.

In both cases they are based on XAML (Extensible Applications Markup Language) ...   (pronounced zammel) ...  the link provided above gives a brief overview of XAML. 

I like XAML since it completely decouples the business logic of drawing the UI from the code.  For example - winforms ... everything is C# or your favorite managed language and it is defined in code.  As you drop stuff on the design surface ... it becomes part of the class.

Thus - you compile it ... the UI is pretty much as ugly as you make it.  Personally - I have the artistic sense of a rock and many may think my choices of styles and colors suck.

With XAML you can quickly alter the look and feel without dipping into the code and refactor the UI without having to dig in the logic.

HTML 5 is the next step ... it is XAML like in the way it is structured.  The distinction is that it further abstracts the concepts of drawing canvas and applications.  Have just started playing with this ... but I would guess it is going to get more traction since an abstract drawing canvas and UI layer makes a really broad application possible.  i.e. Android, MacOS, JVM, Windoze, Linux would run the engines that do the bindings to the OS and the underlying engines and a common application would be run in the environment of the host.

In terms of my programming tools mentioned i.e. Infragistics, Telerik, ComponentOne ...

www.infragistics.com
www.telerik.com
www.componentone.com

They are all just providers of libraries for different technologies ranging from Winforms to Silverlight to HTML 5 frameworks.  Licenses for these cats ain't exactly cheap ... but if you are doing some coding for profit ... they do offer some really lightning fast alternatives to stock MS stuff.

And, of course, I can always be pursuaded to build a DLL based on some of their stuff which can provide better functionality when required, hehe.