wexoni

wexoni


  • Name: [not set]
  • Favorite Languages: [not set]
  • Website: [not set]
  • Location: [not set]
  • About Me: [not set]

Recent Comments

  • Getting values from the list
    07/06/2010 - 15:48

    Thank you very much :)

  • Getting values from the list
    06/26/2010 - 16:08

    It's me again :)

    i was thinking and thinking, and thought about LINQ.

    This is code that I used with success to get that data:

      var Members= from actors in M.Cast


                              select new { actors.Name };

                           

                foreach (var result in Members)
                {
                    MessageBox.Show(result.Name);
                    glumci.Text = result.Name;
                   
                }

     

    VERY BIG quesito now, is this the proper way to do it?

    Is there another better way?

    thank you :)

  • C# Tutorial - Generic List
    06/16/2010 - 08:35

    YOU ARE THE BEST.

    I was making a complex wpf animation that uses generic lists... and I was having a issue how to access a specific element of the list... I looked and looked, and as usually the answer was right here on this site.

    Simple as this theList[0];

    Thank you again

  • Suggestion for new tutorial
    05/27/2010 - 12:16

    I am interested in using c#.

    You are absolutely correct, but at least could you make tutorial with one example. For example log in to .php powered login page.

    That would be great tutorial as a starter point. People would have to figure out on their own how to send data to another log in systems.

  • Suggestion for new tutorial
    05/26/2010 - 13:16

    Last post was by me. Sorry I did not notice I was not logged in.

  • WPF binding textbox to database
    05/17/2010 - 15:29

    I have checked the tutorial you provided, and it is extremely difficult for the simple thing that i need. I appreciate your time in making it.

  • WPF binding textbox to database
    05/17/2010 - 15:11

    Before you posted your reply, I have figured a way to do it.

    I am going to read the tutorial and try to implement it.

    I do not feel comfortable with DataContext solution.

    It seemed that I need to use DataContext for that thing

     
    DataContext = etoga.datatable();

    And this is new xaml code:

    <TextBox Text="{Binding Path=ID}" Height="23" HorizontalAlignment="Left" Margin="110,66,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" />
            <TextBox Text="{Binding Ime}"  Height="23" HorizontalAlignment="Left" Margin="110,111,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" />
            <TextBox Text="{Binding Prezime}" Height="23" HorizontalAlignment="Left" Margin="110,153,0,0" Name="textBox3" VerticalAlignment="Top" Width="120" />
            <TextBox Text="{Binding Pozicija}" Height="23" HorizontalAlignment="Left" Margin="110,194,0,0" Name="textBox4" VerticalAlignment="Top" Width="120" />

  • C# Snippet Tutorial - Custom Event Handlers
    05/17/2010 - 14:20

    And again thank you so much.

    I would like to thank you for your time maintaining this web site. For dedicating your free time to help us, with these tutorials that are best on the web.

    Every single text here, is understandable and easy to follow.
    Have you thought about publishing a book?

    I know that this is my first web site to check every morning.

    Keep on doing great things, and as soon as I have something to publish, I will do it here :)

  • C# Snippet Tutorial - Custom Event Handlers
    05/17/2010 - 10:35

    Thank you for fast reply :)

    Here is my class code:

     
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace events
    {
        public class Car
        {
            public delegate void OwnerChangedEventHandler(string newOwner);
            public event OwnerChangedEventHandler OwnerChanged;


            private string make;
            private string model;
            private int year;
            private string owner;

            public string CarMake
            {
                get { return this.make; }
                set { this.make = value; }
            }

            public string CarModel
            {
                get { return this.model; }
                set { this.model = value; }
            }

            public int CarYear
            {
                get { return this.year; }
                set { this.year = value; }
            }

            public string CarOwner
            {
                get { return this.owner; }
                set
                {
                    this.owner = value;
                    if (this.OwnerChanged != null)
                        this.OwnerChanged(value);
                }
            }

            public Car()
            {
            }
        }
    }

    And here is form code.

     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace events
    {

       
        public partial class Form1 : Form
        {

             
           
            public Form1()
            {
                InitializeComponent();

                 
            }
            Car car = new Car();
         

            private void button1_Click(object sender, EventArgs e)
            {
                               

                car.OwnerChanged += new Car.OwnerChangedEventHandler(car_OwnerChanged);

                car.CarMake = textBox1.Text;
                car.CarOwner = textBox2.Text;
                car.CarModel = textBox3.Text;
                car.CarYear = Convert.ToInt32( textBox4.Text);
               

            }

            void car_OwnerChanged(string newOwner)
            {
                MessageBox.Show(newOwner);
                //throw new NotImplementedException();
            }

            private void button2_Click(object sender, EventArgs e)
            {

                textBox6.Text = car.CarMake;
                textBox9.Text = car.CarOwner;
                textBox8.Text = car.CarModel;
                textBox7.Text  = Convert.ToString (car.CarYear);


            }

            private void button3_Click(object sender, EventArgs e)
            {
                textBox5.Text = car.CarOwner;
            }


            void car_OwnerChanged(object sender, EventArgs e)
            {
                MessageBox.Show("Hello from EVENT");
            }

        }
    }

  • C# Snippet Tutorial - Custom Event Handlers
    05/16/2010 - 16:09

    thank you so much for this clean explanation on events. It makes sense to me now.

    I have small problem.

    I made 4 textboxes (make, model,year and owner) and a button.

    When I change a owner, event fires up correctly, however it keeps repeating it's self.

    For example, I have this code:

    void car_OwnerChanged(string newOwner)
            {
                MessageBox.Show("Hello, owner changed");
               
            }

    When I change the owner, message box pops. When I change it again, message box pops 2 times (must ok it).
    If I do it 10 times, there will be 10 text boxes.

    How do I make it pop only once?