`
daojin
  • 浏览: 674134 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

YOU SAY "THE RULE IS HERE",BUT I SAY "WHY?"

阅读更多

 

主要是想写一个类似控制台的东西,可以监视我程序里面的动作。。。

 

直接用控制台也行,但是那样太刻板!没创意。。。我想给用户以提示,告诉他程序在干什么!!!!!!非常良好的界面。。。。。。

 

先写一些想法,然后再去弄:

1.接口: 只有一个那就是print(string str);为简单期间,就这样了;

2.行为的载体: 暂时选,一个Windows窗口吧,当然也可以是文件。 模式选择: 作为一个窗口,应该使用监听者模式,也就是他应该去监听Print事件,一个事件其实就是 一个函数调用。 窗口作为一个监听者而存在。 真的么???????????有一个更加抽象的东西存在,那就是, PRINTLISTENER:而不是窗口LISTERNER,窗口仅仅是个公告板。 (监听者模式实际上就是一个广播性质。。。我这里起火了,所有与我相关的警报器都得啦响); 这里其实很简单就是一个函数调用:(因为就只有一个监听者) PRINTListener.print();

3.控制台窗口的创建与更新: 创建的过程应该在行为发生之前。 更新发生在行为之后,或者说函数返回之前。

4.windows的局限性: 因为用的是windows,所以窗口的绘制最好还是利用操作系统自带的 方式,不然的话,自己动手画一个,贼复杂。(不是不可以);

例如: 先得到一个全局的DC,然后绘制一个窗口。。

 5.现在的问题是如何利用既定的WINDOWS规则来完成任务。 首先,所有的窗口绘制是通过WINDOWS消息完成的。 6.必须有消息,和消息循环,以及消息队列。

7.也就是说它的跑圈圈(如果它的圈圈跑得很到位,最好是不要动他,为什么呢?? 跑圈圈的东西被认为是不变的东西。。。。。。。。 把 不变的跟经常改变的分开,,几乎是软件开发的真谛!!!!!!!! )。

8.固定的规则: 如果让它不停地去拿一个它应该打印的东西去打印,这将是一个不错的注意。

9.有个很好的主意是构造一个队列。。。。。。。。

10。队列有很多种形式。。。 我想到了 StringBuffer,想到了流。。。。。

11.好了。。。一切OK。

12.也许可以用流。。。。。。这也是个不错的想法。。。。。

13.我们的数据放到流里边。。。

14.当然不能用cin,cin是个跟标准控制台窗口相关的流。 结论: 只要是队列(模式)。。。。没有不可以的!!!!!!!!注意: 队列仅仅是个抽象的概念!!!!!!!!!!! 从屁股后面进,从头顶出来的链表~!!!!!!!!!

 15.。。。。。。。。。。。好了。。一切OK!吃饭。。。 我准备造几个队列咯!!

分享到:
评论

相关推荐

    They-Say-I-say-PDF-templates.pdf

    They-Say-I-say-PDF-templates 模板

    2012英语资料

    37、--Excuse me, but can you tell me the way to the post office? --_____ A:Don't ask that. B:Sorry, I'm a stranger here. C:No, I can't say that. D:No, you're driving too fast. 38、- I've got ...

    7 Rules Of Writing Good Code

    Good code — it’s a debatable mystery ...Here are my 7 Rules of writing good code and the reasons why I advocate for them. Rule #1: Don’t Write a Mystery Novel Complexity is the bane of inherited c

    All New Electronics Self Teaching Guide (Self-Teaching Guides) by Harry Kybett

    In case you are wondering (and I know I was), the third edition is actually written by Earl Boysen now since Harry Kybett, having written the first two editions, has passed away. The Q & A format is ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    They are marked by the triangle icon, which you see here on your left. Click it now. You should see "Hooray" appear below. Hooray! Now you know you can expand points to get more details. ...

    They Say I Say The Moves That Matter in Academic Writing (Third Edition)

    They Say I Say The Moves That Matter in Academic Writing (Third Edition) 2014 Gerald Graff Cathy Birkenstein. 经典英文论文写作指南。

    Mining the social web

    I’ll be forthright, however, and say upfront that one of the chief complaints you’re likely to have about this book is that all of the chapters are far too short. Unfortunately, that’s always the ...

    Effective Modern C++ 原版pdf by Meyers

    but if you’re looking for guidance on how to employ the features to create software that’s correct, efficient, maintainable, and portable, the search is more challenging. That’s where this book ...

    Expert Oracle Database Architecture 9i and 10g programming Techniques and Solutions

    not aware of them, this can come back to haunt you (I’m not referring to bugs, but the way the feature is supposed to work and what it was really designed to do). In this book I strove to not only ...

    微软内部资料-SQL性能优化2

    If you restart with the 3 GB switch, also known as 4-Gig Tuning, the amount of non-paged pool is reduced to 128 MB from 256 MB. For a process to access 3 GB of address space, the executable image ...

    Understanding PaaS

    Understanding PaaS by Michael P. McGrath 2012-01-12 First release For years, I worked as the Fedora Project’s ... I hope the answers contained in this book will help you innovate even better.

    Windows Server 2008 Portable Command Guide_ MCTS 70-640, 70-642, 70-643

    words, you know the theory behind why you’d stop and restart the netlogon service and why you have to join a Server Core computer to a domain from the command prompt, but you might not always ...

    coding in delphi 2015

    agree with the characterization that comes with the term “bloat,” I have no choice but to concede the point about binary size. However, I’m going to press forward with the assumption that binary ...

    公共英语三级pets 3口语教材.doc

    When you do listening exercise, You didn’t hear anything, you didn’t understand anything, but you can get the true answer. If you didn’t understand the question,what would you do? Did you hear ...

    Arduino For Dummies

    I'd say the best way get started with Arduino is to find a workshop near you and see where it takes you. Workshops really accelerate your learning and put you in an environment with like-minded people...

    Dan_Saks_const_T_vs_T_const

    say about that subject, but before I do, I’d like to reply to the following query I received through e-mail from Phil Baurer at Komatsu Mining Systems: “We’re having an interesting prob- lem using ...

    rsa加密攻击源程序

    The attack can be improved, but i'm lazy so i only did the easier version :). 4. Low Exponent Attack: If E=3 and the message is short enough and not padded then there's a possibility that M^E ...

    Writing.An.Interpreter.In.Go.epub

    This is the book I wanted to have a year ago. This is the book I couldn't find. I wrote this book for you and me. So why should you buy it? What's different about it, compared to other interpreter or ...

    Mastering Machine Learning with R, 2nd Edition-Packt Publishing(2017).epub

    This is also important when you have to share code with coworkers and, dare I say, regulators. Using RStudio facilitates this standardization in the most recent versions. What sort of standards! Well...

    MMTools.D7.Incl.Unlocker.v2.0.Win9xNT-TMG

    If you want them to run without that you‘ll need to use my unlocker :) I‘d like to say that the most complicated part of the protection is situated in mmutil32.dll. I had to create a tool that ...

Global site tag (gtag.js) - Google Analytics