亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? article.htm

?? outlookbar 一款不錯的C#開發(fā)控件
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<html>

<body>

<b>Table Of Contents</b>
<dl>
<dd><a href="#Introduction">Introduction</a></dd>
<dd><a href="#MinReq">Minimum Requirements</a></dd>
<dl>
<dd><a href="#Req1">Requirements: What I Need</a></dd>
<dd><a href="#Req2">Requirements: What I Don't Need</a></dd>
</dl>
<dd><a href="#ProtoDesign">The Prototype Design</a></dd>
<dl>
<dd><a href="#Proto1A">The GUI Components</a></dd>
<dd><a href="#Proto1B">The Object Model</a></dd>
</dl>
<dd><a href="#ProtoImp">The Prototype Implementation</a></dd>
<dl>
<dd><a href="#ProtoImp1">The Objects</a></dd>
<dl>
<dd><a href="#OutlookBar">OutlookBar</a></dd>
<dd><a href="#IconPanel">IconPanel</a></dd>
</dl>
<dd><a href="#EyeCandy">Eye Candy</a></dd>
</dl>
<dd><a href="#Conclusion">Conclusion</a></dd>
</dl>

<h2><a name="#Introduction">Introduction</a></h2>
This is yet another Outlook Bar implementation.  While Carlos xxx has written an excellent implementation in C#, I wanted an implementation that wasn't heavily dependent
upon <code>gdi32</code>, <code>user32</code>, and <code>comctl32</code> DLL's, and wasn't deeply entwined in someone's framework.  Ironic, isn't it!  Because I need an
implementation that is better suited for the Application Automation Layer (AAL) framework, and Carlos' implementation, while very thorough, isn't well suited for the
AAL vision of things.  I guess this is why the wheel keeps getting re-invented--because you need different wheels for different jobs.<p>

I'm also going to do something I don't see too often in Code Project articles.  Most articles are written "after the fact".  That is, the component or program is already
implemented, and the article describes its design, usage, and interesting implementation details.  In this article, I'm going to expose the development process so that the
reader sees the steps that I took in implementing the control.  It's certainly fun to write an article in this manner, and I hope it's just as fun to read it!

<h2><a name="#MinReq">Minimum Requirements</a></h2>
I'll start with requirements.  This is about the only formal design process step to which I conform, and even that is problematic, as requirements are a continually evolving
thing in my world.  In order to limit the amount of time I spend on something, I have to identify what my minimum requirements are.  I depend heavily on working the concept that
the architecture that I develop will accommodate additional requirements as time goes on.<p>

I find it useful to identify in the requirements both what I need and what I don't need.  The "don't need" list is a good resource for keeping track of future expansion and helps
to design a good architecture to support those future requirements.  One general requirement though--while I'm eventually going to 
incorporate the control into the AAL, I'd like to
develop it outside of the framework, so that others can more easily modify it and 
incorporate it into their own applications.

<h3><a name="#Min1">Requirements: What I Need</a></h3>

<ul>
  <li>The control has a specifiable but fixed width</li>
  <li>The control has a specifiable but fixed height</li>
  <li>The control contains an number of "bands"</li>
  <li>A band consists of two things: a button-like control at the top of the band and a collection of items</li>
  <li>Each item in the band has an icon associated with it</li>
  <li>Left clicking on the item in the band fires an event</li>
  <li>Stay within the confines of the .NET environment.&nbsp; (No DllImport 
  stuff)</li>
  <li>XML defined--band text, icon bitmaps, event names</li>
  <li>Owner drawn stuff should be minimized and the control should look good 
  when a manifest is being used.</li>
  </ul>

<h3><a name="#Min2">Requirements: What I Don't Need</a></h3>

  <ul>
    <li>Resizing the control and the issues that are involved</li>
    <li>Large and small icon support</li>
    <li>Those cute little band scrolling buttons.  I like scroll bars better, anyways.</li>
    <li>Popup context menus</li>
    <li>Animation (the band "opens" in an animated fashion)</li>
    <li>A form designer compatible control.&nbsp; Don't use it, don't need it.</li>
    <li>Other kinds of controls in the band other than icons.</li>
    <li>Bands cannot be re-ordered by the user (dragging them to change their 
    order).</li>
    </ul>
    <p>That's sufficient to begin with.&nbsp; As I start developing the control, 
    this list will probably change.&nbsp; (It's interesting writing this, 
    because I haven't begun work on the control yet, so I don't really know if 
    this is true, but experience has shown that it <u>always</u> is true!</p>
    <p>

<h2><a name="#ProtoDesign">The Prototype Design</a></h2>

<h3><a name="#Proto1A">The GUI Components</a></h3>

<p>This step involves getting a basic architecture to support the requirements.&nbsp; 
Since one of the goals is to stay within the .NET framework of available tools, 
the primary device for implementing an Outlook bar will be panels.&nbsp; One of 
the nice things about panels is that they provide an automatic scrolling feature 
for their contents.&nbsp; And fortunately, this auto-scroll capability can also 
be turned off.&nbsp; I am a firm believer (having it drilled into me by my 
boss/neighbor when I was a kid) that concepts should be communicated in words as 
well as in pictures.&nbsp; By being able to clearly communicate a design in 
words, a dictionary of terms is established which promotes a common 
understanding of design concepts and is a stepping stone for determining 
implementation issues.</p>
<p>With that in mind, the basic architecture that I have in mind is this:</p>
<ol>
  <li>The entire bar will be implemented as a panel (we'll call it the &quot;bar 
  panel&quot;) with auto-scrolling disabled</li>
  <li>Each bar will consist of a child &quot;band panel&quot; that contains the band 
  caption represented as a button.&nbsp; This panel will also have 
  auto-scrolling disabled.&nbsp; The panel will be sized to the height of the 
  button when the band is unselected, and will be expanded vertically to the 
  size of the parent panel when expanded</li>
  <li>An &quot;icon panel&quot; will be used as a child to the above panel.&nbsp; It will 
  be physically positioned so that it starts just below the button in the parent 
  panel.&nbsp; This panel <u>will</u> have auto-scrolling enabled, as it will 
  contain the icons that may expand beyond the vertical confines of the entire 
  band.</li>
  <li>From a design point of view, this icon panel needs to be abstracted 
  sufficiently to support other kinds of panels, such as &quot;tree view panel&quot; or 
  &quot;list view panel&quot; (see Carlos' implementation).</li>
  <li>While I'm not going to bother with small and large icon support in this 
  version, implementing an image list is a good idea, if for no other reason 
  than because it supports background color definition.</li>
</ol>
<p>Here's a picture of what I have in mind:</p>
<img src="CSOutlookBar\design.jpg" width="193" height="481">

<p>The horizontal and vertical extents of each panel are for illustrative 
purposes only and won't necessarily match the actual implementation.</p>
<h3><a name="#Proto1B">The Object Model</a></h3>

<p>Now that the layout of the GUI components as been developed, the next step is 
to design an object model that supports this structure.&nbsp; There is a rule of 
thumb that I use when working with any pre-existing classes, as is the case here 
(buttons and panels).&nbsp; Always provide a specialization for the class (as 
in, a derived class) or a wrapper for the object.&nbsp; While I do violate this 
rule more than I'd like to admit, it is a good one to follow, because it allows 
for the expansion of the object model at a later time.&nbsp; If the pre-existing 
class is used directly, it is almost always certain that later on in the design 
some specialization will be required.&nbsp; Adding specialization later, in the 
midst of implementation, can result in lots of class renaming and re-testing.&nbsp; 
Refactoring, whenever it is done, is a great idea, but it can be really 
expensive.</p>
<p>The question then becomes whether to implement a specialized class or a 
wrapper class.&nbsp; There are some old terms for this that are still useful but 
not too often heard anymore--&quot;is a kind of&quot; and &quot;has a&quot;.&nbsp; These represent 
specialization and wrapping, respectively.&nbsp; In many cases, it's pretty 
difficult to figure out which to use, as is the case here.&nbsp; To help with 
that decision, I often rely on an analysis of the semantics used to describe the 
problem.&nbsp; In this case, each object, the bar panel, the band panel, and the 
icon panel, are all forms of specialization.&nbsp; If these objects are derived 
from the Panel class, the architecture can leverage (don't you love that word) 
the Panel control collection.&nbsp; This avoids implementing a separate 
collection (contrast this to Carlos' implementation, which has a band collection 
and an item collection).&nbsp; Hopefully, this design decision will not bite us 
later on.&nbsp; Why do I say this?&nbsp; Because experience has taught me not to 
rely too heavily on framework functionality.&nbsp; There are often unwanted 
side-effects.</p>
<p>Again, by observing the semantics of the GUI component layout and the 
diagram, it is clear where the &quot;has a&quot; relationships are:</p>
<ul>
  <li>The bar panel object has a band panel</li>
  <li>the band panel has a button and a icon panel</li>
  <li>the icon panel has a collection of icons.</li>
</ul>
<p>Some of the &quot;has a&quot; relationships are in the form of containers, which brings 
up the important issue of determining the m to n relationship of objects:</p>
<ul>
  <li>The bar panel to band panel relationship is 1::n</li>
  <li>The band panel to button relationship is 1::1</li>
  <li>The band to icon panel relationship is 1::1</li>
  <li>The icon panel to icon relationship is 1::n</li>
</ul>
<p>While I pretty much don't bother with object model diagrams anymore, I put 
this one together:</p>

<img src="CSOutlookBar\objectModel1.jpg" width="627" height="529"><p>

I usually don't specify methods and intrinsic properties during design time when developing on my own because it's sort of a waste of time.
As a project manager, I don't enforce these definitions at design time either with the people I trust.  The programmers that I don't trust to write
good code (and there's a lot of "senior software engineers" out there that fit this bill) are required to come up with a complete object model design and psuedo code.
I also enforce naming conventions, case usage, and verb-noun ordering of method names.  And for the record, I think Hungarian notation is awful.

<h2><a name="#ProtoImp">The Prototype Implementation</a></h2>

<h3><a name="#ProtoImp1">The Objects</a></h3>
Using the above diagram results in the following stubs for the various objects. Because the <code>Panel.Controls</code> property is used for 
containing the control lists, you will not see containers or collections implemented in the class definition.
<pre>using System;
using System.Windows.Forms;

namespace OutlookBar
{
	public class OutlookBar : Panel
	{
		public OutlookBar()
		{
		}
	}

	internal class BandPanel : Panel
	{
		public BandPanel()
		{
		}
	}

	internal class BandButton : Button
	{
		public BandButton()
		{
		}
	}

	public abstract class ContentPanel : Panel
	{
		public ContentPanel()
		{
		}
	}

	public class IconPanel : ContentPanel
	{
		public IconPanel()
		{
		}
	}

	internal class PanelIcon : PictureBox
	{
		public PanelIcon()
		{
		}
	}
}
</pre>

Note that the <code>IconPanel</code> class is public.  This allows the application to instantiated the desired band types (of which, IconPanel is the only one provided in this
implementation). Now let's start fleshing out some of the details, starting with the <code>OutlookBar</code> 
class.
<h3><a name="#OutlookBar">OutlookBar</a></h3>

<p>First, the <code>OutlookBar</code> needs to be instantiated so that it appears on the 
form. Creating a new project, I modified the <code>Form1</code> constructor to instantiate the <code>OutlookBar</code>, and
specified a border style so that its creation and placement can be verified:
<pre>public Form1()
{
	//
	// Required for Windows Form Designer support
	//
	InitializeComponent();

	//
	// TODO: Add any constructor code after InitializeComponent call				 
	//

	OutlookBar outlookBar=new OutlookBar();
	outlookBar.Location=new Point(0, 0);
	outlookBar.Size=new Size(150, this.ClientSize.Height);
	outlookBar.BorderStyle=BorderStyle.FixedSingle;
	Controls.Add(outlookBar);
}
</pre>

Success!<p>
<img src="CSOutlookBar\screenShot1.jpg" width="240" height="220"><p>

<b>The First Band</b><p>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产中文在线| 日韩一区精品字幕| 欧美一区二区三区在线观看| 处破女av一区二区| 日本亚洲视频在线| 亚洲综合在线观看视频| 国产视频911| 日韩欧美视频一区| 欧美丝袜丝交足nylons| 99国内精品久久| 国产在线不卡一区| 热久久一区二区| 一区二区高清在线| 中文字幕亚洲精品在线观看| 欧美v亚洲v综合ⅴ国产v| 欧美日韩极品在线观看一区| 91性感美女视频| 丁香另类激情小说| 国产盗摄视频一区二区三区| 蜜臀a∨国产成人精品| 亚洲成年人影院| 艳妇臀荡乳欲伦亚洲一区| 亚洲欧美视频在线观看视频| 国产精品人成在线观看免费| 久久久三级国产网站| 日韩欧美中文字幕公布| 91精品欧美久久久久久动漫| 欧美日本不卡视频| 欧美写真视频网站| 欧美日韩中文另类| 欧美色偷偷大香| 欧美三级一区二区| 欧美性生活久久| 欧美久久久影院| 欧美精品久久一区| 日韩一区二区三| 日韩欧美在线综合网| 日韩精品专区在线影院观看| 欧美成va人片在线观看| 精品区一区二区| 久久精品视频在线免费观看 | 国产精品123| 国产伦理精品不卡| 粉嫩在线一区二区三区视频| 成人av网站在线观看免费| 国产成人久久精品77777最新版本| 激情综合色播激情啊| 国产高清成人在线| 国产suv精品一区二区6| 波多野结衣精品在线| 99re热这里只有精品免费视频 | 69p69国产精品| 日韩午夜电影av| 欧美精品一区二区三区久久久| 久久亚洲精品国产精品紫薇| 国产精品理伦片| 亚洲综合色丁香婷婷六月图片| 亚洲国产一区二区在线播放| 日韩激情在线观看| 精品一区二区三区免费观看| 国产精品一线二线三线精华| 成人性视频免费网站| 99在线视频精品| 欧美老女人在线| 精品日韩在线一区| 中文字幕一区二区三区四区不卡| 亚洲综合网站在线观看| 久久99在线观看| 北条麻妃国产九九精品视频| 精品1区2区3区| 久久午夜老司机| 亚洲图片你懂的| 日韩专区在线视频| 成人国产精品免费网站| 欧美日韩激情一区二区三区| 久久久无码精品亚洲日韩按摩| 亚洲美女区一区| 久久精品二区亚洲w码| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美精品一区二| 亚洲三级理论片| 免费在线视频一区| k8久久久一区二区三区| 欧美日韩国产色站一区二区三区| 久久久久久夜精品精品免费| 亚洲图片激情小说| 激情av综合网| 欧美日韩免费一区二区三区视频| 亚洲精品一区二区三区精华液| 国产精品第四页| 奇米精品一区二区三区四区| av一区二区不卡| 精品少妇一区二区| 亚洲国产综合色| 成人性生交大片免费看中文网站| 91麻豆精品国产自产在线观看一区| 国产精品无遮挡| 另类专区欧美蜜桃臀第一页| 在线观看免费一区| 国产精品网站一区| 精东粉嫩av免费一区二区三区| 91成人免费电影| 国产精品福利av| 国产精品亚洲一区二区三区在线| 欧美日韩激情一区二区三区| 亚洲欧美日韩国产综合在线| 东方欧美亚洲色图在线| 欧美成人精品1314www| 亚洲成人一区二区在线观看| 99re视频精品| 欧美国产精品v| 国产精品一区久久久久| 精品乱码亚洲一区二区不卡| 亚洲成人精品一区二区| 日本乱人伦一区| 中文字幕日韩一区二区| 国产成人自拍高清视频在线免费播放| 5566中文字幕一区二区电影| 香蕉乱码成人久久天堂爱免费| 99热这里都是精品| 国产精品久久久久久久久免费樱桃 | 精品一区二区三区免费播放| 欧美美女网站色| 亚洲永久免费视频| 色欧美日韩亚洲| 亚洲欧美视频在线观看| 91麻豆精东视频| 中文字幕日韩一区| 色婷婷久久99综合精品jk白丝| 国产精品激情偷乱一区二区∴| 高清日韩电视剧大全免费| 久久亚洲二区三区| 韩国理伦片一区二区三区在线播放| 日韩一区二区精品葵司在线| 日韩影视精彩在线| 欧美日本韩国一区| 天使萌一区二区三区免费观看| 欧美日韩成人激情| 奇米888四色在线精品| 91精品国产手机| 麻豆91免费观看| 久久综合色婷婷| 国产精品一二三四| 欧美激情在线观看视频免费| 成人综合婷婷国产精品久久| 亚洲欧美怡红院| 91成人看片片| 日本麻豆一区二区三区视频| 欧美一级午夜免费电影| 国内精品视频666| 国产拍欧美日韩视频二区| 99视频在线精品| 亚洲国产日韩一级| 欧美成人在线直播| 成人avav影音| 一区二区三区不卡在线观看| 在线不卡的av| 国产一区二区在线影院| 中文字幕 久热精品 视频在线| 色综合久久久久| 奇米影视7777精品一区二区| 国产欧美精品一区二区色综合 | 色综合欧美在线| 亚洲一区二区五区| 日韩欧美亚洲一区二区| 大胆欧美人体老妇| 婷婷开心激情综合| 久久久精品国产免费观看同学| 成人av午夜影院| 日韩在线一区二区| 国产调教视频一区| 精品视频一区三区九区| 国产精品中文字幕日韩精品| 一区二区三区不卡视频| 精品国产sm最大网站免费看| aaa国产一区| 久久99久久99小草精品免视看| 国产精品无遮挡| 欧美一区二区三区公司| 成人精品国产一区二区4080| 亚洲123区在线观看| 国产亚洲短视频| 欧美亚洲高清一区| 国产69精品久久99不卡| 天天操天天干天天综合网| 欧美激情在线一区二区| 在线电影国产精品| 91麻豆自制传媒国产之光| 久久99精品一区二区三区| 一区二区三区丝袜| 国产欧美精品国产国产专区| 在线不卡欧美精品一区二区三区| 成人精品一区二区三区中文字幕| 日本欧美大码aⅴ在线播放| 中文字幕欧美一区| 精品成人佐山爱一区二区| 欧美视频精品在线观看| 波多野结衣精品在线| 国产一区二区福利视频| 日本亚洲电影天堂|