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


C# ScintillaControl.Column方法代码示例

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


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

示例1: OnScintillaControlUpdateControl

 /// <summary>
 /// Refreshes the statusbar display and updates the important edit buttons
 /// </summary>
 public void OnScintillaControlUpdateControl(ScintillaControl sci)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke((MethodInvoker)delegate { this.OnScintillaControlUpdateControl(sci); });
         return;
     }
     ITabbedDocument document = DocumentManager.FindDocument(sci);
     if (sci != null && document != null && document.IsEditable)
     {
         Int32 column = sci.Column(sci.CurrentPos) + 1;
         Int32 line = sci.LineFromPosition(sci.CurrentPos) + 1;
         String statusText = " " + TextHelper.GetString("Info.StatusText");
         String file = PathHelper.GetCompactPath(sci.FileName);
         String eol = (sci.EOLMode == 0) ? "CR+LF" : ((sci.EOLMode == 1) ? "CR" : "LF");
         String encoding = ButtonManager.GetActiveEncodingName();
         this.toolStripStatusLabel.Text = String.Format(statusText, line, column, eol, encoding, file);
     }
     else this.toolStripStatusLabel.Text = " ";
     this.OnUpdateMainFormDialogTitle();
     ButtonManager.UpdateFlaggedButtons();
     NotifyEvent ne = new NotifyEvent(EventType.UIRefresh);
     EventManager.DispatchEvent(this, ne);
 }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:27,代码来源:MainForm.cs

示例2: OnScintillaControlUpdateControl

		/**
		* Refreshes the statusbar display and 
		* updates the important edit buttons
		*/
		public void OnScintillaControlUpdateControl(ScintillaControl sci)
		{
			if (sci != this.CurSciControl) return;
			int column = sci.Column(sci.CurrentPos)+1;
			int line = sci.LineFromPosition(sci.CurrentPos)+1;
			string file = sci.Tag.ToString();
			int eolMode = sci.EOLMode;
			string eol = (eolMode == 0) ? "CR+LF" : ((eolMode == 1) ? "CR" : "LF");
			string txt = "  Line: "+line+"  |  Column: "+column+"  |  EOL: ("+eol+")  |  "+file;
			// reduce the path to fit 128 chars max in the status bar
			while (txt.Length > 128 && re_pathDirectory.IsMatch(txt)) {
				txt = re_pathDirectory.Replace(txt, @"\...\", (int)1);
			}
			this.statusBarPanel.Text = txt;
			
			this.Text = this.CurDocument.Text+" - FlashDevelop";
			this.CheckActiveEncodingButton(sci.Encoding.CodePage);
			this.CheckActiveLanguageButton(sci.ConfigurationLanguage);
			this.CheckActiveEOLButton(sci.EOLMode);
			this.UpdateButtonsEnabled();
			//
			NotifyEvent ne = new NotifyEvent(EventType.UIRefresh);
			Global.Plugins.NotifyPlugins(this, ne);
		}
开发者ID:heon21st,项目名称:flashdevelop,代码行数:28,代码来源:MainForm.cs

示例3: OnChar


//.........这里部分代码省略.........
                                {
                                    text = sci.GetLine(line).TrimStart();
                                    if (text.StartsWith(checkStart))
                                    {
                                        sci.SetLineIndentation(line, indent);
                                        sci.InsertText(sci.PositionFromLine(line), LineEndDetector.GetNewLineMarker(sci.EOLMode));
                                    }
                                }
                                // Indent the code
                                if (subIndent) indent += sci.Indent;
                                sci.SetLineIndentation(line, indent);
                                position = sci.LineIndentPosition(line);
                                sci.SetSel(position, position);
                            }
                            finally { sci.EndUndoAction(); }
                            return;
                        }
                        else if (!text.EndsWith(">"))
                        {
                            ctag = GetXMLContextTag(sci, sci.CurrentPos);
                            if (ctag.Tag == null || ctag.Name == null) return;
                            // We're inside a tag. Visual Studio indents with regards to the first line, other IDEs indent using the indentation of the last line with text.
                            int indent;
                            string tag = (ctag.Tag.IndexOf('\r') > 0 || ctag.Tag.IndexOf('\n') > 0) ? ctag.Tag.Substring(0, ctag.Tag.IndexOfAny(new[] {'\r', '\n'})).TrimEnd() : ctag.Tag.TrimEnd();
                            if (tag.EndsWith("\""))
                            {
                                int i;
                                int l = tag.Length;
                                for (i = ctag.Name.Length + 1; i < l; i++)
                                {
                                    if (!char.IsWhiteSpace(tag[i]))
                                        break;
                                }
                                indent = sci.Column(ctag.Position) + sci.MBSafePosition(i);
                            }
                            else
                            {
                                indent = sci.GetLineIndentation(sci.LineFromPosition(ctag.Position)) + sci.Indent;
                            }

                            sci.SetLineIndentation(line, indent);
                            position = sci.LineIndentPosition(line);
                            sci.SetSel(position, position);
                            return;
                        }
                    }
                    break;
                    
                case '<':
                case '/':
                    if (value == '/')
                    {
                        if ((position < 2) || ((Char)sci.CharAt(position-2) != '<')) return;
                        ctag = new XMLContextTag();
                        ctag.Position = position - 2;
                        ctag.Closing = true;
                    }
                    else 
                    {
                        ctag = GetXMLContextTag(sci, position);
                        if (ctag.Tag != null) return;
                    }
                    // Allow another plugin to handle this
                    de = new DataEvent(EventType.Command, "XMLCompletion.Element", ctag);
                    EventManager.DispatchEvent(PluginBase.MainForm, de);
                    if (de.Handled) return;
开发者ID:ImaginationSydney,项目名称:flashdevelop,代码行数:67,代码来源:XMLComplete.cs


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