• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.KeyReleaseEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Gtk.KeyReleaseEventArgs的典型用法代码示例。如果您正苦于以下问题:C# KeyReleaseEventArgs类的具体用法?C# KeyReleaseEventArgs怎么用?C# KeyReleaseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



KeyReleaseEventArgs类属于Gtk命名空间,在下文中一共展示了KeyReleaseEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
            }
        }
开发者ID:QualitySolution,项目名称:QSProjects,代码行数:27,代码来源:ClipboardWorkaround.cs


示例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;
            }
    }
开发者ID:Jeff-Lewis,项目名称:opentf,代码行数:13,代码来源:RepositoryView.cs


示例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();
                    }
                }
            }
        }
开发者ID:QualitySolution,项目名称:QSProjects,代码行数:36,代码来源:TDIMain.cs


示例4: DoKeyRelease

 public void DoKeyRelease(DrawingArea canvas, KeyReleaseEventArgs args)
 {
     OnKeyUp (canvas, args);
 }
开发者ID:manish,项目名称:Pinta,代码行数:4,代码来源:BaseTool.cs


示例5: KeyReleaseHandler

	void KeyReleaseHandler (object obj, KeyReleaseEventArgs args)
	{
		// nothing
	}
开发者ID:emtees,项目名称:old-code,代码行数:4,代码来源:IconList.cs


示例6: PintaCanvas_KeyReleaseEvent

 private void PintaCanvas_KeyReleaseEvent(object o, KeyReleaseEventArgs e)
 {
     PintaCore.Tools.CurrentTool.DoKeyRelease (this, e);
 }
开发者ID:rini18,项目名称:Pinta,代码行数:4,代码来源:PintaCanvas.cs


示例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);
        }
    }
开发者ID:stemartincouk,项目名称:gsalon,代码行数:15,代码来源:MainWindow.cs


示例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;
		}
	}
开发者ID:remobjects,项目名称:mono-tools,代码行数:9,代码来源:browser.cs


示例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);
			}
		}
开发者ID:ArsenShnurkov,项目名称:monodevelop,代码行数:11,代码来源:WebReferenceDialog.cs


示例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);
        }
    }
开发者ID:crowzK,项目名称:SimpleSerialTerm,代码行数:31,代码来源:MainWindow.cs


示例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;
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:11,代码来源:iFolderUserSelector.cs


示例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);
     }
 }
开发者ID:ame89,项目名称:Limbus,代码行数:30,代码来源:MainWindow.cs


示例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;
 }
开发者ID:sanyu1,项目名称:NPlot,代码行数:7,代码来源:Gtk.InteractivePlotSurface2D.cs


示例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);
        }
    }
开发者ID:BackupTheBerlios,项目名称:gnomeartng-svn,代码行数:22,代码来源:Main.cs


示例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;
 }
开发者ID:soywiz,项目名称:cspspemu,代码行数:6,代码来源:GtkProgram.cs


示例16: OnVideoSetSubtitleStartEndKeyRelease

	public void OnVideoSetSubtitleStartEndKeyRelease (object o, KeyReleaseEventArgs args) {
		if (buttonStartEndKeyPressed){
			OnVideoSetSubtitleStartEnd(o, args);
			buttonStartEndKeyPressed = false;
		}
	}
开发者ID:GNOME,项目名称:gnome-subtitles,代码行数:6,代码来源:EventHandlers.cs


示例17: MyKeyReleaseEventHandler

 public void MyKeyReleaseEventHandler(object o, KeyReleaseEventArgs args)
 {
     if (Gdk.Key.Return == args.Event.Key)
             OnShowFile();
 }
开发者ID:Jeff-Lewis,项目名称:opentf,代码行数:5,代码来源:DirectoryView.cs


示例18: OnTreeview1KeyReleaseEvent

 protected void OnTreeview1KeyReleaseEvent(object o, KeyReleaseEventArgs args)
 {
     if (args.Event.Key == Gdk.Key.Tab)
     {
         var treeView = (TreeView)o;
         TreeViewColumn focusColumn;
         TreePath path;
         treeView.GetCursor(out path, out focusColumn);
         TreeViewColumn[] cols = this.treeview1.Columns;
         int focusColumnPosition = Array.IndexOf(cols, focusColumn);
         int nextColumn = focusColumnPosition + 1;
         if (nextColumn < cols.Length)
         {
             treeView.SetCursor(path, treeView.Columns[nextColumn], true);
         }
     }
 }
开发者ID:jholland918,项目名称:gtk-sharp-samples,代码行数:17,代码来源:MainWindow.cs


示例19: OnDockKeyReleaseEvent

        private void OnDockKeyReleaseEvent(object o, KeyReleaseEventArgs args)
        {
            if(args.Event.Key == Gdk.Key.Escape) {
                Display.KeyboardUngrab(args.Event.Time);
                Display.PointerUngrab(args.Event.Time);
                Gtk.Grab.Remove(dock);
                dock.Hide();
                timeout = false;
                args.RetVal = true;
                return;
            }

            args.RetVal = false;
        }
开发者ID:mono-soc-2011,项目名称:banshee,代码行数:14,代码来源:VolumeButton.cs


示例20: OnKeyUp

        protected override void OnKeyUp(DrawingArea canvas, KeyReleaseEventArgs args)
        {
            switch (args.Event.Key) {
            case Gdk.Key.Control_L:
            case Gdk.Key.Control_R:
                TimeSpan heldDuration = (DateTime.Now - this.controlKeyDownTime);

                // If the user taps Ctrl, then we should toggle the visiblity of the moveNub
                if (heldDuration < this.controlKeyDownThreshold) {
                    this.enableNub = !this.enableNub;
                }

                this.controlKeyDown = false;
                break;
            }

            base.OnKeyUp (canvas, args);
        }
开发者ID:xxgreg,项目名称:Pinta,代码行数:18,代码来源:TextTool.cs



注:本文中的Gtk.KeyReleaseEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.Label类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.KeyPressEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap