//example of savig and restoring user settings for main window override protected void LoadUserSettings(IDictionary <string, object> userSettings) { base.LoadUserSettings(userSettings); toolBar.Visible = DictHelper.GetValueAsBool(userSettings, "toolBarVisible"); statusBar.Visible = DictHelper.GetValueAsBool(userSettings, "statusBarVisible"); }
virtual protected void LoadUserSettings(IDictionary <string, object> userSettings) { dockPanel.ShowDocumentIcon = DictHelper.GetValueAsBool(userSettings, "ShowDocumentIcon"); dockPanel.AllowEndUserDocking = DictHelper.GetValueAsBool(userSettings, "AllowEndUserDocking"); }
public override void SetKeyParams(IDictionary <string, object> pars) { base.SetKeyParams(pars); if (pars == null) { return; } object t = DictHelper.Get(pars, "Item"); if (t != null) { if (t != null && t is string) { object typeStr = DictHelper.Get(pars, "ItemType"); if (typeStr != null && typeStr is string) { LinkedObject = Dm.Instance.FindTypeAddFindInstance(typeStr as string, t as string); } else { throw new ArgumentException(); } } else { LinkedObject = t; } } t = DictHelper.Get(pars, "ViewType"); if (t != null && t is ViewType) { ViewType = (ViewType)t; } else if (t != null && t is string) { ViewType = (t as string).ToEnum(ViewType.NONE); } else if (t != null) { throw new ArgumentException(); } t = DictHelper.Get(pars, "FileFullPath"); if (t != null) { FileFullPath = t as string; } t = DictHelper.Get(pars, "WebEntityInfoPropertyName"); if (t != null) { WebEntityInfoPropertyName = t as string; } t = DictHelper.Get(pars, "BrowserPrivateType"); if (t != null && t is BrowserPrivateType) { BrowserPrivateType = (BrowserPrivateType)t; } else if (t != null && t is string) { BrowserPrivateType = (t as string).ToEnum(BrowserPrivateType.COMMON_CACHE); } else if (t != null) { throw new ArgumentException(); } }