Click here to Skip to main content
15,896,269 members
Home / Discussions / C#
   

C#

 
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 
QuestionClickonce help Pin
cechode7-Jun-06 12:48
cechode7-Jun-06 12:48 
AnswerRe: Clickonce help Pin
PyroManiak8-Jun-06 7:49
PyroManiak8-Jun-06 7:49 
QuestionVS2005 Warning Error Message Pin
donkaiser7-Jun-06 12:06
donkaiser7-Jun-06 12:06 
AnswerRe: VS2005 Warning Error Message Pin
Office Lineman7-Jun-06 14:04
Office Lineman7-Jun-06 14:04 
GeneralRe: VS2005 Warning Error Message Pin
donkaiser8-Jun-06 2:57
donkaiser8-Jun-06 2:57 
GeneralRe: VS2005 Warning Error Message Pin
donkaiser8-Jun-06 4:46
donkaiser8-Jun-06 4:46 
QuestionError creating windows Handle Pin
Mandar Patankar7-Jun-06 11:03
Mandar Patankar7-Jun-06 11:03 
AnswerRe: Error creating windows Handle Pin
Ed.Poore7-Jun-06 11:27
Ed.Poore7-Jun-06 11:27 
GeneralRe: Error creating windows Handle Pin
Mandar Patankar8-Jun-06 6:42
Mandar Patankar8-Jun-06 6:42 
GeneralRe: Error creating windows Handle Pin
Ed.Poore8-Jun-06 8:17
Ed.Poore8-Jun-06 8:17 
GeneralRe: Error creating windows Handle Pin
Mandar Patankar9-Jun-06 11:47
Mandar Patankar9-Jun-06 11:47 
GeneralRe: Error creating windows Handle Pin
Ed.Poore9-Jun-06 12:48
Ed.Poore9-Jun-06 12:48 
Questionplugin support in c# project(advice please) Pin
sawerr7-Jun-06 10:26
sawerr7-Jun-06 10:26 
AnswerRe: plugin support in c# project(advice please) Pin
Ed.Poore7-Jun-06 10:48
Ed.Poore7-Jun-06 10:48 

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.