Click here to Skip to main content
15,891,943 members
Home / Discussions / C#
   

C#

 
QuestionFloating window implementation using c# Pin
srikrishnathanthri27-Jun-16 19:49
srikrishnathanthri27-Jun-16 19:49 
QuestionNeed Help with Assignment board logic. Pin
Aspylacide27-Jun-16 15:38
Aspylacide27-Jun-16 15:38 
AnswerRe: Need Help with Assignment board logic. Pin
Gerry Schmitz27-Jun-16 19:52
mveGerry Schmitz27-Jun-16 19:52 
AnswerRe: Need Help with Assignment board logic. Pin
Nathan Minier28-Jun-16 1:49
professionalNathan Minier28-Jun-16 1:49 
AnswerRe: Need Help with Assignment board logic. Pin
BillWoodruff28-Jun-16 4:39
professionalBillWoodruff28-Jun-16 4:39 
GeneralRe: Need Help with Assignment board logic. Pin
Aspylacide28-Jun-16 13:34
Aspylacide28-Jun-16 13:34 
AnswerRe: Need Help with Assignment board logic. Pin
Aspylacide28-Jun-16 14:02
Aspylacide28-Jun-16 14:02 
SuggestionRe: Need Help with Assignment board logic. Pin
Aspylacide29-Jun-16 12:25
Aspylacide29-Jun-16 12:25 
Partial Answer to my question has been determined. All code below.
Basically, I need to create a person class, and a job class. The person class will have a null value for their job. The job class will specify what the job is, and logic for assignment. The person will then be assigned a job with the same name as their job class instance. The 'hook' will find the person obj with a job type, and then run it as an argument on the job class object.

C#
class Role
       {
           public string Baker { get; set; }
           public string fireFighter { get; set; }
           public string chief { get; set; }

           public string myName;

           public Role(string myName)
           {
               this.Baker = myName;
           }
       }
       static void Main(string[] args)
       {
           // Locate file list of analysts.
           // This is also the stream we will be reading from
           const string f = "textfile1.txt";
           // Declare new list
           List<string> lines = new List<string>();

           // User streamreader for disposing
           using (StreamReader r = new StreamReader(f))
           {
               // While Loop pattern
               string line;
               while ((line = r.ReadLine()) != null)
               {
                   // Insert My Logic here
                   //...
                   // Add current line to List obj
                   lines.Add(line);
               }
           }

           // Create an empty Role array for use by IcM connector
           List<Role> whoIs = new List<Role>();

           // use foreach statement to ceate a new list which contains both the name, and role of the person.
           foreach (string s in lines)
           {
               Role temp = new Role(s);
               whoIs.Add(temp);
               Console.WriteLine(temp.Baker); // Does output the correct names
           }

           // Console.WriteLine("Current Wokers and their Jobs; {0}", whoIs); not working

           whoIs.ForEach(Console.WriteLine); // Does not output names

           Console.ReadKey();

           // To locate a specific object within this list
           // Search by property itself
           Role assignTarget = whoIs.Find(x => x.Baker == "Corey");

           assignTarget.fireFighter = "BatMan";

           Console.WriteLine("Corey is {0} ", assignTarget.fireFighter);

           Console.ReadKey();
       }
   }

Questionc# project Pin
Member 1260671027-Jun-16 11:21
Member 1260671027-Jun-16 11:21 
AnswerRe: c# project Pin
OriginalGriff27-Jun-16 19:44
mveOriginalGriff27-Jun-16 19:44 
QuestionCreate update for your program in C# Pin
Bilal PC27-Jun-16 9:32
Bilal PC27-Jun-16 9:32 
AnswerRe: Create update for your program in C# Pin
Dave Kreskowiak27-Jun-16 10:00
mveDave Kreskowiak27-Jun-16 10:00 
GeneralThis question is removed Pin
lokeshnj27-Jun-16 4:32
lokeshnj27-Jun-16 4:32 
AnswerRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Eddy Vluggen27-Jun-16 7:29
professionalEddy Vluggen27-Jun-16 7:29 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Jim_Snyder30-Jun-16 4:18
professionalJim_Snyder30-Jun-16 4:18 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Eddy Vluggen30-Jun-16 4:21
professionalEddy Vluggen30-Jun-16 4:21 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Jim_Snyder30-Jun-16 4:27
professionalJim_Snyder30-Jun-16 4:27 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Eddy Vluggen30-Jun-16 7:58
professionalEddy Vluggen30-Jun-16 7:58 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Jim_Snyder1-Jul-16 3:13
professionalJim_Snyder1-Jul-16 3:13 
GeneralRe: I have requirement to compare two list or any container which is feasible for the requirement in C#.net Pin
Jim_Snyder30-Jun-16 4:33
professionalJim_Snyder30-Jun-16 4:33 
Questionhow to fire up the message receive handler on runtime? Pin
Member 1255232425-Jun-16 23:46
Member 1255232425-Jun-16 23:46 
AnswerRe: how to fire up the message receive handler on runtime? Pin
OriginalGriff26-Jun-16 1:13
mveOriginalGriff26-Jun-16 1:13 
QuestionCommand Binding Pin
Member 1245711024-Jun-16 3:46
Member 1245711024-Jun-16 3:46 
AnswerRe: Command Binding Pin
Gerry Schmitz24-Jun-16 4:21
mveGerry Schmitz24-Jun-16 4:21 
AnswerRe: Command Binding Pin
Bernhard Hiller26-Jun-16 21:11
Bernhard Hiller26-Jun-16 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.