This commit is contained in:
38
PROMS/Volian.Controls.Library/frmViewTextFile.cs
Normal file
38
PROMS/Volian.Controls.Library/frmViewTextFile.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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 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 Note found: {0}", _FileName), "Error Displaying File", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user