/// <summary> /// Raises the ItemClick event. /// </summary> /// <param name="args">The RadRoutedEventArgs instance containing the event data.</param> protected virtual void OnItemClick(RadRoutedEventArgs args) { if (this.ItemClick != null) { this.ItemClick(this, args); } }
private void tileView1_TileStateChanged(object sender, RadRoutedEventArgs e) { RadTileViewItem item = e.OriginalSource as RadTileViewItem; if (item != null) { RadFluidContentControl fluid = item.ChildrenOfType <RadFluidContentControl>().FirstOrDefault(); if (fluid != null) { switch (item.TileState) { case TileViewItemState.Maximized: fluid.State = FluidContentControlState.Large; break; case TileViewItemState.Minimized: fluid.State = FluidContentControlState.Normal; break; case TileViewItemState.Restored: fluid.State = FluidContentControlState.Normal; break; default: break; } } } }
private void OnItemClick(object sender, RadRoutedEventArgs e) { var currentItem = e.OriginalSource as RadMenuItem; if (currentItem == null || !currentItem.IsCheckable || currentItem.Tag == null) { return; } if ((string)currentItem.CommandParameter == State.SkinName) { currentItem.IsChecked = true; return; } var siblingItems = GetSiblingGroupItems(currentItem); if (siblingItems == null) { return; } foreach (var item in siblingItems) { if (!Equals(item, currentItem)) { item.IsChecked = false; } } }
private void menuItem_Click(object sender, RadRoutedEventArgs e) { if (this.menusActions.ContainsKey((RadMenuItem)sender)) { this.menusActions[(RadMenuItem)sender].Invoke(); } }
private void item_Click(object sender, RadRoutedEventArgs e, ItemCollection collection, int entityID, int parameterID) { frmFormula view = new frmFormula(parameterID, entityID); view.FormulaUpdated += (sender1, e1) => view_FormulaParameterUpdated(sender1, e1, entityID, collection); MyProjectManager.GetMyProjectManager.ShowDialog(view, "فرمول", Enum_WindowSize.Maximized); }
private void menuLock_Click(object sender, RadRoutedEventArgs e) { WinPasswordInputForUnLock win = new WinPasswordInputForUnLock(); win.Owner = this; win.ShowDialog(); }
private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RadDropDownButton button = d as RadDropDownButton; if (button != null) { bool newValue = (bool)e.NewValue; if (newValue) { RadRoutedEventArgs args = button.RaisePopupOpening(); if (args.Handled) { button.IsOpen = false; return; } } if (newValue) { button.OpenPopup(); } else { if (button.IsBrowserHosted) { button.popupAdorner.Close(); button.RaisePopupClosed(); } } } }
private void OnMenuItemClick(object sender, RadRoutedEventArgs e) { MenuItem item = (e.OriginalSource as RadMenuItem).DataContext as MenuItem; MenuItem parent = item.Parent; if (parent == null) return; switch (parent.Text.ToLower()) { case "add": MenuItem newItem = new MenuItem() { Text = "New " + item.Text, ImageUrl = item.ImageUrl, StaysOpenOnClick = item.StaysOpenOnClick }; parent.Items.Add(newItem); break; case "disable": item.IsEnabled = false; break; case "remove": parent.Items.Remove(item); break; } }
// Token: 0x0600024A RID: 586 RVA: 0x00008850 File Offset: 0x00006A50 internal static RadRoutedEventArgs RaiseRadRoutedEvent(RoutedEvent routedEvent, UIElement source) { RadRoutedEventArgs radRoutedEventArgs = new RadRoutedEventArgs(routedEvent, source); source.RaiseEvent(radRoutedEventArgs); return(radRoutedEventArgs); }
private void menuPasswordSet_Click(object sender, RadRoutedEventArgs e) { PasswordSetWin win = new PasswordSetWin(); win.Owner = this; win.ShowDialog(); }
private void radContextMenu_ItemClick(object sender, RadRoutedEventArgs e) { if (this.paisesGridView.SelectedItems.Count == 0) { System.Windows.MessageBox.Show("Debe seleccionar un pais.", "Paises", MessageBoxButton.OK, MessageBoxImage.Stop); return; } if (this.paisesGridView.SelectedItems.Count > 1) { System.Windows.MessageBox.Show("Debe seleccionar un solo pais.", "Paises", MessageBoxButton.OK, MessageBoxImage.Stop); return; } Pais newPais = (Pais)this.paisesGridView.SelectedItems[0]; if (newPais == null) { return; } var provinciasWin = new ProvinciasView(); var provinciasViewModel = new ProvinciasViewModel(newPais.id); provinciasWin.DataContext = provinciasViewModel; provinciasWin.ShowDialog(); }
private void InvestigationTreeView_OnItemDoubleClick(object sender, RadRoutedEventArgs e) { //todo - DONE //var selected = e.OriginalSource; //if (selected != null && _lastSelected != null) //{ // var selectedType = _lastSelected.GetType(); // if (selectedType == typeof(CaptureVm)) // { // BringToFrontMessage.SendBringToFrontMessage("CaptureView"); // } // else if (selectedType == typeof(ConversationVm)) // { // BringToFrontMessage.SendBringToFrontMessage("ConversationDetailView"); // } // else if (selectedType == typeof(ExportGroupVm)) // { // BringToFrontMessage.SendBringToFrontMessage("ExportOverviewView"); // } // else if (typeof(ExportVm).IsAssignableFrom(selectedType)) // { // BringToFrontMessage.SendBringToFrontMessage("ExportResultView"); // } // else if (selectedType == typeof(Netfox.Detective.Models.Base.Frame)) // { // BringToFrontMessage.SendBringToFrontMessage("FrameContentView"); // } // else if (selectedType == typeof(ConversationsGroupVm)) // { // BringToFrontMessage.SendBringToFrontMessage("ConversationsDetailView"); // } //} }
private void item_ClickCodeFunctionEdit(object sender, RadRoutedEventArgs e, ItemCollection collection, int entityID, int codeFunctionEntityID) { frmCodeFunction view = new frmCodeFunction(codeFunctionEntityID, Enum_CodeFunctionParamType.OneDataItem, entityID, true); view.CodeFunctionUpdated += (sender1, e1) => view_CodeFunctionSelected(sender1, e1, collection); MyProjectManager.GetMyProjectManager.ShowDialog(view, "ارتباط تابع و موجودیت"); }
private RadRoutedEventArgs RaisePopupOpening() { RadRoutedEventArgs args = new RadRoutedEventArgs(DropDownOpeningEvent, this); this.RaiseEvent(args); return(args); }
private void RadContextMenu_ItemClick(object sender, RadRoutedEventArgs e) { RadContextMenu menu = (RadContextMenu)sender; RadMenuItem clickedItem = e.OriginalSource as RadMenuItem; GridViewRow row = menu.GetClickedElement<GridViewRow>(); if (clickedItem != null && row != null) { string header = Convert.ToString(clickedItem.Header); switch (header) { case "Add": gridView.BeginInsert(); break; case "Edit": gridView.BeginEdit(); break; case "Delete": gridView.Items.Remove(row.DataContext); break; default: break; } } }
private void ExpressionEditor_ExpressionChanged(object sender, RadRoutedEventArgs e) { if (this.ExpressionEditor.Expression != null && this.ExpressionEditor.Expression.GetType() == typeof(Expression<Func<MyBusinessObject, bool>>)) { this.genericFilterDescriptor.FilteringExpression = (Expression<Func<MyBusinessObject, bool>>)this.ExpressionEditor.Expression; if (!this.GridView.FilterDescriptors.Contains(this.genericFilterDescriptor)) { this.GridView.FilterDescriptors.Add(this.genericFilterDescriptor); } this.errorMessageBlock.Visibility = Visibility.Collapsed; } else if (this.ExpressionEditor.Expression == null) { if (this.GridView.FilterDescriptors.Contains(this.genericFilterDescriptor)) { this.GridView.FilterDescriptors.Remove(this.genericFilterDescriptor); } this.errorMessageBlock.Visibility = Visibility.Collapsed; } else { this.errorMessageBlock.Visibility = Visibility.Visible; } }
private void ContextMenuClick(object sender, RadRoutedEventArgs e) { string menuItem = (e.OriginalSource as RadMenuItem).Name as string; switch (menuItem) { case "close": this.Close(); break; case "toggletask": TaskCommands.ToggleActiveTask.Execute(null); break; case "stop": TaskCommands.StopActiveTask.Execute(null); ApplicationCommands.OpenMainWindow.Execute(null); break; case "togglewindow": ApplicationCommands.ToggleWindow.Execute(null); break; case "assign": TaskCommands.AssignTask.Execute(null); ApplicationCommands.OpenMainWindow.Execute(null); break; } }
private void OnTileStateChanged(object sender, RadRoutedEventArgs e) { RadTileViewItem item = e.OriginalSource as RadTileViewItem; if (item != null) { RadFluidContentControl fluid = item.ChildrenOfType<RadFluidContentControl>().FirstOrDefault(); if (fluid != null) { switch (item.TileState) { case TileViewItemState.Maximized: fluid.State = FluidContentControlState.Large; break; case TileViewItemState.Minimized: fluid.State = FluidContentControlState.Small; break; case TileViewItemState.Restored: fluid.State = FluidContentControlState.Normal; break; default: break; } } } }
public void OnCellDoubleClick(object sender, RadRoutedEventArgs e) { SMSRecord obj = gv.SelectedItem as SMSRecord; if (obj != null) { if (obj.GradeType.IsSupervise) { SupervisionForm form = new SupervisionForm(obj); form.SaveCallBack = getData; form.IsEnabled = false; Tools.OpenWindow("督查情况", form, null, 400, 290); } else { SMSRecordForm form = new SMSRecordForm(obj); form.SaveCallBack = getData; form.IsEnabled = false; Tools.OpenWindow("群众办事登记", form, null, 600, 400); } } }
private void GeneralExportItem_Click(object sender, RadRoutedEventArgs e) { var menuItem = sender as RadMenuItem; var exportType = menuItem?.Tag as EnumExportType? ?? EnumExportType.TwoPlusTwo; ExportItem(handHistory => ExportFunctions.ConvertHHToForumFormat(handHistory, exportType)); }
private void PlainTextExportItem_Click(object sender, RadRoutedEventArgs e) { if (ViewModel?.CurrentGame != null) { Clipboard.SetText(ExportFunctions.ConvertHHToForumFormat(ViewModel.CurrentGame, EnumExportType.PlainText)); ViewModel.RaiseNotification(CommonResourceManager.Instance.GetResourceString(ResourceStrings.DataExportedMessageResourceString), "Hand Export"); } }
private void OnCellDoubleClick(object sender, RadRoutedEventArgs args) { var cell = args.OriginalSource as GridViewCellBase; if (cell != null && CanDoubleClick(cell)) { GridViewDoubleClick(cell); } }
private void RawExportItem_Click(object sender, RadRoutedEventArgs e) { if (ViewModel?.CurrentGame != null) { Clipboard.SetText(ViewModel.CurrentGame.FullHandHistoryText); ViewModel.RaiseNotification(CommonResourceManager.Instance.GetResourceString(ResourceStrings.DataExportedMessageResourceString), "Hand Export"); } }
/// <summary> /// Hide RadDropDownButton after user clicks on MenuItem /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HideRadMenuItem_OnClick(object sender, RadRoutedEventArgs e) { var item = e.Source as RadMenuItem; var btn = item.ParentOfType<RadDropDownButton>(); if (btn != null) btn.IsOpen = false; }
private void tvMenu_ItemClick(object sender, RadRoutedEventArgs e) { RadTreeViewItem item = (RadTreeViewItem)e.OriginalSource; if (!item.HasItems && ShowModuleEvent != null) //是叶子节点 { ShowModuleEvent(((ModuleTreeItem)item.DataContext).Module); } }
private void MenuItem_Click(object sender, RadRoutedEventArgs e, ConrolPackageMenu cpMenu, Tuple <object, string> cellItem) { if (cpMenu != null) { ConrolPackageMenuArg arg = new ConrolPackageMenuArg(); arg.data = cellItem; cpMenu.OnMenuClicked(sender, arg); } }
private void OnCellDoubleClick(object sender, RadRoutedEventArgs args) { GridViewCellBase cell = args.OriginalSource as GridViewCellBase; if (cell != null) { this.ClickedCell = cell; } }
private void ReplayHand(object sender, RadRoutedEventArgs e) { var item = handsGridContextMenu.GetClickedElement <GridViewRow>(); if (item != null) { ReplayHand(item.DataContext as ReportHandViewModel); } }
private void DeleteTournament(object sender, RadRoutedEventArgs e) { var item = tournamentsGridContextMenu.GetClickedElement <GridViewRow>(); if (item != null) { reportGadgetViewModel.DeleteTournamentCommand.Execute(item.DataContext); } }
private void MakeNote(object sender, RadRoutedEventArgs e) { var item = handsGridContextMenu.GetClickedElement <GridViewRow>(); if (item != null) { reportGadgetViewModel.MakeNoteCommand.Execute(item.DataContext); } }
private void menuClose_Click(object sender, RadRoutedEventArgs e) { var result = MessageBox.Show("确认退出系统吗?", "提示", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { this.Close(); } }
private void ItemClicked(object sender, RadRoutedEventArgs e) { var item = e.OriginalSource as RadMenuItem; if (item != null) { var menuItem = item.DataContext as MenuItem; menuItem.ItemClicked.Execute(null); } }
private void item_ClickCodeFunctionSelect(object sender, RadRoutedEventArgs e, int entityID, RadTreeViewItem codeFunctionsNode) { frmCodeFunctionSelect view = new frmCodeFunctionSelect(new List <Enum_CodeFunctionParamType>() { Enum_CodeFunctionParamType.OneDataItem }); view.CodeFunctionSelected += (sender1, e1) => view_CodeFunctionSelected1(sender1, e1, codeFunctionsNode.Items); MyProjectManager.GetMyProjectManager.ShowDialog(view, "ارتباط تابع و موجودیت"); }
private void OnContextMenuItemClick(object sender, RadRoutedEventArgs e) { var menuItem = e.OriginalSource as RadMenuItem; if (menuItem != null && "moveToSectionMenuItem".Equals(menuItem.Tag)) { e.Handled = true; FieldsContextMenu.IsOpen = false; } }
private void OnCellDoubleClick(object sender, RadRoutedEventArgs e) { StationReportResult obj = gv.SelectedItem as StationReportResult; if (obj != null) { StationReportResult item = obj as StationReportResult; drill(item.UnitId); } }
public void OnCellDoubleClick(object sender, RadRoutedEventArgs e) { GradeType obj = gv.SelectedItem as GradeType; if (obj != null) { GradeTypeForm form = new GradeTypeForm(obj, getData); Tools.OpenWindow("评分内容-编辑", form, null); } }
void comboSelectionChanged(object sender, RadRoutedEventArgs args) { RadComboBox comboBox = (RadComboBox)args.OriginalSource; if (comboBox.SelectedValue == null || comboBox.SelectedValuePath != "Code") // we take action only if the continent combo is changed return; Location location = comboBox.DataContext as Location; location.ContinentCode = (string)comboBox.SelectedValue;//we submit the value immediately rather than waiting the cell to lose focus. }
private async void OnCheckSpellingMenuClick(object sender, RadRoutedEventArgs e) { var textBox = Editor.FindChildByType<TextBox>(); if (textBox == null) return; var result = await SpellCheckingService.CheckSpelling(textBox); if (!result.IsCanceled) await SpellCheckingService.NotifySpellCheckingComplete(); }
/// <summary> /// Hide RadDropDownButton after user clicks on MenuItem /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HideRadMenuItem_OnClick(object sender, RadRoutedEventArgs e) { var item = e.Source as RadMenuItem; var btn = item.ParentOfType <RadDropDownButton>(); if (btn != null) { btn.IsOpen = false; } }
private void tileView1_TileStateChanged(object sender, RadRoutedEventArgs e) { RadTileViewItem item = e.OriginalSource as RadTileViewItem; if (item != null) { Country country = item.DataContext as Country; if (country != null) { country.State = item.TileState; } } }
private void SaveStyleSheet_Click(object sender, RadRoutedEventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Xaml Files|*.xaml"; if (sfd.ShowDialog() == true) { using (var stream = sfd.OpenFile()) { Stylesheet stylesheet = new Stylesheet(); stylesheet.ExtractStylesheetFromDocument(this.editor.Document); XamlFormatProvider.SaveStylesheet(stylesheet, stream); } } }
private void OnPanelBarEvent(object sender, RadRoutedEventArgs e) { RadPanelBarItem panelBarItem = e.Source as RadPanelBarItem; TextBlock header = panelBarItem.Header as TextBlock; if (header != null) { this.Log(e.RoutedEvent.Name, header.Text); } else { this.Log(e.RoutedEvent.Name, panelBarItem.ToString()); } }
private void LoadStyleSheet_Click(object sender, RadRoutedEventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Xaml Files|*.xaml"; if (ofd.ShowDialog() == true) { #if WPF using (var stream = ofd.OpenFile()) #else using (var stream = ofd.File.OpenRead()) #endif { Stylesheet stylesheet = XamlFormatProvider.LoadStylesheet(stream); stylesheet.ApplyStylesheetToDocument(this.editor.Document); } } }
private void TimeBar_VisiblePeriodChanged(object sender, RadRoutedEventArgs e) { if (this.TimeBar != null) { DateTime roundedVisiblePeriodStart = this.TimeBar.VisiblePeriodStart.Date; DateTime roundedVisiblePeriodEnd = this.TimeBar.VisiblePeriodEnd.Date; if (roundedVisiblePeriodStart != this.TimeBar.VisiblePeriodStart) { this.TimeBar.VisiblePeriodStart = roundedVisiblePeriodStart; } if (roundedVisiblePeriodEnd != this.TimeBar.VisiblePeriodEnd) { this.TimeBar.VisiblePeriodEnd = roundedVisiblePeriodEnd; } this.UpdateMinimap(); } }
private void ItemOnLoadOnDemand(object sender, RadRoutedEventArgs e) { var item = sender as RadTreeViewItem; if (item != null) { var vm = item.DataContext as DisplayListFieldViewModel; if (vm != null) { vm.LoadSubFields( () => { item.IsLoadingOnDemand = false; }); e.Handled = true; } } }
private void ContextMenuClick(object sender, RadRoutedEventArgs e) { RadContextMenu menu = (RadContextMenu)sender; RadMenuItem clickedItem = e.OriginalSource as RadMenuItem; GridViewRow row = menu.GetClickedElement<GridViewRow>(); QuickControlSystem controlSystem = row.DataContext as QuickControlSystem; if (clickedItem != null && controlSystem != null) { string header = Convert.ToString(clickedItem.Header); switch (header) { case "Open": OpenTab(controlSystem); break; } } }
private void ContextMenuClick(object sender, RadRoutedEventArgs e) { if (this.ClickedTreeViewItem == null) { return; } DataItem item = this.ClickedTreeViewItem.DataContext as DataItem; if (item == null) { return; } string header = (e.OriginalSource as RadMenuItem).Header as string; switch (header) { case "New Child": DataItem newChild = new DataItem(); newChild.Text = "New Child"; item.Items.Add(newChild); item.IsExpanded = true; // Ensure that the new child is visible break; case "New Sibling": DataItem newSibling = new DataItem(); newSibling.Text = "New Sibling"; item.Parent.Items.Add(newSibling); break; case "Delete": item.Parent.Items.Remove(item); break; case "Edit": this.ClickedTreeViewItem.IsInEditMode = true; break; case "Select": this.ClickedTreeViewItem.IsSelected = true; break; } }
private void OnCellDoubleClick(object sender, RadRoutedEventArgs e) { if (!IsMainGrid) ((IProvideContext)this.DataContext).MoveToDetailsView.Execute(null); }
private void OnDoubleClick(object sender, RadRoutedEventArgs e) { if (TelerikDataGrid.SelectedItem != null) { var electricalEquipment = TelerikDataGrid.SelectedItem as QuickElectrical; if (electricalEquipment != null) { OpenNewElectricalTab(electricalEquipment); } } }
/// <summary> /// Populates the <see cref="Children"/> collection. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The event args. /// </param> public void PopulateChildren(object sender, RadRoutedEventArgs e) { var item = sender as RadTreeViewItem; if (item != null) { try { e.Handled = true; UpdateChildren(true); } finally { item.IsLoadingOnDemand = false; } } }
public void MenuItemClick(object sender, RadRoutedEventArgs e) { var rmi = sender as RadMenuItem; if (rmi != null) { var radcm = rmi.Parent as RadContextMenu; if (radcm != null) radcm.StaysOpen = false; } RadGridView rgview = null; if (rmi != null && rmi.DataContext.ToString().Equals("Regional", StringComparison.OrdinalIgnoreCase)) { rgview = _regionalWindow.Content as RadGridView; } else if (rmi != null && rmi.DataContext.ToString().Equals("Type", StringComparison.OrdinalIgnoreCase)) { rgview = _typeWindow.Content as RadGridView; } if (rgview != null) { rgview.ElementExporting -= ElementExporting; rgview.ElementExporting += ElementExporting; using (var stream = ImageAndGridOperation.DowmLoadDialogStream("文档文件(*.xls)|*.xls|文档文件(*.doc)|*.doc") ) { if (stream != null) { rgview.Export(stream, ImageAndGridOperation.SetGridViewExportOptions()); } } } }
private void OnCellDoubleClick(object sender, RadRoutedEventArgs e) { VM.Locations.MoveToDetailsView.Execute(null); }
private void OnDiagramDeserialized(object sender, RadRoutedEventArgs e) { // We need to update the connections after the containers have been collapsed. this.Dispatcher.BeginInvoke(new Action(() => { foreach (var connection in this.diagram.Connections) { connection.Update(); } #if WPF }), DispatcherPriority.ApplicationIdle); #else }));
private void OnOpenDialogItemClick(object sender, RadRoutedEventArgs e) { var item = sender as RadRadialMenuItem; var menu = item.Menu; this.Dispatcher.BeginInvoke(new Action(delegate() { RadialMenuCommands.Hide.Execute(null, menu.TargetElement as UIElement); })); }
private void ConfigurationTreeViewLoadOnDemand(object sender, RadRoutedEventArgs e) { var currentNodeView = ((RadTreeViewItem)e.Source).Item as NodeView; if (currentNodeView != null) { switch (currentNodeView.Type) { case NodeType.SystemTests: LoadSystemTests(currentNodeView); break; case NodeType.ComponentTests: LoadComponentTests(currentNodeView); break; case NodeType.AlarmCentums: LoadCENTUMAlarmProperties(currentNodeView); break; case NodeType.AlarmCentum: LoadCENTUMForProperty(currentNodeView); break; case NodeType.AlarmColoursNode: LoadAlarmColours(currentNodeView); break; case NodeType.AlarmPurposesNode: LoadAlarmPurposes(currentNodeView); break; case NodeType.AlarmPrioritiesNode: LoadAlarmPriorities(currentNodeView); break; case NodeType.AlarmConsequencesNode: LoadAlarmConsequences(currentNodeView); break; case NodeType.AlarmResponsesNode: LoadAlarmResponses(currentNodeView); break; case NodeType.GraphicsNode: LoadGraphics(currentNodeView); break; case NodeType.ControlSystemTypesNode: LoadControlSystemTypes(currentNodeView); break; case NodeType.ControlSystemEngineeringProperties: LoadControlSystemEngineeringProperties(currentNodeView); break; case NodeType.ControlSystemTuningProperties: LoadControlSystemTuningProperties(currentNodeView); break; case NodeType.ControlSystemAlarmProperties: LoadAlarmProperties(currentNodeView); break; case NodeType.ControlSystemComponentTypes: LoadComponentTypes(currentNodeView); break; case NodeType.InterlockTypes: LoadInterlockTypes(currentNodeView); break; case NodeType.InterlockType: LoadInterlockTypeProperties(currentNodeView); break; case NodeType.InterlockProperties: LoadInterlockProperties(currentNodeView); break; case NodeType.ControlSystemComponentType: currentNodeView.Children.Add(new NodeView(currentNodeView) { Name = "Engineering Properties", Type = NodeType.ControlSystemComponentTypeEngineeringProperties, Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png", HasChildren = true }); currentNodeView.Children.Add(new NodeView(currentNodeView) { Name = "Tuning Properties", Type = NodeType.ControlSystemComponentTypeTuningProperties, Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png", HasChildren = true }); currentNodeView.Children.Add(new NodeView(currentNodeView) { Name = "Alarm Properties", Type = NodeType.ControlSystemComponentTypeAlarmProperties, Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png", HasChildren = true }); currentNodeView.Children.Add(new NodeView(currentNodeView) { Name = "Component Tests", Type = NodeType.ComponentTypeTests, Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png", HasChildren = true }); break; case NodeType.ControlSystemComponentTypeEngineeringProperties: LoadComponentTypeProperties(currentNodeView); break; case NodeType.ControlSystemComponentTypeTuningProperties: LoadComponentTypeTuningProperties(currentNodeView); break; case NodeType.ControlSystemComponentTypeAlarmProperties: LoadComponentTypeAlarmProperties(currentNodeView); break; case NodeType.SystemTypeTests: LoadSystemTypeTests(currentNodeView); break; case NodeType.ComponentTypeTests: LoadComponentTypeTests(currentNodeView); break; case NodeType.ReportsNode: LoadReports(currentNodeView); break; case NodeType.ManufacturersNode: LoadManufacturers(currentNodeView); break; case NodeType.ManufacturerNode: LoadModels(currentNodeView); break; default: var hideSpinDispatcherTimerTimer = new DispatcherTimer(); hideSpinDispatcherTimerTimer.Interval = TimeSpan.FromMilliseconds(100); hideSpinDispatcherTimerTimer.Tick += (sender2, eventArgs) => { hideSpinDispatcherTimerTimer.Stop(); Utils.HideSpinner(currentNodeView); }; hideSpinDispatcherTimerTimer.Start(); break; } } }
private void RadTreeMap_SelectionChanged(object sender, RadRoutedEventArgs e) { TransitionWrapper.Content = this.RadTreeMap.SelectedItem; }
private void OnDoubleClick(object sender, RadRoutedEventArgs e) { var issue = TelerikDataGrid.SelectedItem as QuickIssue; if (issue != null) { OpenNewIssueTab(issue); } }
private void OnDoubleClick(object sender, RadRoutedEventArgs e) { if (TelerikDataGrid.SelectedItem != null) { var instrumentEquipment = TelerikDataGrid.SelectedItem as QuickMechanical; if (instrumentEquipment != null) { OpenNewTab(instrumentEquipment); } } }
public void MenuItem_Click(object sender, RadRoutedEventArgs e) { RadMenuItem rmi = sender as RadMenuItem; RadContextMenu radcm = rmi.Parent as RadContextMenu; radcm.StaysOpen = false; RadGridView rgview = null; if (rmi.DataContext.ToString() == "opertationHistoryWindow") { rgview = opertationHistoryWindow.Content as RadGridView; } else if (rmi.DataContext.ToString() == "planHistoryWindow") { rgview = planHistoryWindow.Content as RadGridView; } else if (rmi.DataContext.ToString() == "totalOpertationWindow") { rgview = totalOpertationWindow.Content as RadGridView; } else if (rmi.DataContext.ToString() == "totalPlanHistoryWindow") { rgview = totalPlanHistoryWindow.Content as RadGridView; } if (rgview != null) { rgview.ElementExporting -= this.ElementExporting; rgview.ElementExporting += new EventHandler<GridViewElementExportingEventArgs>(ElementExporting); using (Stream stream = ImageAndGirdOperation.DowmLoadDialogStream("文档文件(*.xls)|*.xls|文档文件(*.doc)|*.doc")) { if (stream != null) { rgview.Export(stream, ImageAndGirdOperation.SetGridViewExportOptions()); } } } }
private void OnRadialMenuClosed(object sender, RadRoutedEventArgs e) { RadWindowManager.Current.CloseAllWindows(); }