Ejemplo n.º 1
0
        private void dockPanels_ContentRemoved(object sender, DockContentEventArgs e)
        {
            string sFullName = e.Content.DockHandler.Form.GetType().FullName;

            if (__cCommons.ContainsKey(sFullName))
            {
                __cCommons.Remove(sFullName);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 关闭选项卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dockPanelUI_ContentRemoved(object sender, DockContentEventArgs e)
 {
     //在关闭一个选项卡的时候把这个信息从集合中移除掉
     if (loadedPlugins.Contains(e.Content.DockHandler.Form.GetType().FullName))
     {
         loadedBars.Remove(e.Content.DockHandler.TabText);
         loadedPlugins.Remove(e.Content.DockHandler.Form.GetType().FullName);
     }
 }
Ejemplo n.º 3
0
        void DockPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            ctlPuttyPanel pp = e.Content as ctlPuttyPanel;

            if (pp != null)
            {
                this.childWindows.Remove(pp.AppPanel.AppWindowHandle);
            }
        }
Ejemplo n.º 4
0
        private void dockPanel_ContentAdded(object sender, DockContentEventArgs e)
        {
            DockContent content = e.Content as DockContent;

            if (content is DummyDoc)
            {
                DummyDoc doc = (DummyDoc)content;
                m_outputWindow.DocAddedNotify(doc);
            }
        }
Ejemplo n.º 5
0
 //顯示或隱藏精豐LOGO
 private void dockPanel1_ContentRemoved(object sender, DockContentEventArgs e)
 {
     if (dockPanel1.Contents.Count == 1)
     {
         pictureBox1.Visible = true;
     }
     else
     {
         pictureBox1.Visible = false;
     }
 }
Ejemplo n.º 6
0
 void DockPanel_ContentAdded(object sender, DockContentEventArgs e)
 {
     this.DockPanel.BeginInvoke(new Action(
                                    delegate
     {
         if (e.Content.DockHandler.DockState == DockState.Document)
         {
             ToolWindow window = (ToolWindow)e.Content;
             this.AddDocument(window);
         }
     }));
 }
Ejemplo n.º 7
0
        private void dockPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            DockContent content = e.Content as DockContent;

            if (content is DummyDoc)
            {
                DummyDoc doc = (DummyDoc)content;
                m_outputWindow.DocRemovedNotify(doc);
            }
            //foreach (IDockContent content in dockPanel.Documents)
            //    if (content.DockHandler.TabText == text)
            //        return content;
        }
Ejemplo n.º 8
0
 protected override void OnContentRemoved(DockContentEventArgs e)
 {
     if (e.Content is TabbedDocument)
     {
         TabbedDocument document = e.Content as TabbedDocument;
         _documents.Remove(document.Key);
     }
     else if (e.Content is DockWindowPanel)
     {
         _windows.Remove(e.Content.GetType());
     }
     base.OnContentRemoved(e);
 }
Ejemplo n.º 9
0
        private void _mainDockPanel_ContentAdded(object sender, DockContentEventArgs e)
        {
            DockContent content = e.Content as DockContent;

            if (content.Tag is LiteDocumentContent)
            {
                var documentContent = content.Tag as LiteDocumentContent;
                content.FormClosing       += content_FormClosing;
                documentContent.DragEnter += _mainDockPanel_DragEnter;
                documentContent.DragDrop  += _mainDockPanel_DragDrop;

                content.DockStateChanged += content_DockStateChanged;
            }
        }
Ejemplo n.º 10
0
        private void DockingService_DocumentWindowAdded(object sender, DockContentEventArgs e)
        {
            ITextEditor editor = e.Content as ITextEditor;

            if (editor == null)
            {
                return;
            }

            editor.FilePathChanged += Editor_FilePathChanged;

            FilePath filePath = editor.FileName ?? GetTempFilePath(editor);

            _openDocuments.Add(filePath, editor.Document);
        }
Ejemplo n.º 11
0
        private void dockingPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            DockPanel    panel = sender as DockPanel;
            RemoteSource src;

            if (panel != null)
            {
                if (panel.ActiveContent is SourceEditor)
                {
                    src = (panel.ActiveContent as SourceEditor).Tag as RemoteSource;
                    if (src != null)
                    {
                        src.Unlock();
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private void DarkDockPanel_principal_ContentRemoved(object sender, DockContentEventArgs e)
        {
            int          contador_nodo = 0, contador_subnodo = 0;
            bool         nodo_encontrado = false, subnodo_encontrado = false;
            DarkTreeNode nodo, subnodo;

            while (!nodo_encontrado && contador_nodo < darkTreeView1.Nodes.Count)
            {
                nodo = darkTreeView1.Nodes[contador_nodo];

                if (nodo.Nodes.Count > 0)// primero borramos los subnodos
                {
                    while (!subnodo_encontrado && contador_subnodo < nodo.Nodes.Count)
                    {
                        subnodo = nodo.Nodes[contador_subnodo];

                        if (subnodo.Text.Equals(e.Content.DockText))
                        {
                            subnodo.Remove();
                            subnodo_encontrado = true;
                            nodo_encontrado    = true;
                        }

                        contador_subnodo++;
                    }
                    contador_subnodo = 0;
                }

                if (nodo.Text.Equals(e.Content.DockText))
                {
                    nodo.Remove();
                    nodo_encontrado = true;
                }

                contador_nodo++;
            }

            if (darkTreeView1.Nodes.Count > 0)
            {
                int total = darkTreeView1.Nodes.Count;
                darkTreeView1.SelectNode(darkTreeView1.Nodes[total - 1]);
            }
        }
Ejemplo n.º 13
0
        private void DockPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            if (_contentStack.Count != 0)
            {
                do
                {
                    _contentStack.Pop();
                } while (_contentStack.Count > 0 && !Documents.Contains(_contentStack.Peek()));
            }

            if (_contentStack.Count > 0)
            {
                var content = _contentStack.Peek();
                ShowDockPanel(content);
            }

            if (DocumentWindowRemoved != null)
            {
                DocumentWindowRemoved(sender, e);
            }
        }
        private void DockPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            switch (e.Content.DockText)
            {
            case "Atributos":
                item_stat.Checked = false;
                break;

            case "Básico":
                item_basic.Checked = false;
                break;

            case "Elemental":
                item_elemental.Checked = false;
                break;

            case "Extra":
                item_extra.Checked = false;
                break;

            case "Combate Mágico":
                item_magic.Checked = false;
                break;

            case "Combate Físico":
                item_physical.Checked = false;
                break;

            case "Resistências":
                item_resist.Checked = false;
                break;

            case "Vital":
                item_vital.Checked = false;
                break;
            }
        }
Ejemplo n.º 15
0
        private void DarkDockPanel_principal_ContenidoCambiado(object sender, DockContentEventArgs e)
        {
            int          contador_nodo = 0, contador_subnodo = 0;
            bool         encontrado = false;
            DarkTreeNode nodo, subnodo;

            while (!encontrado && contador_nodo < darkTreeView1.Nodes.Count)
            {
                nodo = darkTreeView1.Nodes[contador_nodo];

                if (nodo.Nodes.Count > 0)
                {
                    while (!encontrado && contador_subnodo < nodo.Nodes.Count)
                    {
                        subnodo = nodo.Nodes[contador_subnodo];

                        if (subnodo.Text.Equals(e.Content.DockText))
                        {
                            subnodo.Icon = e.Content.Icon;
                            encontrado   = true;
                        }

                        contador_subnodo++;
                    }
                    contador_subnodo = 0;
                }

                if (nodo.Text.Equals(e.Content.DockText))
                {
                    nodo.Icon  = e.Content.Icon;
                    encontrado = true;
                }

                contador_nodo++;
            }
        }
Ejemplo n.º 16
0
        private void _mainDockPanel_ContentAdded(object sender, DockContentEventArgs e)
        {
            DockContent content = e.Content as DockContent;

            if (content.Tag is LiteDocumentContent)
            {
                var documentContent = content.Tag as LiteDocumentContent;
                content.FormClosing       += content_FormClosing;
                documentContent.Closed    += documentContent_Closed;
                documentContent.DragEnter += _mainDockPanel_DragEnter;
                documentContent.DragDrop  += _mainDockPanel_DragDrop;

                windowListSeparator.Visible = true;
                windowToolStripMenuItem.DropDownItems.Add(
                    new ToolStripMenuItem(documentContent.Text, null,
                                          new EventHandler((s, args) =>
                {
                    _mainDockPanel.GetContent(x => x.Tag == documentContent).ShowAndActivate(_mainDockPanel);
                }))
                {
                    Tag = documentContent
                });
            }
        }
Ejemplo n.º 17
0
 private void mDockPanel_ContentAdded(object sender, DockContentEventArgs e)
 {
     mDockContentHistory.Add(e.Content);
 }
Ejemplo n.º 18
0
 private void dockPanel1_ContentAdded(object sender, DockContentEventArgs e)
 {
     textBox1.AppendText(@"ContentAdded" + Environment.NewLine);
 }
Ejemplo n.º 19
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Handles the ContentRemoved event of the m_dockPanel control.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 protected virtual void DockPanelContentRemoved(object sender, DockContentEventArgs e)
 {
 }
Ejemplo n.º 20
0
 private void mDockPanel_ContentRemoved(object sender, DockContentEventArgs e)
 {
     mDockContentHistory.Remove(e.Content);
 }
Ejemplo n.º 21
0
 protected void ContentRemoved(object sender, DockContentEventArgs e)
 {
 }
Ejemplo n.º 22
0
 /// <summary>
 /// When document is removed update tab texts
 /// </summary>
 public void OnContentRemoved(Object sender, DockContentEventArgs e)
 {
     TabTextManager.UpdateTabTexts();
 }
Ejemplo n.º 23
0
 private void DockPanel_ContentAdded(object sender, DockContentEventArgs e)
 {
 }
Ejemplo n.º 24
0
 protected virtual void OnContentRemoved(DockContentEventArgs e)
 {
     var handler = (EventHandler<DockContentEventArgs>)Events[ContentRemovedEvent];
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 25
0
        void DockContentRemoved(object sender, DockContentEventArgs e)
        {
            try
            {
                FormXX formXX = e.DockContent as FormXX;
                if (formXX != null)
                {
                    for (int i = 0; i < comboBoxMorphMesh.Items.Count; i++)
                    {
                        Tuple<string, FormXX> tuple = (Tuple<string, FormXX>)comboBoxMorphMesh.Items[i];
                        if (tuple.Item2 == formXX)
                        {
                            bool current = comboBoxMorphMesh.SelectedIndex == i;
                            comboBoxMorphMesh.Items.RemoveAt(i);
                            if (current && comboBoxMorphMesh.Items.Count > 0)
                            {
                                comboBoxMorphMesh.SelectedIndex = 0;
                            }

                            bool unlock = false;
                            object unlocked = null, remove = null;
                            foreach (object obj in comboBoxAnimationXXLock.Items)
                            {
                                tuple = (Tuple<string, FormXX>)obj;
                                if (tuple.Item2 == formXX)
                                {
                                    if (comboBoxAnimationXXLock.SelectedItem == obj)
                                    {
                                        unlock = true;
                                    }
                                    remove = obj;
                                }
                                else if (tuple.Item1 == "UNLOCKED")
                                {
                                    unlocked = obj;
                                }
                            }
                            if (remove != null)
                            {
                                comboBoxAnimationXXLock.Items.Remove(remove);
                                if (unlock)
                                {
                                    comboBoxAnimationXXLock.SelectedItem = unlocked;
                                }
                            }
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ReportException(ex);
            }
        }
Ejemplo n.º 26
0
        void DockContentAdded(object sender, DockContentEventArgs e)
        {
            try
            {
                FormXX formXX = e.DockContent as FormXX;
                if (formXX != null)
                {
                    var xxParser = (xxParser)Gui.Scripting.Variables[formXX.ParserVar];
                    string xxDir = Path.GetDirectoryName(formXX.ToolTipText);
                    string xxPath = xxDir.ToLower().EndsWith(".pp") ? xxDir : formXX.ToolTipText;
                    comboBoxMorphMesh.Items.Add(new Tuple<string, FormXX>(xxParser.Name + " " + xxPath, formXX));
                    if (comboBoxMorphMesh.Items.Count == 1)
                    {
                        comboBoxMorphMesh.SelectedIndex = 0;
                    }

                    comboBoxAnimationXXLock.SelectedIndexChanged -= comboBoxAnimationXXLock_SelectedIndexChanged;
                    object selected = comboBoxAnimationXXLock.SelectedItem;
                    int index = comboBoxAnimationXXLock.FindString("UNLOCKED");
                    object unlocked = null;
                    if (index >= 0)
                    {
                        unlocked = comboBoxAnimationXXLock.Items[index];
                        comboBoxAnimationXXLock.Items.Remove(unlocked);
                    }
                    comboBoxAnimationXXLock.Items.Add(new Tuple<string, FormXX>(xxParser.Name + " " + xxPath, formXX));
                    comboBoxAnimationXXLock.Sorted = true;
                    comboBoxAnimationXXLock.Sorted = false;
                    if (unlocked != null)
                    {
                        comboBoxAnimationXXLock.Items.Insert(0, unlocked);
                    }
                    comboBoxAnimationXXLock.SelectedItem = selected;
                    comboBoxAnimationXXLock.SelectedIndexChanged += comboBoxAnimationXXLock_SelectedIndexChanged;
                }
            }
            catch (Exception ex)
            {
                Utility.ReportException(ex);
            }
        }
Ejemplo n.º 27
0
 void m_documentViewContainer_ContentRemoved(object sender, DockContentEventArgs e)
 {
 }