本文整理汇总了C#中ViewModel.LoadLayout方法的典型用法代码示例。如果您正苦于以下问题:C# ViewModel.LoadLayout方法的具体用法?C# ViewModel.LoadLayout怎么用?C# ViewModel.LoadLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewModel
的用法示例。
在下文中一共展示了ViewModel.LoadLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init()
{
if (_Inited)
{
return;
}
_Inited = true;
#region 数据模型
_SafeModel = new SafeModel(_UserModel);
_SafeModel.Init();
_DataModel = new DataModel(_UserModel, _Main);
_DataModel.Init();
_ViewModel = new ViewModel(_UserModel);
_ViewModel.Init();
_ViewModel.LoadLayout();
#endregion
_KeyList = new KeyList(this, _DataModel, _ViewModel);
_KeyList.Control.Dock = DockStyle.Fill;
//_KeyList.Control.Location = new System.Drawing.Point(0, 0);
_KeyList.Control.Name = "KeyList";
//_KeyList.Control.Size = new System.Drawing.Size(374, 29);
//_KeyList.Control.TabIndex = 0;
_CatTree = new CatTree(this, _DataModel);
_CatTree.Control.Dock = DockStyle.Fill;
_CatTree.KeyList = _KeyList;
UcFind.KeyList = _KeyList;
#region 系统选单
_XmlMenu = new XmlMenu<WPwd>(this, _ViewModel);
if (_XmlMenu.Load(Path.Combine(_UserModel.DatHome, CPwd.XML_MENU)))
{
_XmlMenu.GetMenuBar(CPwd.APP_KEY, MbMenu);
_XmlMenu.GetToolBar(CPwd.APP_KEY, TbTool);
ContextMenuStrip CmCat = new ContextMenuStrip();
_XmlMenu.GetPopMenu("WCat", CmCat);
_CatTree.PopupMenu = CmCat;
ContextMenuStrip CmKey = new ContextMenuStrip();
_XmlMenu.GetPopMenu("WKey", CmKey);
_KeyList.PopupMenu = CmKey;
_AttMenu = new ContextMenuStrip();
_XmlMenu.GetPopMenu("WAtt", _AttMenu);
_XmlMenu.GetStrokes(CPwd.APP_KEY, this);
if (_XmlMenu.GetHotkeys(CPwd.APP_KEY, this))
{
foreach (var hotkey in _XmlMenu.Hotkeys)
{
User32.RegisterHotKey(this.Handle, hotkey.Id, (int)hotkey.Modifiers, (int)hotkey.Code);
}
}
}
#endregion
LoadLayout();
ShowInfo();
_CatTree.Init(null);
// 当前时间
UcTimer.Start();
_DataModel.Start();
_DataModel.AppendHandler(new AmonHandler<string>(ShowEcho));
}