use CommandEventArgs.Command instead of assuming sender is a Command (it is not always, and should not ever be)
This commit is contained in:
parent
aadca49721
commit
4f8c4c2e89
@ -493,7 +493,7 @@ namespace UniversalEditor.UserInterface
|
||||
#region View
|
||||
Application.Instance.AttachCommandEventHandler("ViewFullScreen", delegate(object sender, EventArgs e)
|
||||
{
|
||||
Command cmd = (sender as Command);
|
||||
Command cmd = (e as CommandEventArgs).Command;
|
||||
LastWindow.FullScreen = !LastWindow.FullScreen;
|
||||
cmd.Checked = LastWindow.FullScreen;
|
||||
});
|
||||
@ -761,7 +761,7 @@ namespace UniversalEditor.UserInterface
|
||||
|
||||
void cmdViewToolbarsToolbar_Executed(object sender, EventArgs e)
|
||||
{
|
||||
Command cmd = (sender as Command);
|
||||
Command cmd = (e as CommandEventArgs).Command;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ namespace UniversalEditor.Editors.Multimedia.Audio.Synthesized.Views.PianoRoll
|
||||
|
||||
private void ContextMenu_NoteFixedLength_Click(object sender, EventArgs e)
|
||||
{
|
||||
Command cmd = (sender as Command);
|
||||
Command cmd = (e as CommandEventArgs).Command;
|
||||
string sValue = cmd.ID.Substring("PianoRollEditor_ContextMenu_NoteFixedLength_".Length);
|
||||
int iValue = -1;
|
||||
|
||||
@ -253,7 +253,7 @@ namespace UniversalEditor.Editors.Multimedia.Audio.Synthesized.Views.PianoRoll
|
||||
}
|
||||
private void ContextMenu_Quantize_Click(object sender, EventArgs e)
|
||||
{
|
||||
Command cmd = (sender as Command);
|
||||
Command cmd = (e as CommandEventArgs).Command;
|
||||
string sValue = cmd.ID.Substring("PianoRollEditor_ContextMenu_Quantize_".Length);
|
||||
int iValue = 4; //-1;
|
||||
|
||||
@ -282,7 +282,7 @@ namespace UniversalEditor.Editors.Multimedia.Audio.Synthesized.Views.PianoRoll
|
||||
}
|
||||
private void ContextMenu_NoteLength_Click(object sender, EventArgs e)
|
||||
{
|
||||
Command cmd = (sender as Command);
|
||||
Command cmd = (e as CommandEventArgs).Command;
|
||||
string sValue = cmd.ID.Substring("PianoRollEditor_ContextMenu_NoteLength_".Length);
|
||||
int iValue = 4; //-1;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user