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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? article.htm

?? outlookbar 一款不錯的C#開發控件
?? 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>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人h网站| 亚洲无线码一区二区三区| 秋霞国产午夜精品免费视频| 欧美在线免费视屏| 日韩av电影免费观看高清完整版在线观看| 欧美乱妇一区二区三区不卡视频| 日韩精品福利网| 精品乱人伦小说| 成人免费va视频| 亚洲精选免费视频| 欧美日韩在线电影| 麻豆精品国产传媒mv男同| 亚洲精品一区在线观看| 成人av在线影院| 亚洲乱码国产乱码精品精小说 | 亚洲欧美日本在线| 在线视频亚洲一区| 久久成人免费电影| 中文字幕一区在线观看视频| 91蝌蚪porny| 日韩专区中文字幕一区二区| 精品国产免费人成电影在线观看四季 | 久久99精品国产麻豆婷婷洗澡| 2024国产精品| 一本色道**综合亚洲精品蜜桃冫| 五月婷婷综合网| 精品播放一区二区| 99re成人精品视频| 蜜桃视频在线一区| 亚洲欧洲在线观看av| 9191国产精品| 不卡的av网站| 老司机午夜精品| 一区二区三区在线视频免费| 精品电影一区二区| 欧美日韩国产首页在线观看| 国产高清无密码一区二区三区| 亚洲午夜一二三区视频| 国产欧美综合色| 777亚洲妇女| 91在线观看成人| 久久国产精品72免费观看| 亚洲伦在线观看| 国产精品色哟哟| 日韩免费电影网站| 欧美在线免费视屏| aaa亚洲精品| 国产成人综合在线观看| 午夜激情一区二区三区| 国产精品成人免费在线| 国产亚洲欧美日韩日本| 欧美丰满嫩嫩电影| 欧美三级中文字幕在线观看| 成人性视频免费网站| 久久精品国产99国产| 午夜视频在线观看一区二区三区| 国产精品久久久久久福利一牛影视 | 视频在线观看一区| 亚洲精品一二三| 国产精品久久久久影院色老大 | 欧美三级午夜理伦三级中视频| 成人美女视频在线看| 国内精品写真在线观看| 日韩精品一二区| 亚洲高清免费视频| 一区二区三区中文字幕电影| 国产精品成人一区二区三区夜夜夜 | 欧美一级视频精品观看| 欧美在线色视频| 欧美在线观看视频一区二区三区 | 国产精品1区2区3区在线观看| 日本成人超碰在线观看| 亚洲成人高清在线| 亚洲成人免费影院| 丝瓜av网站精品一区二区| 亚洲综合一二区| 一区2区3区在线看| 亚洲综合色视频| 午夜视频一区在线观看| 亚洲va韩国va欧美va精品| 亚洲一区在线看| 亚洲444eee在线观看| 午夜成人在线视频| 蜜桃久久久久久久| 激情图片小说一区| 精品在线视频一区| 国产激情一区二区三区桃花岛亚洲 | 国产日产欧美一区二区视频| 久久综合久久综合久久| 久久久亚洲精品石原莉奈| 国产亚洲欧美激情| 中文字幕日本不卡| 亚洲综合色视频| 丝袜美腿亚洲一区| 国产麻豆精品在线| av不卡在线观看| 欧美日产在线观看| 2020国产精品自拍| 日韩毛片精品高清免费| 樱桃视频在线观看一区| 亚洲大片在线观看| 狠狠色丁香婷婷综合久久片| 国产精品综合久久| 91色在线porny| 欧美日韩视频一区二区| 精品国产一区久久| 综合色中文字幕| 天天影视网天天综合色在线播放| 六月丁香婷婷久久| eeuss鲁片一区二区三区在线看| 91在线视频免费观看| 在线播放视频一区| 国产视频在线观看一区二区三区| 一区二区三区四区不卡在线| 日本不卡一区二区三区高清视频| 国产精品1区2区3区在线观看| 色婷婷av一区二区三区gif| 欧美一区二区视频在线观看| 日本一区二区成人| 肉丝袜脚交视频一区二区| 国产剧情av麻豆香蕉精品| 欧洲一区二区三区免费视频| 欧美成人伊人久久综合网| 亚洲欧美日韩一区| 狠狠色综合日日| 欧美日韩另类一区| 国产午夜精品福利| 丝袜美腿高跟呻吟高潮一区| 风间由美一区二区av101| 欧美精品日韩一本| 亚洲三级免费观看| 国产在线观看一区二区| 欧美丝袜丝交足nylons| 久久综合九色综合欧美98| 亚洲图片欧美色图| 成人福利视频在线| 久久综合成人精品亚洲另类欧美| 亚洲午夜电影网| 色综合久久88色综合天天6 | 国产xxx精品视频大全| 欧美人伦禁忌dvd放荡欲情| 国产精品乱码人人做人人爱| 日本不卡高清视频| 欧美日韩国产综合久久 | 国产午夜精品一区二区三区嫩草| 亚洲永久精品国产| a亚洲天堂av| 国产偷v国产偷v亚洲高清| 日韩电影在线看| 欧美狂野另类xxxxoooo| 亚洲免费在线观看| 成人av在线看| 国产清纯在线一区二区www| 黄一区二区三区| 欧美大胆人体bbbb| 日韩精品成人一区二区三区| 一本高清dvd不卡在线观看| 欧美韩国日本不卡| 国产老肥熟一区二区三区| 日韩女优制服丝袜电影| 婷婷六月综合亚洲| 欧美日韩中文另类| 亚洲一区二区在线免费看| 色综合婷婷久久| 亚洲视频香蕉人妖| 91丨porny丨国产| 亚洲伦理在线免费看| 91美女蜜桃在线| 亚洲精品第1页| 日本道免费精品一区二区三区| 中文字幕av不卡| 不卡的av电影| 亚洲精品中文字幕在线观看| 一本到不卡免费一区二区| 亚洲女子a中天字幕| 91蝌蚪porny九色| 亚洲mv在线观看| 91精品国产色综合久久不卡蜜臀 | 久久99精品视频| 久久视频一区二区| 国产91精品欧美| 中文字幕在线一区二区三区| 91在线精品一区二区三区| 亚洲蜜桃精久久久久久久| 欧美日韩一区三区四区| 蜜臀久久99精品久久久久宅男 | av在线一区二区| 亚洲激情自拍视频| 在线电影国产精品| 国内精品嫩模私拍在线| 国产精品人妖ts系列视频| 91在线观看一区二区| 亚洲亚洲精品在线观看| 91精品国产综合久久精品麻豆| 美国三级日本三级久久99| 久久九九久久九九| 一本到不卡精品视频在线观看 | 亚洲一区中文日韩| 欧美成人女星排行榜| 成人高清免费观看|