private void TreeView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (myTreeView.SelectedItem != null)
            {
                if (myTreeView.SelectedItem is IBlocksFolder)
                {
                    IBlocksFolder            fld = (IBlocksFolder)myTreeView.SelectedItem;
                    DockableContentBlockList tmp = new DockableContentBlockList(fld);
                    tmp.parentDockingManager = parentDockingManager;
                    tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    if (myTreeView.SelectedItem is BlocksOfflineFolder)
                    {
                        tmp.ToolTip = ((BlocksOfflineFolder)myTreeView.SelectedItem).Folder;
                    }
                    else
                    {
                        tmp.ToolTip = fld.ToString();
                    }
                    tmp.Show(parentDockingManager);
                    tmp.ToggleAutoHide();

                    //Set size of the parent DockablePane (it's automaticly been created!)
                    DockablePane tmpPane = tmp.TryFindParent <DockablePane>();
                    ResizingPanel.SetEffectiveSize(tmpPane, new Size(350, 0));

                    parentDockingManager.ActiveDocument = tmp;
                }
                else if (myTreeView.SelectedItem is ISymbolTable)
                {
                    ISymbolTable             fld = (ISymbolTable)myTreeView.SelectedItem;
                    ContentWindowSymbolTable tmp = new ContentWindowSymbolTable(fld);
                    tmp.Title   = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
                else if (myTreeView.SelectedItem is ReferenceData)
                {
                    ReferenceData fld = (ReferenceData)myTreeView.SelectedItem;
                    ContentWindowReferenceData tmp = new ContentWindowReferenceData(fld);
                    tmp.parentDockingManager = parentDockingManager;

                    tmp.Title   = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
                else if (myTreeView.SelectedItem is S7VATBlock)
                {
                    S7VATBlock          fld = (S7VATBlock)myTreeView.SelectedItem;
                    ContentWindowVarTab tmp = new ContentWindowVarTab(fld);
                    tmp.Title   = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
            }
        }
        private void TreeView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (myTreeView.SelectedItem!=null)
            {
                if (myTreeView.SelectedItem is IBlocksFolder)
                {
                    IBlocksFolder fld = (IBlocksFolder) myTreeView.SelectedItem;
                    DockableContentBlockList tmp = new DockableContentBlockList(fld);
                    tmp.parentDockingManager = parentDockingManager;
                    tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    if (myTreeView.SelectedItem is BlocksOfflineFolder)
                        tmp.ToolTip = ((BlocksOfflineFolder) myTreeView.SelectedItem).Folder;
                    else
                        tmp.ToolTip = fld.ToString();                    
                    tmp.Show(parentDockingManager);
                    tmp.ToggleAutoHide();

                    //Set size of the parent DockablePane (it's automaticly been created!)
                    DockablePane tmpPane = tmp.TryFindParent<DockablePane>();                    
                    ResizingPanel.SetEffectiveSize(tmpPane,new Size(350,0));

                    parentDockingManager.ActiveDocument = tmp;

                }
                else if (myTreeView.SelectedItem is ISymbolTable)
                {
                    ISymbolTable fld = (ISymbolTable)myTreeView.SelectedItem;
                    ContentWindowSymbolTable tmp = new ContentWindowSymbolTable(fld);
                    tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();                   
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
                else if (myTreeView.SelectedItem is ReferenceData)
                {
                    ReferenceData fld = (ReferenceData)myTreeView.SelectedItem;
                    ContentWindowReferenceData tmp = new ContentWindowReferenceData(fld);
                    tmp.parentDockingManager = parentDockingManager;
                  
                    tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
                else if (myTreeView.SelectedItem is S7VATBlock)
                {
                    S7VATBlock fld = (S7VATBlock)myTreeView.SelectedItem;
                    ContentWindowVarTab tmp = new ContentWindowVarTab(fld);
                    tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                    tmp.ToolTip = fld.ToString();
                    tmp.Show(parentDockingManager);
                    parentDockingManager.ActiveDocument = tmp;
                }
            }
        }
        private void myConnectionsList_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {            
            if (myConnectionsList.SelectedItem != null)
            {
                OnlineBlocksFolder onl = new OnlineBlocksFolder((string) myConnectionsList.SelectedItem);
                IBlocksFolder fld = (IBlocksFolder) onl;
                DockableContentBlockList tmp = new DockableContentBlockList(fld);
                tmp.parentDockingManager = parentDockingManager;
                tmp.Title = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                tmp.ToolTip = fld.ToString();
                tmp.Show(parentDockingManager);
                tmp.ToggleAutoHide();

                //Set size of the parent DockablePane (it's automaticly been created!)
                DockablePane tmpPane = tmp.TryFindParent<DockablePane>();
                ResizingPanel.SetEffectiveSize(tmpPane, new Size(350, 0));

                parentDockingManager.ActiveDocument = tmp;
            }
        }
Ejemplo n.º 4
0
        private void myConnectionsList_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (myConnectionsList.SelectedItem != null)
            {
                OnlineBlocksFolder       onl = new OnlineBlocksFolder((string)myConnectionsList.SelectedItem);
                IBlocksFolder            fld = (IBlocksFolder)onl;
                DockableContentBlockList tmp = new DockableContentBlockList(fld);
                tmp.parentDockingManager = parentDockingManager;
                tmp.Title   = fld.ToString(); //.Substring(fld.ToString().LastIndexOf("\\") + 1);
                tmp.ToolTip = fld.ToString();
                tmp.Show(parentDockingManager);
                tmp.ToggleAutoHide();

                //Set size of the parent DockablePane (it's automaticly been created!)
                DockablePane tmpPane = tmp.TryFindParent <DockablePane>();
                ResizingPanel.SetEffectiveSize(tmpPane, new Size(350, 0));

                parentDockingManager.ActiveDocument = tmp;
            }
        }
Ejemplo n.º 5
0
        private void mnuOnlineBlocks_Click(object sender, RoutedEventArgs e)
        {
            OnlineBlocksFolder onl = new OnlineBlocksFolder(Connection);
            IBlocksFolder fld = (IBlocksFolder)onl;
            DockableContentBlockList tmp = new DockableContentBlockList(fld);
            tmp.parentDockingManager = DockManager;
            tmp.Title = fld.ToString();
            tmp.ToolTip = fld.ToString();
            tmp.Show(DockManager);
            tmp.ToggleAutoHide();

            //Set size of the parent DockablePane (it's automaticly been created!)
            DockablePane tmpPane = tmp.TryFindParent<DockablePane>();
            ResizingPanel.SetEffectiveSize(tmpPane, new Size(350, 0));

            DockManager.ActiveDocument = tmp;
        }