当前位置: 首页>>代码示例>>C#>>正文


C# Command.Equals方法代码示例

本文整理汇总了C#中Command.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Command.Equals方法的具体用法?C# Command.Equals怎么用?C# Command.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Command的用法示例。


在下文中一共展示了Command.Equals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DisplayResult

        private ContentProcessorResult DisplayResult(string content, ContentProcessorResult result, Command command)
        {
            if (command.Equals(Command.DisplayNegativeCount))
            {
                _inputOutput.WriteLine("Scanned the text:");
            }

            _inputOutput.WriteLine(content);

            if (command.Equals(Command.DisplayNegativeCount) || command.Equals(Command.DisplayOriginalContent))
            {
                _inputOutput.WriteLine("Total Number of negative words: " + result.NegativeWordsCount);
            }

            _inputOutput.WriteLine("Press ANY key to exit.");
            _inputOutput.ReadKey();
            return result;
        }
开发者ID:skirmamack,项目名称:Euromoney.RecruitmentTest,代码行数:18,代码来源:ContentProcessor.cs

示例2: CommandFinished

 public virtual void CommandFinished(Command command)
 {
     if (command.Equals(currentCommand))
     {
         currentCommand = null;
     }
     else
     {
         throw new Exception("El comando finalizado no era el actual");
     }
 }
开发者ID:Jcortesjara,项目名称:cubeProject,代码行数:11,代码来源:CubeController.cs

示例3: Run

        public ContentProcessorResult Run(Command command, string content, IList<string> negativeWords)
        {
            content = content ?? "";
            negativeWords = negativeWords ?? new List<string>();

            var matches = GetNegativeWordMatches(content, negativeWords);

            var result = new ContentProcessorResult
            {
                NegativeWordsCount = matches.Count,
                Content = command.Equals(Command.FilterNegative) ? MaskNegativeWords(content, matches) : content
            };

            return DisplayResult(result.Content, result, command);
        }
开发者ID:skirmamack,项目名称:Euromoney.RecruitmentTest,代码行数:15,代码来源:ContentProcessor.cs

示例4: DrawCommandUI

        public void DrawCommandUI(Flowchart flowchart, Command inspectCommand)
        {
            ResizeScrollView(flowchart);

            GUILayout.Space(7);

            activeBlockEditor.DrawButtonToolbar();

            commandScrollPos = GUILayout.BeginScrollView(commandScrollPos);

            if (inspectCommand != null)
            {
                if (activeCommandEditor == null || 
                    !inspectCommand.Equals(activeCommandEditor.target))
                {
                    // See if we have a cached version of the command editor already,
                    var editors = (from e in cachedCommandEditors where (e != null && (e.target.Equals(inspectCommand))) select e);

                    if (editors.Count() > 0)
                    {
                        // Use cached editor
                        activeCommandEditor = editors.First();
                    }
                    else
                    {
                        // No cached editor, so create a new one.
                        activeCommandEditor = Editor.CreateEditor((Command)inspectCommand) as CommandEditor;
                        cachedCommandEditors.Add(activeCommandEditor);
                    }
                }
                if (activeCommandEditor != null)
                {
                    activeCommandEditor.DrawCommandInspectorGUI();
                }
            }

            GUILayout.EndScrollView();

            GUILayout.EndArea();

            // Draw the resize bar after everything else has finished drawing
            // This is mainly to avoid incorrect indenting.
            Rect resizeRect = new Rect(0, topPanelHeight + flowchart.BlockViewHeight + 1, Screen.width, 4f);
            GUI.color = new Color(0.64f, 0.64f, 0.64f);
            GUI.DrawTexture(resizeRect, EditorGUIUtility.whiteTexture);
            resizeRect.height = 1;
            GUI.color = new Color32(132, 132, 132, 255);
            GUI.DrawTexture(resizeRect, EditorGUIUtility.whiteTexture);
            resizeRect.y += 3;
            GUI.DrawTexture(resizeRect, EditorGUIUtility.whiteTexture);
            GUI.color = Color.white;

            Repaint();
        }
开发者ID:abstractmachine,项目名称:Fungus-3D-Template,代码行数:54,代码来源:BlockInspector.cs


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