• 大小: 2.09MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-30
  • 语言: 其他
  • 标签:

资源简介

大家一起共享 这个程序一共有五个窗体, 大家一起共享 这个程序一共有五个窗体,大家一起共享 这个程序一共有五个窗体,大家一起共享 这个程序一共有五个窗体,大家一起共享 这个程序一共有五个窗体,

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using catchMe;

namespace WindowsApplication47
{
    public partial class Form1 : Form
    {
        static void Main()
        {
            
            Application.Run(new Form1());
        }

        public enum DocumentType
        {
            TXTDocument RTFDocument

        }
        //当前打开的文件名
        private string curFileName = ““;

        //当前打开的文档类型
        private DocumentType curFileType = DocumentType.RTFDocument;

        //当前使用的字体
        private Font curFont = new Font(“宋体“ 10 Fontstyle.Regular GraphicsUnit.Point);

        //当前文件名
        private string NewDefaultFileName = “新文档“;

        //打印设置
        //private PrinterSettings StoredPrintSetting = null;

        //查找与替换窗体
        private Form3 findwindow;
        public Form1()
        {
            InitializeComponent();
        }

        private void NewFile()
        {
            if (this.richTextBox1.Modified)
            {
                DialogResult dr = MessageBox.Show(“当前文档已经被修改,是否保存?“ “提示信息“ MessageBoxButtons.YesNoCancel MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    this.SaveFile();
                }
                else if (dr == DialogResult.Cancel)
                {
                    return;
                }
            }
            this.richTextBox1.Clear();
            this.richTextBox1.ResetText();
            this.curFileName = NewDefaultFileName;
            this.curFileType = DocumentType.RTFDocument;
            this.ShowFormtitle();
            this.statusBar1.Panels[0].Text = “RTF格式文档“;
            this.richTextBox1.Modified = false;
        }
        private void mnuFileNew_Click(object sender EventArgs e)
        {
            NewFile();
        }
        private void ShowFormtitle()
        {
            this.Text += “-[“ + curFileName + “]“;
        }
        private void OpenFile()
        {
            string filename = ““;//获取文件名
            string fileExt;//获取扩展名
            if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                filename = this.openFileDialog1.FileName;
            }

            if (filename != String.Empty)
            {
                this.richTextBox1.ResetText();
                try
                {
                    fileExt = System.IO.Path.GetExtension(filename).ToUpper();
                    if (fileExt == “.RTF“)//打开RTF格式文档
                    {
                        this.richTextBox1.LoadFile(filename RichTextBoxStreamType.RichText);
                        this.curFileType = DocumentType.RTFDocument;
                        this.statusBar1.Panels[0].Text = “RTF格式文档“;
                    }
                    else if (fileExt == “.TXT“)//打开纯文本格式

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        927  2009-03-05 15:07  WindowsApplication47\WindowsApplication47.sln

    ..A..H.     24576  2009-03-06 12:51  WindowsApplication47\WindowsApplication47.suo

     文件      26202  2009-03-05 23:49  WindowsApplication47\WindowsApplication47\Form1.cs

     文件      47643  2009-03-06 14:18  WindowsApplication47\WindowsApplication47\Form1.Designer.cs

     文件     255161  2009-03-05 23:49  WindowsApplication47\WindowsApplication47\Form1.resx

     文件        524  2009-03-05 15:03  WindowsApplication47\WindowsApplication47\Form2.cs

     文件       4651  2009-03-05 15:03  WindowsApplication47\WindowsApplication47\Form2.Designer.cs

     文件     309200  2009-03-05 15:03  WindowsApplication47\WindowsApplication47\Form2.resx

     文件       6519  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form3.cs

     文件       8484  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form3.Designer.cs

     文件     243506  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form3.resx

     文件        463  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form4.cs

     文件       3526  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form4.Designer.cs

     文件     243506  2009-03-05 15:04  WindowsApplication47\WindowsApplication47\Form4.resx

     文件       4325  2009-03-06 12:49  WindowsApplication47\WindowsApplication47\Form5.cs

     文件          3  2009-03-06 12:49  WindowsApplication47\WindowsApplication47\Form5.designer.cs

     文件     285705  2009-03-06 12:49  WindowsApplication47\WindowsApplication47\Form5.resx

     文件      10806  2009-03-05 14:55  WindowsApplication47\WindowsApplication47\Properties.ico

     文件       4736  2009-03-05 23:39  WindowsApplication47\WindowsApplication47\WiterBank.csproj

     文件       1212  2009-03-04 22:23  WindowsApplication47\WindowsApplication47\Properties\AssemblyInfo.cs

     文件       2894  2009-03-04 22:23  WindowsApplication47\WindowsApplication47\Properties\Resources.Designer.cs

     文件       5612  2009-03-04 22:23  WindowsApplication47\WindowsApplication47\Properties\Resources.resx

     文件       1103  2009-03-04 22:23  WindowsApplication47\WindowsApplication47\Properties\Settings.Designer.cs

     文件        249  2009-03-04 22:23  WindowsApplication47\WindowsApplication47\Properties\Settings.settings

     文件        503  2009-03-05 15:06  WindowsApplication47\WindowsApplication47\obj\WindowsApplication47.csproj.FileList.txt

     文件        527  2009-03-06 14:18  WindowsApplication47\WindowsApplication47\obj\WiterBank.csproj.FileList.txt

     文件     187167  2009-03-06 14:18  WindowsApplication47\WindowsApplication47\obj\Debug\catchMe.Form5.resources

     文件       1016  2009-03-05 15:05  WindowsApplication47\WindowsApplication47\obj\Debug\WindowsApplication47.csproj.GenerateResource.Cache

     文件     933888  2009-03-06 14:18  WindowsApplication47\WindowsApplication47\obj\Debug\WindowsApplication47.exe

     文件     165357  2009-03-06 14:18  WindowsApplication47\WindowsApplication47\obj\Debug\WindowsApplication47.Form1.resources

............此处省略55个文件信息

评论

共有 条评论

相关资源