private void myDataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { if(myDataGrid.SelectedItem!=null) { Block blk = ((ProjectBlockInfo) myDataGrid.SelectedItem).GetBlock(); if (blk is S7FunctionBlock || blk is S5FunctionBlock) { e.Handled = true; ContentWindowFunctionBlockEditor tmp = new ContentWindowFunctionBlockEditor(blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7DataBlock || blk is S5DataBlock) { e.Handled = true; ContentWindowDataBlockEditor tmp = new ContentWindowDataBlockEditor(blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7VATBlock) { e.Handled = true; ContentWindowVarTab tmp = new ContentWindowVarTab((S7VATBlock)blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7SourceBlock) { e.Handled = true; ContentWindowSourceBlock tmp = new ContentWindowSourceBlock((S7SourceBlock)blk); tmp.Title = blk.Name; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } } }
private void myDataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (myDataGrid.SelectedItem != null) { Block blk = ((ProjectBlockInfo)myDataGrid.SelectedItem).GetBlock(); if (blk is S7FunctionBlock || blk is S5FunctionBlock) { e.Handled = true; ContentWindowFunctionBlockEditor tmp = new ContentWindowFunctionBlockEditor(blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7DataBlock || blk is S5DataBlock) { e.Handled = true; ContentWindowDataBlockEditor tmp = new ContentWindowDataBlockEditor(blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7VATBlock) { e.Handled = true; ContentWindowVarTab tmp = new ContentWindowVarTab((S7VATBlock)blk); tmp.Title = blk.BlockName; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } else if (blk is S7SourceBlock) { e.Handled = true; ContentWindowSourceBlock tmp = new ContentWindowSourceBlock((S7SourceBlock)blk); tmp.Title = blk.Name; tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } } }
private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { myDataGrid = (DataGrid) sender; if (myDataGrid.SelectedItem != null) { ReferencePoint referencePoint = (ReferencePoint)myDataGrid.SelectedItem; Block blk = referencePoint.Block; if (blk is S7FunctionBlock || blk is S5FunctionBlock) { e.Handled = true; ContentWindowFunctionBlockEditor tmp = new ContentWindowFunctionBlockEditor(blk, referencePoint.NetworkNumber, referencePoint.LineNumber); tmp.Title = blk.BlockName; //tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } } }
private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { myDataGrid = (DataGrid)sender; if (myDataGrid.SelectedItem != null) { ReferencePoint referencePoint = (ReferencePoint)myDataGrid.SelectedItem; Block blk = referencePoint.Block; if (blk is S7FunctionBlock || blk is S5FunctionBlock) { e.Handled = true; ContentWindowFunctionBlockEditor tmp = new ContentWindowFunctionBlockEditor(blk, referencePoint.NetworkNumber, referencePoint.LineNumber); tmp.Title = blk.BlockName; //tmp.ToolTip = myFld.ToString() + "\\" + tmp.Title; tmp.Show(parentDockingManager); parentDockingManager.ActiveDocument = tmp; } } }