Click here to Skip to main content
15,905,913 members
Home / Discussions / C#
   

C#

 
GeneralRe: Validation IsNumeric in C# Pin
Shajeel7-Jun-06 20:00
Shajeel7-Jun-06 20:00 
GeneralRe: Validation IsNumeric in C# Pin
Dustin Metzgar9-Jun-06 4:19
Dustin Metzgar9-Jun-06 4:19 
GeneralRe: Validation IsNumeric in C# Pin
Dustin Metzgar9-Jun-06 4:21
Dustin Metzgar9-Jun-06 4:21 
AnswerRe: Validation IsNumeric in C# [modified] Pin
rfjeld7-Jun-06 20:45
rfjeld7-Jun-06 20:45 
GeneralRe: Validation IsNumeric in C# [modified] Pin
Mairaaj Khan7-Jun-06 21:04
professionalMairaaj Khan7-Jun-06 21:04 
AnswerRe: Validation IsNumeric in C# Pin
Dave Doknjas8-Jun-06 16:32
Dave Doknjas8-Jun-06 16:32 
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan8-Jun-06 20:13
professionalMairaaj Khan8-Jun-06 20:13 
GeneralRe: Validation IsNumeric in C# Pin
Dave Doknjas9-Jun-06 4:05
Dave Doknjas9-Jun-06 4:05 
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan9-Jun-06 20:20
professionalMairaaj Khan9-Jun-06 20:20 
AnswerRe: Validation IsNumeric in C# [modified] Pin
Suamal9-Jun-06 1:05
Suamal9-Jun-06 1:05 
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan9-Jun-06 21:35
professionalMairaaj Khan9-Jun-06 21:35 
GeneralRe: Validation IsNumeric in C# Regualr Expression Pin
Mairaaj Khan10-Jun-06 0:15
professionalMairaaj Khan10-Jun-06 0:15 
Questionback-up Windows service for database backup. Pin
aakar7-Jun-06 16:25
aakar7-Jun-06 16:25 
AnswerRe: back-up Windows service for database backup. Pin
dreynglar8-Jun-06 6:37
dreynglar8-Jun-06 6:37 
QuestionForm height increases on Show() Pin
cmaissan7-Jun-06 15:04
cmaissan7-Jun-06 15:04 
AnswerRe: Form height increases on Show() Pin
Edbert P7-Jun-06 16:27
Edbert P7-Jun-06 16:27 
GeneralRe: Form height increases on Show() Pin
Jun Du7-Jun-06 16:42
Jun Du7-Jun-06 16:42 
GeneralRe: Form height increases on Show() Pin
cmaissan8-Jun-06 1:32
cmaissan8-Jun-06 1:32 
QuestionControls and Properties Pin
TheBlindWatchmaker7-Jun-06 14:06
TheBlindWatchmaker7-Jun-06 14:06 
AnswerRe: Controls and Properties Pin
Edbert P7-Jun-06 14:53
Edbert P7-Jun-06 14:53 
GeneralRe: Controls and Properties Pin
TheBlindWatchmaker7-Jun-06 18:03
TheBlindWatchmaker7-Jun-06 18:03 
GeneralRe: Controls and Properties Pin
Edbert P7-Jun-06 21:01
Edbert P7-Jun-06 21:01 
Here's a small example (I'm blind coding, it might have some syntax error):

For Channel, you need to raise an event whenever the checkbox is checked:
public event SoloChangedHandler SoloChanged;             // Your event
public delegate void SoloChangedHandler(Channel sender);      // Your event delegate

private void OnSoloChanged()
{
     if (SoloChanged != null)
          SoloChanged(this);
}

private void chkSolo_Checked(object sender, EventArgs e)
{
     OnSoloChanged();   //Raise your event
}

public bool IsSolo
{
     get { return chkSolo.Checked; }
     set { chkSolo.Checked = value; }
}


For Mixer, you need to either keep a reference on the selected Channel, or the index, or both:
private int selectedIndex = -1;
private Channel selectedChannel;

private void ctrlSolo_SoloChanged(Channel sender)
{
     if (sender.IsSolo)
     {
        this.selectedIndex = this.Controls.GetChildIndex(sender);
        this.selectedChannel = sender;
        foreach (Channel channel in this.Controls)
        {
             if (channel != sender)
             {
                 channel.IsSolo = false; //Or you can move this to the Channel control, set it to false whenever mute is true
                 channel.IsMute = true;
             }
        }
     }
     else
     {
        this.selectedIndex = -1;
        this.selectedChannel = null;
        foreach (Channel channel in this.Controls)
        {
            channel.IsSolo = false;
            channel.IsMute = false;
        }
     }
}


That's it. Now you just need to add properties to access the collection of Channels, the SelectedIndex, and the SelectedChannel.
Hope that helps!

Edbert
Sydney, Australia
QuestionXML Viewer planning Pin
eggie57-Jun-06 13:22
eggie57-Jun-06 13:22 
QuestionVS 2005 Query Builder Parameter? Pin
PyroManiak7-Jun-06 12:56
PyroManiak7-Jun-06 12:56 
AnswerRe: VS 2005 Query Builder Parameter? Pin
PyroManiak8-Jun-06 7:45
PyroManiak8-Jun-06 7:45 

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.