private void smartOptionList1_ItemClick(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { if (!bInitialized) { return; } data.MagnetType = (MagnetData.MagnetTypeEnum)e.Item.Tag; updateEnableStates(); }
void TaskPane_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { Xceed.SmartUI.SmartItem item = sender as Xceed.SmartUI.SmartItem; TaskInfo info = item.Tag as TaskInfo; IArchiveMasterForm seeForm = ServiceProvider.GetService <IApplication>().ExecuteAction(info.Action.Name) as IArchiveMasterForm; ArchiveOperationForm operForm = seeForm as ArchiveOperationForm; if (seeForm == null) { MessageForm.ShowError("未能创建目标窗体!"); return; } switch (info.TaskType) { case TaskType.Add: operForm.DoAdd(); break; case TaskType.Edit: ISearchManager smSrc; if (m_sms.ContainsKey(info.Name)) { smSrc = m_sms[info.Name]; } else { smSrc = ServiceProvider.GetService <IManagerFactory>().GenerateSearchManager(info.SearchManagerClassName, info.SearchManagerClassParams); } ISearchManager smDest = seeForm.DisplayManager.SearchManager; if (smSrc.GetType() == smDest.GetType()) { smDest.LoadData(SearchExpression.Parse(EntityHelper.ReplaceExpression(info.SearchExpression)), null); } else { smSrc.EnablePage = false; object dataSource = smSrc.GetData(SearchExpression.Parse(EntityHelper.ReplaceExpression(info.SearchExpression)), null); IDisplayManager dm = seeForm.DisplayManager; dm.SetDataBinding(dataSource, string.Empty); dm.SearchManager.OnDataLoaded(new DataLoadedEventArgs(dataSource, 0)); } break; default: throw new NotSupportedException("Invalide TaskType"); } }
void TaskPaneAlert_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { Xceed.SmartUI.SmartItem item = sender as Xceed.SmartUI.SmartItem; AlertInfo info = item.Tag as AlertInfo; IArchiveMasterForm seeForm = ServiceProvider.GetService <IApplication>().ExecuteAction(info.Action.Name) as IArchiveMasterForm; if (seeForm == null) { MessageForm.ShowError("未能创建目标窗体!"); return; } ISearchManager sm = seeForm.DisplayManager.SearchManager; sm.LoadData(SearchExpression.Parse(info.SearchExpression), null); FixIt(info); }
void GridGotoFormTaskPane_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { Xceed.SmartUI.SmartItem item = sender as Xceed.SmartUI.SmartItem; GridRelatedInfo info = item.Tag as GridRelatedInfo; switch (info.RelatedType) { case GridRelatedType.ByRows: { if (item.ParentItem.Text == "按选定行") { ShowFormFromGrid(m_parentForm, info, false); } else { ShowFormFromGrid(m_parentForm, info, true); } } break; case GridRelatedType.BySearchExpression: { SearchHistoryInfo his = m_dm.SearchManager.GetHistory(0); if (string.IsNullOrEmpty(his.Expression)) { MessageForm.ShowInfo("还未有搜索条件!"); return; } string newSearchExpression = info.SearchExpression; ISearchExpression oldSe = SearchExpression.Parse(his.Expression); Dictionary <string, object> dict = GetSearchExpreesionValues(oldSe); ISearchExpression newSe = SearchExpression.Parse(newSearchExpression); newSe = ReplaceSearchExpreesionValues(newSe, dict); ShowFrom(info.Action.Name, newSe, false); } break; case GridRelatedType.ByDataControl: { Dictionary <string, object> dict = m_dm.Copy(); string exp = EntityHelper.ReplaceEntity(info.SearchExpression, new EntityHelper.GetReplaceValue(delegate(string paramName) { return(dict[paramName]); })); ShowFrom(info.Action.Name, SearchExpression.Parse(exp), false); } break; case GridRelatedType.ByNone: { ShowFrom(info.Action.Name, null, false); } break; default: throw new NotSupportedException("Invalid GridRelatedInfo's RelatedType of " + info.Name); } }
private void smartOptionList5_ItemClick(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { data.Emitter.BeamAlignmentType = (EmitterData.EmitterBeamAlignmentType)e.Item.Tag; updateEnableStates(); }
private void smartOptionList2_ItemClick(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { data.Emitter.BlendMode = (EmitterData.EmitterBlendModeEnum)e.Item.Tag; updateEnableStates(); }
private void smartOptionList1_ItemClick(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { data.Emitter.ParticleType = (EmitterData.EmitterParticleTypeEnum)e.Item.Tag; updateEnableStates(); }
private void smartOptionList2_ItemClick(object sender, Xceed.SmartUI.SmartItemClickEventArgs e) { mData.Textures.DiffuseLayer2To3BlendMode = (TextureData.DiffuseLayerBlendType)e.Item.Tag; }