本文整理汇总了C#中Gtk.KeyReleaseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# KeyReleaseEventArgs类的具体用法?C# KeyReleaseEventArgs怎么用?C# KeyReleaseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyReleaseEventArgs类属于Gtk命名空间,在下文中一共展示了KeyReleaseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleKeyReleaseEvent
public static void HandleKeyReleaseEvent(object o, KeyReleaseEventArgs args)
{
int platform = (int)Environment.OSVersion.Platform;
int version = (int)Environment.OSVersion.Version.Major;
Gdk.ModifierType modifier;
//Kind of MacOSX
if ((platform == 4 || platform == 6 || platform == 128) && version > 8)
modifier = Gdk.ModifierType.MetaMask | Gdk.ModifierType.Mod1Mask;
//Kind of Windows or Unix
else
modifier = Gdk.ModifierType.ControlMask;
//CTRL+C
if ((args.Event.Key == Gdk.Key.Cyrillic_es || args.Event.Key == Gdk.Key.Cyrillic_ES) && args.Event.State.HasFlag(modifier)) {
Widget w = (o as Window).Focus;
CopyToClipboard (w);
}//CTRL+X
else if ((args.Event.Key == Gdk.Key.Cyrillic_che || args.Event.Key == Gdk.Key.Cyrillic_CHE) && args.Event.State.HasFlag(modifier)) {
Widget w = (o as Window).Focus;
CutToClipboard (w);
}//CTRL+V
else if ((args.Event.Key == Gdk.Key.Cyrillic_em || args.Event.Key == Gdk.Key.Cyrillic_EM) && args.Event.State.HasFlag(modifier)) {
Widget w = (o as Window).Focus;
PasteFromClipboard (w);
}
}
示例2: MyKeyReleaseEventHandler
public void MyKeyReleaseEventHandler(object o, KeyReleaseEventArgs args)
{
if ((Gdk.Key.c == args.Event.Key) && ((args.Event.State & Gdk.ModifierType.ControlMask) != 0))
{
TreeIter iter;
TreeModel model;
if (!(Selection.GetSelected (out model, out iter))) return;
string path = model.GetValue(iter, 1).ToString();
Clipboard primary = Clipboard.Get(Gdk.Atom.Intern ("PRIMARY", false));
primary.Text = path;
}
}
示例3: TDIHandleKeyReleaseEvent
public static void TDIHandleKeyReleaseEvent(object o, KeyReleaseEventArgs args)
{
if (MainNotebook == null)
return;
int platform = (int)Environment.OSVersion.Platform;
int version = (int)Environment.OSVersion.Version.Major;
Gdk.ModifierType modifier;
//Kind of MacOSX
if ((platform == 4 || platform == 6 || platform == 128) && version > 8)
modifier = Gdk.ModifierType.MetaMask | Gdk.ModifierType.Mod1Mask;
//Kind of Windows or Unix
else
modifier = Gdk.ModifierType.ControlMask;
//CTRL+S || CTRL+ENTER
if ((args.Event.Key == Gdk.Key.S
|| args.Event.Key == Gdk.Key.s
|| args.Event.Key == Gdk.Key.Cyrillic_yeru
|| args.Event.Key == Gdk.Key.Cyrillic_YERU
|| args.Event.Key == Gdk.Key.Return) && args.Event.State.HasFlag(modifier)) {
var w = MainNotebook.CurrentPageWidget;
if (w is TabVBox) {
var tab = (w as TabVBox).Tab;
if (tab is TdiSliderTab) {
var dialog = (tab as TdiSliderTab).ActiveDialog;
dialog.SaveAndClose ();
}
if(tab is ITdiDialog)
{
(tab as ITdiDialog).SaveAndClose();
}
}
}
}
示例4: DoKeyRelease
public void DoKeyRelease(DrawingArea canvas, KeyReleaseEventArgs args)
{
OnKeyUp (canvas, args);
}
示例5: KeyReleaseHandler
void KeyReleaseHandler (object obj, KeyReleaseEventArgs args)
{
// nothing
}
示例6: PintaCanvas_KeyReleaseEvent
private void PintaCanvas_KeyReleaseEvent(object o, KeyReleaseEventArgs e)
{
PintaCore.Tools.CurrentTool.DoKeyRelease (this, e);
}
示例7: HandleTbSearchKeyReleaseEvent
void HandleTbSearchKeyReleaseEvent(object o, KeyReleaseEventArgs args)
{
//get results live on key up
staff staffMember = new staff();
staffMember.fName = "ted";
List<staff> searchResults = new List<staff> ();
searchResults = staffMember.search_staff(tbSearch.Text);
Console.WriteLine("Search Results found: "+searchResults.Count.ToString());
//staffMember.get_staff_member();
foreach(staff sr in searchResults)
{
Console.WriteLine(sr.fName+" "+sr.lName);
}
}
示例8: keyrelease_event_cb
void keyrelease_event_cb (object o, KeyReleaseEventArgs args)
{
switch (args.Event.Key) {
case Gdk.Key.Control_L:
case Gdk.Key.Control_R:
HoldCtrl = false;
break;
}
}
示例9: Browser_URLKeyReleased
/// <summary>Execute the event when the Enter key has been pressed on the Url Entry</summary>
/// <param name="sender">An object that contains the sender data.</param>
/// <param name="e">An EventArgs object that contains the event data.</param>
void Browser_URLKeyReleased (object sender, KeyReleaseEventArgs e)
{
if (e.Event.Key == Gdk.Key.Return)
{
if (browser != null)
browser.LoadUrl(tbxReferenceURL.Text);
}
}
示例10: OnConsoleTextViewKeyReleaseEvent
protected void OnConsoleTextViewKeyReleaseEvent(object o, KeyReleaseEventArgs args)
{
//throw new NotImplementedException ();
Int16 key = (Int16)args.Event.KeyValue;
byte[] keyAscii = new byte[1];
if (key < 0) {
//consoleTextView.Buffer.Text += args.Event.Key;
if (args.Event.Key == Gdk.Key.Delete) {
keyAscii [0] = 127;
} else if (args.Event.Key == Gdk.Key.Return) {
keyAscii = new byte[2];
keyAscii [0] = 10;
keyAscii [1] = 13;
} else if (args.Event.Key == Gdk.Key.Escape) {
keyAscii [0] = 27;
} else if (args.Event.Key == Gdk.Key.BackSpace) {
keyAscii [0] = 08;
} else {
return;
}
} else {
keyAscii[0] = (byte)key;
}
if (portStatus == true) {
_serialPort.Write (keyAscii, 0, keyAscii.Length);
}
}
示例11: KeyReleaseHandler
void KeyReleaseHandler(object o, KeyReleaseEventArgs args)
{
args.RetVal = true;
switch(args.Event.Key)
{
case Gdk.Key.Control_R:
case Gdk.Key.Control_L:
memberList.ctrl_pressed = false;
break;
}
}
示例12: edPoti_KeyReleased
// private void HostPID(DateTimeOffset t0, TimePlot timeplot)
// {
// var linearMock = new LinearMosquito(10.0.In(1.min()), DateTimeOffset.UtcNow);
// controlledMock = linearMock.ControlledBy(new PIDAlgorithm(0.5, 0.5, 0, 0));//WithDelay(5.min());
//
// clock = new Clock(t0);
// clock.Subscribe(linearMock);
// //clock.Subscribe(delayedMock);
//
// // this stuff runs in another task
// linearMock.Receive += (ts) => {
// timePlot.AddActual(ts);
// timePlot.InvalidatePlot(true);
// };
//
// Task.Run (() => {
// while(true)
// {
// clock.Tick (1.min());
// Thread.Sleep (speed);
// }
// });
// }
protected void edPoti_KeyReleased(object o, KeyReleaseEventArgs args)
{
if (args.Event.Key != Gdk.Key.Return) return;
if (args.Event.Key == Gdk.Key.Return) {
this.btnPotiOnOff_Toggled(o, args);
}
}
示例13: KeyReleased
private void KeyReleased(object o, KeyReleaseEventArgs args )
{
Modifier key = Key(args.Event.Key);
key |= ControlKeys(args.Event.State);
DoKeyRelease(key, this);
args.RetVal = true;
}
示例14: OnSortKindEntryChanged
/*
private void OnSortKindEntryChanged(object sender, EventArgs a){
System.Console.WriteLine(CurrentIconView.Model.ToString());
TreeModelFilter store = (TreeModelFilter)(CurrentIconView.Model);
System.Console.WriteLine("hups");
int activeItem = ((Gtk.ComboBox)sender).Active;
if (activeItem == 0) {
//store.SetSortColumnId(-1, SortType.Ascending);
} else {
//store.SetSortColumnId (activeItem, SortType.Ascending);
}
}
private void OnSortDirectionEntryChanged(object sender, EventArgs a){
}
*/
private void OnFilterbarKeyReleased(object sender, KeyReleaseEventArgs e)
{
if (e.Event.Key == Gdk.Key.Escape){
OnFilterbarCloseClicked(sender,e);
}
}
示例15: Window_KeyReleaseEvent
void Window_KeyReleaseEvent(object o, KeyReleaseEventArgs args)
{
Console.WriteLine("Releasing: {0}", args.Event.Key);
CommonGuiInput.KeyRelease(args.Event.Key.ToString());
args.RetVal = true;
}