コード例 #1
0
        /// <summary>
        /// Entry point to the OWP
        /// </summary>
        /// <param name="evt"></param>
        /// <param name="raw"></param>
        /// <param name="guid">Guid string of pane</param>
        /// <param name="item">Name of item pane</param>
        protected int sbeOutput(ISolutionEventOWP evt, ref string raw, string guid, string item)
        {
            if (!(new Receiver.Output.Matcher()).match(evt.Match, raw, guid, item))
            {
                return(Codes.Success);
            }

            if (!isExecute(evt, current))
            {
                Log.Info("[Output] ignored action '{0}' :: by execution order", evt.Caption);
                return(Codes.Success);
            }

            try {
                if (Cmd.exec(evt, SolutionEventType.OWP))
                {
                    Log.Info($"[Output] finished '{evt.Name}': {evt.Caption}");
                }
                return(Codes.Success);
            }
            catch (Exception ex) {
                Log.Error("SBE 'Output' error: {0}", ex.Message);
            }
            return(Codes.Failed);
        }
コード例 #2
0
        /// <summary>
        /// Entry point to the OWP
        /// </summary>
        /// <param name="evt"></param>
        /// <param name="raw"></param>
        /// <param name="guid">Guid string of pane</param>
        /// <param name="item">Name of item pane</param>
        protected int sbeOutput(ISolutionEventOWP evt, ref string raw, string guid, string item)
        {
            if (!(new Receiver.Output.Matcher()).match(evt.Match, raw, guid, item))
            {
                return(VSConstants.S_OK);
            }

            try {
                if (Cmd.exec(evt, SolutionEventType.OWP))
                {
                    Log.Info("[Output] finished SBE: {0}", evt.Caption);
                }
                return(VSConstants.S_OK);
            }
            catch (Exception ex) {
                Log.Error("SBE 'Output' error: {0}", ex.Message);
            }
            return(VSConstants.S_FALSE);
        }
コード例 #3
0
ファイル: Connection.cs プロジェクト: 3F/vsCommandEvent
        /// <summary>
        /// Entry point to the OWP
        /// </summary>
        /// <param name="evt"></param>
        /// <param name="raw"></param>
        /// <param name="guid">Guid string of pane</param>
        /// <param name="item">Name of item pane</param>
        protected int sbeOutput(ISolutionEventOWP evt, ref string raw, string guid, string item)
        {
            if(!(new Receiver.Output.Matcher()).match(evt.Match, raw, guid, item)) {
                return VSConstants.S_OK;
            }

            try {
                if(Cmd.exec(evt, SolutionEventType.OWP)) {
                    Log.Info("[Output] finished SBE: {0}", evt.Caption);
                }
                return VSConstants.S_OK;
            }
            catch(Exception ex) {
                Log.Error("SBE 'Output' error: {0}", ex.Message);
            }
            return VSConstants.S_FALSE;
        }
コード例 #4
0
ファイル: EventsFrm.cs プロジェクト: 3F/vsCommandEvent
 protected void saveData(ISolutionEventOWP evt)
 {
     List<EOWP.IMatching> list = new List<EOWP.IMatching>();
     foreach(DataGridViewRow row in dgvOWP.Rows)
     {
         if(row.Cells[owpTerm.Name].Value == null || row.Cells[owpType.Name].Value == null) {
             continue;
         }
         EOWP.IMatching m = new EOWP.Condition();
         m.Phrase    = (row.Cells[owpTerm.Name].Value == null)? "" : row.Cells[owpTerm.Name].Value.ToString();
         m.Type      = (EOWP.ComparisonType)Enum.Parse(typeof(EOWP.ComparisonType), row.Cells[owpType.Name].Value.ToString());
         m.PaneGuid  = (row.Cells[owpGuid.Name].Value == null)? "" : row.Cells[owpGuid.Name].Value.ToString();
         m.PaneName  = (row.Cells[owpItem.Name].Value == null)? "" : row.Cells[owpItem.Name].Value.ToString();
         list.Add(m);
     }
     evt.Match = list.ToArray();
 }
コード例 #5
0
ファイル: EventsFrm.cs プロジェクト: 3F/vsCommandEvent
 protected void renderData(ISolutionEventOWP evt)
 {
     dgvOWP.Rows.Clear();
     if(evt.Match == null) {
         return;
     }
     foreach(EOWP.IMatching m in evt.Match) {
         dgvOWP.Rows.Add(m.PaneGuid, m.PaneName, m.Phrase, m.Type.ToString());
     }
 }
コード例 #6
0
        /// <summary>
        /// Entry point to the OWP
        /// </summary>
        protected int sbeOutput(ISolutionEventOWP evt, ref string raw)
        {
            if(!(new Receiver.Output.Matcher()).match(evt.Match, raw)) {
                return Codes.Success;
            }

            if(!isExecute(evt, current)) {
                Log.Info("[Output] ignored action '{0}' :: by execution order", evt.Caption);
                return Codes.Success;
            }

            try {
                if(cmd.exec(evt, SolutionEventType.OWP)) {
                    Log.Info("[Output] finished SBE: {0}", evt.Caption);
                }
                return Codes.Success;
            }
            catch(Exception ex) {
                Log.Error("SBE 'Output' error: {0}", ex.Message);
            }
            return Codes.Failed;
        }