Winforms c#outlook就像Interface [英] Winforms c# outlook like Interface

查看:429
本文介绍了Winforms c#outlook就像Interface的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经问过同样的问题,但是关于MDI应用程序设计。现在只是为了R& D的目的,所以我们可以去2解决方案给我们的用户。可以有人plz帮助我...

I have already asked the same question but in regards with MDI Application design. Now just for R&D purpose so that we can go with 2 solutions to our user. Can somebody plz help me out...

我们正在使用C#Winforms开发一个OutLook样式应用程序。在该应用程序中,我们使用Microsoft表控制。这是我们需要展示我们的UI。在左侧窗格中我们有菜单,在右侧我们显示我们的UserControl。像CustomerManager。这个UserControl正在执行添加,更新,删除等等,但我们要放置公共操作按钮,如添加,删除,保存在顶部工具栏上。

We are developing an OutLook Style Application using C# Winforms. In that application we are using Microsoft Table Control. Which is what we need to show our UI. In the left hand pane we have menu and in the right hand we are displaying our UserControl. Like CustomerManager. This UserControl is doing Adding, Updating, Deleting ect etc but we want to put the common action buttons, Like Add,Delete,Save on the top toolbar.

到目前为止很好,现在我们需要acheve是无关UserControl。在MainForm的TableControl中加载了什么UserControl。当单击保存按钮时,它应该处理该UserControl上的数据。显然,我们将在每个UserControl上写保存操作的逻辑。

So far so good, Now what we need to acheve is regardless of UserControl. What ever UserControl is loaded in the MainForm's TableControl. When the save button is clicked it should process the data on that UserControl. Obviously we will write the logic of the Save Action on each UserControl.

请帮助...


Shanx

Regards Shanx

推荐答案

创建一个包含添加,删除,保存方法和事件的Base用户控件。然后创建从Base控件继承的每一个其他功能控件。

Create a Base user control that contains your Add, Delete, Save methods and events. Then create every other functional control that inherits from the Base control.

当您操作主工具栏按钮时,可以将您指定容器中的每个用户控件安全地转到基本用户控件。

When you action the main toolbar buttons, you can safely cast each user control in your given container, to the Base user control.

您可能想阅读的一些MSDN链接:

Some MSDN links you might want to read up on:

http://msdn.microsoft.com/en-us/library/44a9ty12(VS.80).aspx

http://msdn.microsoft.com/en-us/library/ms173149(VS.80).aspx

这篇关于Winforms c#outlook就像Interface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆