protected override void OnBeforeSelect(TreeViewCancelEventArgs e) { bool canSelect = CanSelectNode(); // Only treat select events if valid to do so if (canSelect && !e.Cancel && !_invalidating) { try { //Console.WriteLine("Select: " + e.Node); //Console.WriteLine(new StackTrace()); DetailPanel.Clear(); if (e.Node is IBrowserNode) { // Selection can sometimes take a while Cursor save = Cursor.Current; Cursor.Current = Cursors.WaitCursor; ((IBrowserNode)e.Node).Select(); Cursor.Current = save; } } catch (Exception ex) { ErrorDialog.Show(ex, "(this is a bug, please report) " + "Exception on node select", MessageBoxIcon.Error); } } if (!canSelect) { e.Cancel = true; } base.OnBeforeSelect(e); }
public override void GetDetailText() { base.GetDetailText(); foreach (String progId in _progIds) { DetailPanel.Add("ProgID", !ObjectBrowser.INTERNAL, 90, progId); } if (_defaultInterface != null) { DetailPanel.AddLink("Default Interface", !ObjectBrowser.INTERNAL, 100, _defaultInterface, null); } if (_interfaces != null) { foreach (ComInterfaceInfo interfaceInfo in _interfaces) { DetailPanel.AddLink("Implemented Interface", !ObjectBrowser.INTERNAL, 110, interfaceInfo, null); } } }
protected override void OnMouseDown(MouseEventArgs e) { // Process the subclass first base.OnMouseDown(e); // Use the mouse down event because we want to make sure everything // is setup in the case of a drag. With a drag, the Enter // or GetFocus events do not occur, you only see the mouse // down event. // If we get focus on the node that was previously // selected, we need to make sure we re-select the node // because this can happen when another tree has been // selected and other parts of the UI have been altered. // But we must only reselect the node if the mouse is // actually pointing to the node to avoid the situation // where we are processing the selection for the SelectedNode // when the point of the MouseDown was to move the selection. if (SelectedNode != null && SelectedNode == GetNodeAt(PointToClient(MousePosition))) { DetailPanel.Clear(); if (SelectedNode is IBrowserNode) { // Selection could take a while Cursor save = Cursor.Current; Cursor.Current = Cursors.WaitCursor; ((IBrowserNode)SelectedNode).Select(); Cursor.Current = save; } } }
// Removes this node from the logical nodes public virtual void RemoveLogicalNode() { DetailPanel.Clear(); // The parent might no longer contain this node because it // might have been invalidated if (Parent == null) { if (TreeView != null && TreeView.Nodes.Contains(this)) { RemoveHack(); } _logicalParent = null; return; } if (_logicalParent == Parent && Parent.Nodes.Contains(this)) { _logicalParent._logicalNodes.Remove(this); _logicalParent = null; RemoveHack(); return; } if (_logicalParent != Parent) { throw new Exception("Removal in the case of intermediate nodes not yet supported"); } }
internal static void MemberDetailText(MemberInfo mi) { GetDesc(mi, "Member"); String memberType; if (mi.MemberType == MemberTypes.TypeInfo) { memberType = GetTypeKind((Type)mi); } else { memberType = mi.MemberType.ToString(); } String memInfo = MemberInfoString(mi, PARENS); if (memInfo != null) { memberType += memInfo; } ILinkTarget linkTarget = null; if (mi.DeclaringType != null) { TypeLibrary typeLib = TypeLibrary.GetTypeLib(mi.DeclaringType); if (typeLib != null) { linkTarget = ComLinkHelper.CLHelper; } } // No AX type linkage available, link to the assy/types nodes if (linkTarget == null) { linkTarget = TypeLinkHelper.TLHelper; } DetailPanel.AddLink(memberType, !ObjectBrowser.INTERNAL, 10, linkTarget, mi, HelpLinkHelper. MakeLinkModifier(mi)); if (mi.DeclaringType != null) { DetailPanel.AddLink("Member Declaring Type", !ObjectBrowser.INTERNAL, 61, TypeLinkHelper.TLHelper, mi.DeclaringType, HelpLinkHelper. MakeLinkModifier(mi.DeclaringType)); } }
protected void DeleteClick(object sender, EventArgs e) { foreach (ListViewItem li in SelectedItems) { Items.Remove(li); } DetailPanel.Clear(); }
public virtual void GetDetailText() { DetailPanel.Add("Tree Node Type", ObjectBrowser.INTERNAL, 300, GetType().ToString()); ShowTitle(); }
public void OnClick() { if (dragging) { return; } DetailPanel.Load(this); }
public override void GetDetailText() { base.GetDetailText(); DetailPanel.Add("Aliased Type", !ObjectBrowser.INTERNAL, 100, _varComType); }
public static void Load(Mark mark) { GameObject go = GameObject.Instantiate(Resources.Load("DetailPanel")) as GameObject; DetailPanel info = go.GetComponent <DetailPanel>(); if (null != info) { info.initDetail(mark); } }
private async void VisualStateGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) { if (e.NewState.Name.Equals("Wide") || e.NewState.Name.Equals("Normal")) { ExpanderIcon.Glyph = "\uE0E4"; DetailPanel.SetVisualOpacity(0); DetailPanel.Visibility = Visibility.Visible; await DetailPanel.StartCompositionFadeScaleAnimationAsync(0, 1, 0.98f, 1, 100, null, 0, EasingFunctionNames.SineEaseInOut); } }
internal static void GetDetailText(Assembly assy) { DetailPanel.AddLink("Assembly Full Name", !ObjectBrowser.INTERNAL, 100, TypeLinkHelper.TLHelper, assy); try { DetailPanel.Add("Assembly Location", !ObjectBrowser.INTERNAL, 110, assy.Location); } catch { // This is not supported for dynamic assemblies // and it throws (sadly) } if (assy.EntryPoint != null) { String entryStr = ""; if (assy.EntryPoint.DeclaringType != null) { entryStr += "Class: " + assy.EntryPoint.DeclaringType.ToString() + " "; } entryStr += "Method: " + assy.EntryPoint.ToString(); DetailPanel.Add("Assembly Entry Point", !ObjectBrowser.INTERNAL, 120, entryStr); } DetailPanel.Add("Assembly Version", ObjectBrowser.INTERNAL, 130, assy.GetName() .Version.ToString()); try { DetailPanel.Add("Assembly Code Base", !ObjectBrowser.INTERNAL, 115, assy.GetName().CodeBase); } catch { // This is not supported for dynamic assemblies // and it throws (sadly) } AssemblyDescriptionAttribute doc = (AssemblyDescriptionAttribute)Attribute.GetCustomAttribute(assy, typeof(AssemblyDescriptionAttribute)); if (doc != null) { DetailPanel.Add("Assembly Description", !ObjectBrowser.INTERNAL, 105, doc.Description); } }
private void Initialize() { instance = this; FontManager.Initialize(); SaveManager.Initialize(); SaveManager.Option.Load(); UpdateCheck.StartCheck(); mainUI = new MainUI(); trashArea = new TrashArea(); TrashArea.instance = trashArea; layerNamer = new LayerNamer(); Controls.Add(layerNamer); layerNamer.BringToFront(); dragEffector = new DragEffector(); dragEffector.Visible = false; Controls.Add(dragEffector); dragEffector.BringToFront(); detailPanel = new DetailPanel(); detailPanel.Show(this); detailPanel.Hide(); bool loadSuccess = true; if (!SaveManager.Data.Load(SaveManager.saveDataInfo)) { if (!SaveManager.Data.Load(SaveManager.saveDataBackupInfo)) { loadSuccess = false; } } if (!loadSuccess | LayerManager.Count == 0) { //초기화 LayerManager.ClearLayer(); LayerManager.AddLayer(); LayerManager.AddLayer(); } layerNamer.UpdateFont(); Renderer.AddRenderQueue(mainUI); tickUpdater.Start(); mouseUpdater.Start(); if (!SaveManager.optionInfo.Exists) { ShowTutorial(); } }
protected void TreeNodePopupClickCommon(object sender, EventArgs e, bool setMember) { IInvokableTreeNode node = (IInvokableTreeNode)SelectedNode; if (node != null) { // Attempt in invoke the specified method DetailPanel.Clear(); node.Invoke(setMember, false, !Constants.IGNORE_EXCEPTION); node.GetDetailText(); } }
protected void GetDetailTextInt(bool showMember) { base.GetDetailText(); _objInfo.GetDetailText(showMember); if (_castInfo != null) { DetailPanel.AddLink("Cast Type", !ObjectBrowser.INTERNAL, 20, TypeLinkHelper.TLHelper, _castInfo.CastType); } }
internal virtual void GetDetailText(bool showMember) { if (_objName != null && !_objName.Equals(String.Empty)) { DetailPanel.Add("Name", !ObjectBrowser.INTERNAL, 14, _objName.ToString()); } if (_obj != null) { DetailPanel.Add("Object Value", !ObjectBrowser.INTERNAL, 50, _obj.ToString()); } // Events don't have types // Don't show for members that are Void if (_objType != null && ShowMethodType()) { String desc = "CLR Type"; if (_objMemberInfo is MethodInfo) { desc = "Method Return Type (CLR)"; } DetailPanel.AddLink(desc, !ObjectBrowser.INTERNAL, 40, TypeLinkHelper.TLHelper, _objType); // Get documentation for the type GetDesc(_objType, desc); } if (_objTypeStatic != null) { DetailPanel.AddLink("Assigned Static Type", ObjectBrowser.INTERNAL, 70, TypeLinkHelper.TLHelper, _objTypeStatic); } if (showMember && _objMemberInfo != null) { MemberDetailText(_objMemberInfo); } }
private async void VisualStateGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) { if (e.NewState.Name.Equals("Wide") || e.NewState.Name.Equals("Normal")) { ExpanderIcon.Glyph = "\uE0E4"; DetailPanel.Opacity = 0; DetailPanel.Visibility = Visibility.Visible; await DetailPanel.Animation() .Opacity(0, 1) .Scale(0.98f, 1, Easing.SineEaseInOut) .Duration(100) .StartAsync(); } }
void TabIndexChangedHandler(object sender, EventArgs e) { DetailPanel.Clear(); if (_tabControl.SelectedTab == null) { return; } Control tabPageContents = _tabControl.SelectedTab.Controls[0]; if (tabPageContents is BrowserTree) { ((BrowserTree)tabPageContents).DoTabSelected(); } }
// Returns false if failed protected bool DoConvertInternal() { try { // This will convert it if necessary _typeLib.TranslateTypeLib(); // Conversion will have caused detail panel information // to change DetailPanel.Clear(); GetDetailText(); return(true); } catch (Exception ex) { ErrorDialog.Show(ex, "Error converting " + GetName(), MessageBoxIcon.Error); return(false); } }
private void DetailPanel_Click(object sender, RoutedEventArgs e) { if (DescriIndicator.Glyph == "\uE018") { DetailPanel.SetValue(Grid.ColumnProperty, 1); DetailPanel.SetValue(Grid.ColumnSpanProperty, 1); DescriIndicator.Glyph = "\uE09D"; Descriptions.Height = 75; } else { DetailPanel.SetValue(Grid.ColumnProperty, 0); DetailPanel.SetValue(Grid.ColumnSpanProperty, 2); DescriIndicator.Glyph = "\uE018"; Descriptions.Height = double.NaN; } }
private async void Expander_Click(object sender, RoutedEventArgs e) { if (DetailPanel.Visibility == Visibility.Visible) { ExpanderIcon.Glyph = "\uE0E5"; await DetailPanel.StartCompositionFadeScaleAnimationAsync(1, 0, 1, 0.98f, 100, null, 0, EasingFunctionNames.SineEaseInOut); DetailPanel.Visibility = Visibility.Collapsed; } else { ExpanderIcon.Glyph = "\uE0E4"; DetailPanel.SetVisualOpacity(0); DetailPanel.Visibility = Visibility.Visible; await DetailPanel.StartCompositionFadeScaleAnimationAsync(0, 1, 0.98f, 1, 100, null, 0, EasingFunctionNames.SineEaseInOut); } }
public virtual void GetDetailText() { String displayName = _name; if (displayName == null) { displayName = DocString; } GetBasicDetailText(); if (!_displayedIdentifier) { DetailPanel.Add(_infoType, !ObjectBrowser.INTERNAL, 10, displayName); } }
private async void AnimateDetailPanel() { if (ViewModel.SelectedWasabeePin != null) { if (_isDetailPanelVisible) { return; } _isDetailPanelVisible = true; await DetailPanel.TranslateTo(0, 0, 150); // Show } else { _isDetailPanelVisible = false; await DetailPanel.TranslateTo(0, 180, 150); // Hide } }
internal void EBLSelectedIndexChanged(Object sender, EventArgs e) { DetailPanel.Clear(); if (_eventsBeingLogged.SelectedItems.Count == 0) { return; } ListViewItem li = (ListViewItem)_eventsBeingLogged. SelectedItems[0]; DetailPanel.AddLink("Event", !ObjectBrowser.INTERNAL, 18, ObjMemberLinkHelper.OMLHelper, li.Tag); }
public override void GetDetailText() { base.GetDetailText(); DetailPanel.Add("Type", !ObjectBrowser.INTERNAL, 100, _varType); if (_typeKind == TYPEKIND.TKIND_ENUM && _enumValue != null) { DetailPanel.Add("Value", !ObjectBrowser.INTERNAL, 110, _enumValue); } }
internal static void GetDesc(MemberInfo mi, String descType) { DescriptionAttribute doc = null; try { doc = (DescriptionAttribute)Attribute.GetCustomAttribute(mi, typeof(DescriptionAttribute)); } catch { // Ignore } if (doc != null) { DetailPanel.Add(descType + " Description", !ObjectBrowser.INTERNAL, 65, doc.Description); } }
protected void AddRegistryValue(String key, string value) { // This is covered in ComClassInfo if (key.Equals("ProgID")) { return; } // Don't show a key that refers to a typelib if we // already have a link to it if (_container is TypeLibrary && key.Equals("TypeLib")) { return; } DetailPanel.Add(key, !ObjectBrowser.INTERNAL, 80, value); }
public void PointToNode() { // This is the node to point to, might change, see comments // below. BrowserTreeNode node = this; TreeListView tree = (TreeListView)TreeView; if (!IsVisible) { // Ensure visible may cause a node above us to // be Invalidated() and therefore leaving this // node as an orphan. Should this happen, we need to // Find the correct node. String savePath = FullPath; EnsureVisible(); // We got invalidated, refind the right node by name if (TreeView == null) { node = (BrowserTreeNode)tree.FindNodeByFullPath(savePath); // Should not happen if (node == null) { ErrorDialog.Show("(bug) node " + savePath + " not found in PointToNode", "Error Finding Node", MessageBoxIcon.Error); return; } } } // If the node was previously selected, we need to // force the selection processing again because focus // may have gone elsewhere requiring the detail panel to // get reset. Need a better way to handle this. if (tree.SelectedNode == node) { DetailPanel.Clear(); node.Select(); } tree.SetSelectedNode(node); tree.Focus(); }
private void LoadDefaultLayout() { foreach (var content in DockPanelControl.Contents.ToArray()) { content.DockHandler.DockPanel = null; } try { var layoutStream = ResourceHelper.GetResourceStream("DefaultLayout.xml"); if (layoutStream != null) { DockPanelControl.LoadFromXml(layoutStream, DockContentLoadingHandler); } return; } catch { } ViewportPanel.Show(DockPanelControl, DockState.Document); StudConnectionPanel.Show(DockPanelControl, DockState.Document); ViewportPanel.Activate(); DockPanelControl.DockLeftPortion = 250; NavigationPanel.Show(DockPanelControl, DockState.DockLeft); DockPanelControl.DockWindows[DockState.DockBottom].BringToFront(); DockPanelControl.DockBottomPortion = 250; PropertiesPanel.Show(DockPanelControl, DockState.DockBottom); DetailPanel.Show(PropertiesPanel.Pane, null); ConnectionPanel.Show(PropertiesPanel.Pane, null); ValidationPanel.Show(PropertiesPanel.Pane, null); InfoPanel.Show(PropertiesPanel.Pane, null); }
private void SetDetailPanel(bool v) { if (v) { DetailTogglerRotate.BeginAnimation(RotateTransform.AngleProperty, new DoubleAnimation(180, Duration5)); //DefaultColorPicker.Size = ColorPickerButtonSize.Middle; DetailPanel.BeginAnimation(OpacityProperty, new DoubleAnimation(0.5, 1, Duration4)); //PaletteGrip.BeginAnimation(WidthProperty, new DoubleAnimation(130, Duration3)); //MinimizeButton.BeginAnimation(OpacityProperty, new DoubleAnimation(0, 1, Duration3)); //MinimizeButton.BeginAnimation(HeightProperty, new DoubleAnimation(0, 25, Duration3)); } else { DetailTogglerRotate.BeginAnimation(RotateTransform.AngleProperty, new DoubleAnimation(0, Duration5)); //DefaultColorPicker.Size = ColorPickerButtonSize.Small; DetailPanel.BeginAnimation(OpacityProperty, new DoubleAnimation(1, 0, Duration4)); //PaletteGrip.BeginAnimation(WidthProperty, new DoubleAnimation(80, Duration3)); //MinimizeButton.BeginAnimation(OpacityProperty, new DoubleAnimation(1, 0, Duration3)); //MinimizeButton.BeginAnimation(HeightProperty, new DoubleAnimation(25, 0, Duration3)); } _displayDetailPanel = v; }