1,076,371 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by skatamatic

It's pretty bad practise to simply serialize everything in a class, whether related to the data you want or not. Not only can it be highly inefficient, you can run into issues with 3rd party libs that don't play nicely with the .net object binary serializer (especially interops). Using a Data To Send class, as mentioned here, is definately the better route as it gives you maximum control over the serialization process (dont use CSV for it though, lol!)

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Hard to say. What controls are you using? Any events you think may be suspect, or low level hooks? If you kill DWM.exe (Aero) does it still happen?

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Does your biometric hardware come with an API? Hard to just start telling you how to use something that we know nothing about ;)

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Ok. What specifically are you having a problem with? Technical specifics are a MUST to get help with programming. Also, people aren't going to do your work for you. Despite the prevailance of free software and movies online, there isn't much free help ;)

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

It sounds like you are asking homework questions to an assignment that you don't understand. Sounds like you have made all your classes - so are you having troubles implementing them into an application?

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

You could use this interface, although I'm not very fond of it. Also, you could look into Threading and do the async stuff yourself.

Are you familiar with multithreading and syncronization techniques (such as mutex's, locking, etc)? Or are you looking to use something that's already made for you?

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

What kind of reports are you generating? HTML? Crystal? Some formats will be easier to work with than others for something like this...

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Your question doesn't really make a whole lot of sense but I'll take a stab at it. You are asking how to represent Async communication, I think. Seeing as C# is an object oriented language, you will need to represent it as an object (a class) as well.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

This looks like a good place to start.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

In the DogChorus constructor you are initializing a bunch of members with the same names as the Dog class (which are all private except for Breed) that aren't actually members of the DogChorus class. Perhaps you mean to have 2 objects of type Dog in this class called lady and tramp? If that is the case, you will need to have some public properties/methods/members/constructor in the Dog class to set the appropriate member variables.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

You are not instantiating a new button into memory. Try using

Button newBtn = new Button();
//Set attributes from XML here
myForm.Controls.Add(newBtn);
skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

I think SendKeys uses the windows message pump to pass in a key down message to a form. I bet San Andreas doesn't use this message pump as most WinForms apps do, so you will have to try some other things. Check out AutoIt

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

If you are looking in a special folder you can use the SpecialFolder enumerator to make sure you get the path right everytime:

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

There's quite a few other special folders to note that are represented by that enumerator.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

This has nothing to do with C#, and everything to do with Active Directory for Windows Server 2003/2008. If you go to 'Server Manager', go to Roles->Active Directory Domain Services->your.domain.name->Users you will see a list of users and groups, and when you double click a user and go to the MemberOf tab you will see all the User Groups that user belongs to :). Note that there's some built-in user groups under BuiltIn (rather than under Users) that you won't see in the users list.

Try posting it in a different forum for better/faster results next time.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Which SendKeys are you using? Is it the .Net wrapper or a WIN32 API call? Have you tried running it as administrator?

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

There's really a lot of ways to do this. One option would be to use an event that other forms can subscribe to:

//In form two
public partial class Form2 : Form
{
    public class MyFormEventArgs : EventArgs
    {
        public string SomeData { get; set; }
        public MyFormEventArgs(string data)
        {
            SomeData = data;
        }
    }

    public delegate void MyFormEventHandler(object sender, MyFormEventArgs args);
    public event MyFormEventHandler DataUpdated;        

    private void button1_Click(object sender, EventArgs e)
    {
        DataUpdated(this, new MyFormEventArgs(textBox1.Text));
    }

    public Form2()
    {
        InitializeComponent();
    }
}

//In form 1, when you create a new Form2
Form2 myForm2 = new Form2();
myForm.DataUpdated += new Form2.MyFormEventHandler(myForm_DataUpdated);
//Then add a handler to Form1 that gets called whenever Form2 wants to send us some data (like after they press button1)
void myForm_DataUpdated(object sender, Form2.MyFormEventArgs args)
{
    this.textBox1.Text = args.SomeData;
}

Another option is to use public properties/member variables. Finally there's the option of static classes to hold global variables (which, in my opinion, is the worst method). Events are probably the best way to do this - it allows you to have multiple of the same form type communcating with other forms seamlessly without needing additional logic in a controller class to determine which form is actually talking. You can do this right from the event handler with the 'sender' object. Basically you can create a form, subscribe the nessecary events, then forget about it and let it take care of itself rather than managing references to each form you created.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

If you have a deep wallet, DevExpress has some outstanding control suites that I use quite regularly at work. If you don't want to spend any money, you will either have to write them yourself or find a really nice person who has done your work for you. Let us know what route you want to take - designing your own custom user controls or getting pre-made ones.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

Try using the Let keyword to create a temp datetime.

var views = from vc in dbContext.ViewCounts
            let tempDate = new DateTime(vc.Time.Year, vc.Time.Month, vc.Time.Day)
            where vc.Time >= dateFrom && vc.Time <= dateTo
            group vc by new { catalogueId = vc.Catalogue_Id, day=tempDate } into vc2...

I haven't tested it but I think that's what I did to solve a similar problem a while ago.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

I've noticed that same problem before, too. But I don't think you rational behind why it occurs makes sense - how fast or how slow the threads fire shouldn't have an impact on the argument passed to the dowork() method.

I think it's a bug with the way annonymous delegates are optimized. To avoid that problem, I usually use the built in ParameterizedThreadStart class and pass it an object that contains the necessary information. In the first example, putting a Thread.Sleep(1) in the loop will likely correct the behaviour (it did in my test). This might be an explanation as to why your server works correctly - there's enough time in between each client connection to avoid the 'bug'.

That's just something I've noticed, it could be a complete lie with a really good explanation behind it. Regardless, it's kind of annoying.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1

License keys, online product validation and server-driven content. Oh and code obfuscation.

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1
 
© 2013 DaniWeb® LLC
Page rendered in 0.1301 seconds using 2.71MB