You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4C/Gumming/Modules/Pattern/PatternControlViewModule.cs

97 lines
2.4 KiB

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Input;
using GummingCommon;
using GummingEntity;
using GummingSupport;
using GummingControl;
using System.Windows.Media;
using GummingBusiness;
using Newtonsoft.Json;
using System.Diagnostics;
namespace Gumming
{
public partial class PatternControlViewModule : ViewModelBase
{
public PatternControlView View;
public static bool keepRunning = false;
#region constructor
public PatternControlViewModule()
{
View = new PatternControlView();
View.DataContext = this;
InitializeCommands();
InitializeParameters();
}
private void InitializeCommands()
{
AppEventAggregator.GetEventAggregator().GetEvent<KeyChangedEvent>().Subscribe(NotifyChanged);
}
public override void InitializeParameters(object content = null)
{
}
~PatternControlViewModule()
{
}
protected override void OnDispose()
{
AppEventAggregator.GetEventAggregator().GetEvent<KeyChangedEvent>().Unsubscribe(NotifyChanged);
}
#endregion
#region Binding Properties
public string WindowTitle { get; private set; }
private string _ControlToolTip;
public string ControlToolTip
{
get
{
return _ControlToolTip;
}
set
{
_ControlToolTip = value;
OnPropertyChanged("ControlToolTip");
}
}
#endregion
#region Binding Commands
#endregion
#region Private Methods
public void NotifyChanged(KeyEventParameter eventpara)
{
if (eventpara.KeyType == KeyType.UnCheck)
{
System.Windows.Forms.Keys keyData = (System.Windows.Forms.Keys)eventpara.KeyContent;
if (keyData == System.Windows.Forms.Keys.NumPad0)//绗缝方向 对应 键盘 0
{
}
else if (keyData.Equals(System.Windows.Forms.Keys.O | System.Windows.Forms.Keys.Control))
{
}
}
}
#endregion
}
}