| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1214 人关注过本帖
标题:今天逛了一天中关村图书大厦,
只看楼主 加入收藏
刘定邦
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
帖 子:687
专家分:1570
注 册:2010-9-21
收藏
得分:3 
以下是引用BlueGuy在2011-3-20 21:24:35的发言:

我感觉我很有艺术细胞, 说不定会去做美工之类的...
有艺术细菌。就学吧。
2011-03-21 15:26
古手梨花
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:7
帖 子:340
专家分:615
注 册:2010-11-1
收藏
得分:3 
PHOTOSHOP这东西 很难吗
哥表示 毫无压力
难得的 哥不会画画
学了  用处也不是很大

其实我只会一点“hello world”程序。
2011-03-22 00:06
丞相杀手
Rank: 6Rank: 6
等 级:侠之大者
帖 子:203
专家分:462
注 册:2011-1-11
收藏
得分:3 
以下是引用qq1023569223在2011-3-20 22:15:58的发言:

C#感觉要学的东西太多了,又不好理解!不好学哪些,总之现在很迷茫!



用着学着就不难了

斗不过疯子,不参与争论。
2011-03-22 00:23
pangding
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:北京
等 级:贵宾
威 望:94
帖 子:6784
专家分:16751
注 册:2008-12-20
收藏
得分:3 
我也经常名逛中关村图书大厦,买的书五花八门。
2011-03-22 11:02
qq1023569223
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:湖南科技大学
等 级:贵宾
威 望:26
帖 子:2753
专家分:13404
注 册:2010-12-22
收藏
得分:0 
C#的文本编辑器我已经写好了咯!
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using

namespace WindowsApplication6
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int flag = 0,strlen=0;
        string filepath = "",str="";
        private void 打开OToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult r;
            StreamReader sr;
            if (richTextBox1.Text != string.Empty)
                保存SToolStripMenuItem_Click(sender, e);
            else
                richTextBox1.Clear();
            r=openFileDialog1.ShowDialog();
            if (r != DialogResult.Cancel)
            {
                sr = new StreamReader(openFileDialog1.FileName,Encoding.GetEncoding("GB2312"));
                filepath = openFileDialog1.FileName;
                while(sr.Peek() != -1)
                {
                    richTextBox1.Text += sr.ReadLine()+Environment.NewLine;
                }
                sr.Close();
                flag = 1;
            }
        }

        private void 保存SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (richTextBox1.Text == "")
            {
                MessageBox.Show("There is nothing to save!", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Error);
                richTextBox1.Focus();
            }
            else if (flag == 0)
            {
                DialogResult r;
                StreamWriter sw;
                r = saveFileDialog1.ShowDialog();
                if (r != DialogResult.Cancel)
                {
                    sw = new StreamWriter(saveFileDialog1.FileName);
                    string[] sp ={ "\n" };
                    string[] s = richTextBox1.Text.Split(sp, StringSplitOptions.RemoveEmptyEntries);
                    for(int i=0;i<s.Length;i++)
                    sw.WriteLine(s[i]);
                    sw.Close();
                }
               
                richTextBox1.Clear();
                flag = 0;
            }
            else
            {
                StreamWriter sw = new StreamWriter(filepath);
                string[] sp ={ "\n" };
                string[] s = richTextBox1.Text.Split(sp, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < s.Length; i++)
                    sw.WriteLine(s[i]);
                sw.Close();
                richTextBox1.Clear();
                flag = 0;
            }
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (flag==1||richTextBox1.Text != "")
            {
                DialogResult r;
                r = MessageBox.Show("Do you want to save file?", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (r == DialogResult.Yes)
                    保存SToolStripMenuItem_Click(sender, e);
                else
                {
                    richTextBox1.Clear();
                }
            }
           
        }

        private void 退出XToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void 全选AToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.SelectAll();
        }

        private void 剪切TToolStripMenuItem_Click(object sender, EventArgs e)
        {
            str = richTextBox1.SelectedText;
            richTextBox1.Cut(); ;
        }

        private void 复制CToolStripMenuItem_Click(object sender, EventArgs e)
        {
            str = richTextBox1.SelectedText;
            richTextBox1.Copy();
        }

        private void 删除DToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.SelectedText = "";
        }

        private void 颜色CToolStripMenuItem_Click(object sender, EventArgs e)
        {
            colorDialog1.ShowDialog();

            richTextBox1.SelectionColor = colorDialog1.Color;
        }

        private void 字体FToolStripMenuItem_Click(object sender, EventArgs e)
        {
            fontDialog1.ShowDialog();
            richTextBox1.SelectionFont =fontDialog1.Font;  
        }

        private void 字数LToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string s = richTextBox1.SelectedText;
            int j = 0;
            for (int k = 0; k < s.Length; k++)
            {
                if (s[k] == '\n' || s[k] == ' ')
                    j++;
            }
            int i=richTextBox1.SelectionLength;
            strlen = i - j;
            MessageBox.Show("Total:" + strlen.ToString(), "SelectionLength", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
        }

        private void 关于NToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox1 ab = new AboutBox1();
            ab.Show();
        }

        private void 撤消ZToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Undo();
        }

        private void 重复RToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Redo();
        }

        private void 粘贴PToolStripMenuItem_Click(object sender, EventArgs e)
        {
             richTextBox1.Paste();
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            richTextBox1.Width =ActiveForm.Width;
            richTextBox1.Height =ActiveForm.Height;
        }

        private void richTextBox1_MouseDown(object sender, MouseEventArgs e)
        {
            Point p = MousePosition;
            if(e.Button==MouseButtons.Right)
                contextMenuStrip1.Show(p.X, p.Y);
        }
    }
}

[ 本帖最后由 qq1023569223 于 2011-3-22 11:21 编辑 ]

   唯实惟新 至诚致志
2011-03-22 11:19
yimin123
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-4-9
收藏
得分:0 
移民 投资移民 新加坡移民 就上360移民网 http://www.
2011-04-09 16:21
快速回复:今天逛了一天中关村图书大厦,
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018174 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved