private void MouseDown(object sender, int _flag) { System.Windows.Controls.Label _command = sender as System.Windows.Controls.Label; CommandTimer.Interval = 100; //wait CommandTimer.Enabled = true; CommandTimer.Start(); CommandFlag = _flag; if (!_command.IsMouseCaptured) { _command.CaptureMouse(); } }
// コマンドボタンイベント private void Command_MouseDown(object sender, MouseButtonEventArgs e) { System.Windows.Controls.Label _command = sender as System.Windows.Controls.Label; if (_command != null) { string str = (string)_command.Content; CommandFlag = CommandButtonMode(str); CommandTimer.Interval = Constants.interval; //wait CommandTimer.Enabled = true; CommandTimer.Start(); if (!_command.IsMouseCaptured) { _command.CaptureMouse(); } } }