40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.ComponentModel;
 | |
| using System.Data;
 | |
| using System.Drawing;
 | |
| using System.Text;
 | |
| using System.Windows.Forms;
 | |
| using System.IO;
 | |
| 
 | |
| namespace Volian.Controls.Library
 | |
| {
 | |
| 	public partial class frmViewTextFile : DevComponents.DotNetBar.Office2007Form //Form
 | |
| 	{
 | |
| 		string _FileName;
 | |
| 		RichTextBoxStreamType _RTBType;
 | |
| 		//public string FileName
 | |
| 		//{
 | |
| 		//    get { return _FileName; }
 | |
| 		//    set { _FileName = value; }
 | |
| 		//}
 | |
| 		public string ButtonText
 | |
| 		{
 | |
| 			get { return buttonX1.Text; }
 | |
| 			set { buttonX1.Text = value; }
 | |
| 		}
 | |
| 		public frmViewTextFile(string filename, RichTextBoxStreamType rtbtype)
 | |
| 		{
 | |
| 			_FileName = filename;
 | |
| 			_RTBType = rtbtype;
 | |
| 			InitializeComponent();
 | |
| 		}
 | |
| 		private void frmViewTextFile_Load(object sender, EventArgs e)
 | |
| 		{
 | |
| 			if (File.Exists(_FileName))
 | |
| 				rtbViewFile.LoadFile(_FileName,_RTBType);
 | |
| 			else
 | |
| 				MessageBox.Show(string.Format("File Not found: {0}", _FileName), "Error Displaying File", MessageBoxButtons.OK, MessageBoxIcon.Error);
 | |
| 		}
 | |
| 	}
 | |
| } | 
