コード例 #1
0
 /// <summary>
 /// Attaches the major hotkey events
 /// to the Hotkey Listener.
 /// </summary>
 private void AttachEvents()
 {
     _handle.HotkeyPressed += (s, e) =>
     {
         HotkeyPressed?.Invoke(
             new SourceApplication(
                 SourceAttributes.GetID(),
                 SourceAttributes.GetHandle(),
                 SourceAttributes.GetName(),
                 SourceAttributes.GetTitle(),
                 SourceAttributes.GetPath(),
                 SourceAttributes.GetSelection()
                 ),
             new HotkeyEventArgs
         {
             Hotkey            = e.Hotkey,
             SourceApplication = new SourceApplication(
                 SourceAttributes.GetID(),
                 SourceAttributes.GetHandle(),
                 SourceAttributes.GetName(),
                 SourceAttributes.GetTitle(),
                 SourceAttributes.GetPath(),
                 SourceAttributes.GetSelection()
                 )
         });
     };
 }
コード例 #2
0
        private string[] GetSourceAttributes(CodeActivityContext executionContext, ITracingService tracingService)
        {
            string sourceAttributes = SourceAttributes.Get <string>(executionContext) ?? throw new ArgumentNullException("Source Attributes is empty");

            string[] sourceAttributesArray = sourceAttributes.Split(',');

            if (sourceAttributesArray == null || sourceAttributesArray.Length == 0)
            {
                tracingService.Trace("No source attributes could be found");
                return(null);
            }
            else
            {
                return(sourceAttributesArray);
            }
        }
コード例 #3
0
ファイル: GameManager.cs プロジェクト: taapesh/Makeshift
    void Awake()
    {
        archManager = GameObject.Find ("ArchManager").GetComponent<ArchManager>();
        tileManager = GameObject.Find ("TileManager").GetComponent<TileManager>();

        sourceA = GameObject.Find ("SourceA");
        sourceB = GameObject.Find ("SourceB");
        topRootA = GameObject.Find ("TopRootA");
        topRootB = GameObject.Find ("TopRootB");
        bottomRootA = GameObject.Find ("BottomRootA");
        bottomRootB = GameObject.Find ("BottomRootB");

        sourceAttrA = sourceA.GetComponent<SourceAttributes>();
        sourceAttrB = sourceB.GetComponent<SourceAttributes>();
        topRootAttrA = topRootA.GetComponent<RootAttributes>();
        topRootAttrB = topRootB.GetComponent<RootAttributes>();
        bottomRootAttrA = bottomRootA.GetComponent<RootAttributes>();
        bottomRootAttrB = bottomRootB.GetComponent<RootAttributes>();

        energyA = maxEnergy;
        energyB = maxEnergy;
    }
コード例 #4
0
 /// <summary>
 /// [Special] Gets the currently selected text in the active application.
 /// </summary>
 /// <returns>The selected text, if any.</returns>
 public string GetSelection()
 {
     return(SourceAttributes.GetSelection());
 }
コード例 #5
0
ファイル: DOM.cs プロジェクト: Terricide/Bridge.React
 public extern static ReactElement Source(SourceAttributes properties, params ReactElementOrText[] children);