Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

Ted On The Net

@Ted On The Net
About
Posts
14
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Objectmodeling C# issue..
    T Ted On The Net

    Anyone able to help me on this issue: http://www.codeproject.com/Messages/3485044/Design-issue-modified.aspx[^]

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# help csharp com design

  • Design issue [modified]
    T Ted On The Net

    Help! I'm having trouble reverse engineering the following to OO principles since I'm new to OO. We are rebuilding an old app which was built without any OO applied back in the day. It has a screen which lets us edit payment conditions. The form has a code, description and 2 more controls: an editbox (holds a number) and a combobox (payment condition). The combobox holds 3 values: "cash", "xx days after delivery", "xx months after develivery". In the editbox I can enter a numeric value between 1 and 99. If I select "cash" in the combobox, the editbox is disabled. if I select "xx days after delivery" the editcontrol hold 1..99 days. If I select "xx months after delivery" the value suddenly means 1..99 months. How should my objectmodel look in OO? I'm not sure how to implement the edit/combobox-combination of requirements. The combobox is a fixed value, but the edit makes it variable. Any help is appreciated. Regards, Ted

    - Life would be so much easier if I had the source code! - If Java had true garbage collection, most applications would delete themselves upon execution ;)

    modified on Thursday, May 27, 2010 7:54 AM

    Design and Architecture help java design business tutorial

  • How to get the execution folder if the file executed is in another folder?
    T Ted On The Net

    found it, this does the trick:

    Directory.GetCurrentDirectory();

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp tutorial question

  • How to get the execution folder if the file executed is in another folder?
    T Ted On The Net

    Hi, I want to make some app startup from the commandline no matter in which folder I am. So I was thinking of putting my executable in the c:\Windows folder. now if I start the exe from "C:\program files" I want to know this path instead of the Application.StartupPath (which returns "C:\Windows") Can anybody tell me how to get this path? Thanks. Ted

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp tutorial question

  • beginner question: foreach .. else?
    T Ted On The Net

    yes, it does. One could implement it like this:

    if (myProductSelection.Count() != 0)
    {
    //loop through products in selection
    foreach (var aProduct in myProductSelection)
    {
    Console.WriteLine("Found product:" + aProduct.Code);
    }
    }
    else
    {
    Console.WriteLine("No products found!");
    }

    But why should I? If the foreach loop doesn't get executed, I know I've got the same result as if I used the above if-statement. So imo this gives me redundant code. Or do you disagree?

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp question learning delphi linq

  • beginner question: foreach .. else?
    T Ted On The Net

    hi, I'm just learning C# after being a Delphi coder for waayyy to long :D I was wondering, why isn't it possible to use an else statement with the foreach statement? Check out my quick and dirty demo code:

    namespace ConsoleApplication
    {
    class Product
    {
    public string Code { get; set; }
    public string Description { get; set; }

    }
    
    class Program
    {
        static void Main(string\[\] args)
        {
            //create some enumerable list
            IEnumerable<Product> myProductList = new List<Product>
                                         {
                                             new Product() {Code = "CDR", Description = "CD-Rom"},
                                             new Product() {Code = "DVD", Description = "DVD-Rom"},
                                             new Product() {Code = "BRD", Description = "BlueRay Disc"},
                                         };
    
            //select some products with LINQ
            var myProductSelection = (from aProduct in myProductList where aProduct.Code.StartsWith("R") select aProduct);
    
            //Print header text
            Console.WriteLine("The products that were found:");
    
            //loop through products in selection
            foreach (var aProduct in myProductSelection)
            {
                Console.WriteLine("Found product: " + aProduct.Code);
            }
          
            //pause to check results
            Console.ReadKey();            
        }
    }
    

    }

    The above code returns nothing, since none of the product codes start with a "R". Would be nice if I could do this when my result is empty:

    //Print header text
    Console.WriteLine("The products that were found:");

    //loop through products in selection
    foreach (var aProduct in myProductSelection)
    {
    Console.WriteLine("Found product: " + aProduct.Code);
    }
    else
    {
    Console.WriteLine("No products were found!");
    }

    Just some ranting.. any good solutions to this unlike something like this?

    //Print header text
    Console.WriteLine("The products that were found:");

    int x = 0;
    //loop through products in selection
    foreach (var aProduct in myProductSelection)
    {
    x++;
    Console.WriteLine("Found product: " + aProduct.Code);
    }

    if (x > 0)
    Console.WriteLine("No products were found!");

    thx for any suggestions offered :)

    - Life would be so much easier if I had the source code! - If C#

    C# csharp question learning delphi linq

  • How to send commands to a running application from the command line?
    T Ted On The Net

    ok, I need to be more clear :D Our release build process (compile, build, create iso, etc) is run multiple times a day with the use of 4NT batch files on a server. During the process, notifications about the progress are sent to all developers informing them about new compiler errors, files being locked etc. This way the people who need to fix something know they have to and the build process can be fired up again ASAP. They receive these messages in a small receiver app using UDP. The messages are sent with a broadcaster app using command line parameters. In the batch files we just execute the broadcast tool with some parameters, it sends the message and shuts down again. (like: broadcast / broadcast error file not found: aFile.exe). The broadcaster and receiver tools are all built in Delphi. I want to rebuild it using C# as my first project (i'm currently making the transition from Delphi to C# guru (inhouse) :P) Do you get the idea now? :-) (hope so!)

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp help tutorial question

  • How to send commands to a running application from the command line?
    T Ted On The Net

    the command sent from commandline is part of a batchfile running. perhaps I should split the tool like i said in the reply to Eddy on the other thread.

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp help tutorial question

  • How to send commands to a running application from the command line?
    T Ted On The Net

    Perhaps it needed a little bit more explanation. In Delphi, I wrote a program for clients that listened to UDP. On the server I sometimes started a broadcaster (from the command line) to send a message to the clients (after sending the message the broacast app shuts down again). Now in C# I'm gonna rebuild this program. The client will be the same, but on the server the application will keep running because of added functionality. So, the app is a GUI app (dont know if it will be winforms or wpf yet) which will be running constantly. I just want to send some kind of command from the command line to the server and have the server app handle the messaging to the clients. Ofcourse, I could also split the server app in 2 programs (the original broadcaster) and another app to do the extra stuff. But the server app will also log the messages sent, so thats why i wanted to build one tool for the server which does all the work.. Better explained this way? or even more vague? :D Ted

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp help tutorial question

  • How to send commands to a running application from the command line?
    T Ted On The Net

    Hi, I want to be able to send commands to a running application from the command line. Is there a simple way to do this? Thanks in advance for any help. Ted

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp help tutorial question

  • Need help getting started with a broadcasting tool
    T Ted On The Net

    I got that far :S I need help getting started up with the whole communication stuff in WCF.

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp wcf sysadmin help question

  • Need help getting started with a broadcasting tool
    T Ted On The Net

    Hi, I'm quite new to the whole .NET/C# thingy (reading some books now) and I was thinking of something useful to build @ the office. This is - basically - what I've got in mind: We have a server on which we build our application. On the server, there should be an application running which accepts commands. The commands can be sent from an application every workstation has to run. If someone sends a command (like: start new build) this single person has to be notified if it was possible to start the command (perhaps there was a build already running?). If the command is executed, the app on the server has to broadcast a message to everybody who has the app running so they know a new build was started. At the moment all programmers log in to the server (via remote desktop) and double clicks an icon on the desktop. We - obviously - want to limit the access so programmers don't need to log in on the server. I am thinking of concepts like TCP/IP and/or WCF. Who can help me on my way? Where to start? Thanks in advance for any information given! Regards, Ted

    - Life would be so much easier if I had the source code! - If C# had true garbage collection, most applications would delete themselves upon execution ;)

    C# csharp wcf sysadmin help question

  • Translatable system?
    T Ted On The Net

    Hi, I was wondering if anyone can point me in the right direction. For our product, we need to implement a translation system for end-users. We want them to be able to change the labeling of fields and use their own "language" to make the app work for them. Different jobs take different jargon. Perhaps there is a way to achieve this using localization? Anybody wanna share their vision? Thanks in advance. Regards, Ted

    Life would be so much easier if I had the source code!

    C# question

  • Can anyone recommend a PC game? [modified]
    T Ted On The Net

    Well, all I can suggest at this moment are Bioshock, Enemy Territory: Quake Wars and the upcoming Call of Duty 4. Call of Duty has finally moved to a modern setting. Check out this demo level walkthrough: http://files.filefront.com/cod4mwwmv/;8791456;/fileinfo.html Damn, I didn't like the fixed paths through the Call of Duty games, but this one is the bomb!

    Life would be so much easier if I had the source code!

    The Lounge asp-net game-dev question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups