Exemplo n.º 1
0
        //=========================================================================================
        #endregion
        //=========================================================================================
        internal static SyntaxSettings CreateSettings(PredefinedLanguage syntaxType)
        {
            switch (syntaxType)
            {
            case PredefinedLanguage.None:
                return(new NonSyntaxSettings());

            case PredefinedLanguage.MsSql:
            case PredefinedLanguage.Access:
                return(new MsSqlSyntaxSettings());

            case PredefinedLanguage.Xml:
                return(new XmlSyntaxSettings());

            case PredefinedLanguage.MySql:
                return(new MySqlSyntaxSettings());

            case PredefinedLanguage.Oracle:
                return(new OracleSyntaxSettings());

            case PredefinedLanguage.CSharp:
                return(new CSharpSyntaxSettings());

            case PredefinedLanguage.VisualBasic:
                return(new VisualBasicSyntaxSettings());

            default:
                throw new NotSupportedException(((int)syntaxType).ToString());
            }
        }
Exemplo n.º 2
0
        //=========================================================================================
        public CodeViewer()
        {
            this.BackColor = SystemColors.Window;
            this._Language = PredefinedLanguage.None;
            this.Document  = new Document();
            this.Spans     = new TextSpanCollection(this);
            this.InitializeComponent();
            this.SetDefaultFont();

            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.ResizeRedraw, true);

            this.EditController = new EditingController(this);
            this._Body.SetOwner(this);

            this._Body.KeyDown   += new KeyEventHandler(_Body_KeyDown);
            this._Body.KeyUp     += new KeyEventHandler(_Body_KeyUp);
            this._Body.MouseDown += new MouseEventHandler(_Body_MouseDown);

            this._Body.TextChanged += new EventHandler(_Body_TextChanged);
        }
Exemplo n.º 3
0
		//========================================================================================= 
		#endregion
		//=========================================================================================
		internal static SyntaxSettings CreateSettings(PredefinedLanguage syntaxType)
		{
			switch (syntaxType)
			{
				case PredefinedLanguage.None:
					return new NonSyntaxSettings();
				case PredefinedLanguage.MsSql:
				case PredefinedLanguage.Access:
					return new MsSqlSyntaxSettings();
				case PredefinedLanguage.Xml:
					return new XmlSyntaxSettings();
				case PredefinedLanguage.MySql:
					return new MySqlSyntaxSettings();
				case PredefinedLanguage.Oracle:
					return new OracleSyntaxSettings();
				case PredefinedLanguage.CSharp:
					return new CSharpSyntaxSettings();
				case PredefinedLanguage.VisualBasic:
					return new VisualBasicSyntaxSettings();
				default:
					throw new NotSupportedException(((int)syntaxType).ToString());
			}
		}
Exemplo n.º 4
0
		//=========================================================================================
		public CodeViewer()
		{
            this.BackColor = SystemColors.Window;
            this._Language = PredefinedLanguage.None;
			this.Document = new Document();
			this.Spans = new TextSpanCollection(this);
			this.InitializeComponent();
			this.SetDefaultFont();

			this.SetStyle(ControlStyles.DoubleBuffer, true);
			this.SetStyle(ControlStyles.UserPaint, true);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.ResizeRedraw, true);

			this._Body.SetOwner(this);

			this._Body.KeyDown += new KeyEventHandler(_Body_KeyDown);
			this._Body.KeyUp += new KeyEventHandler(_Body_KeyUp);
			this._Body.MouseDown += new MouseEventHandler(_Body_MouseDown);

			this._Body.TextChanged += new EventHandler(_Body_TextChanged);
		}