Пример #1
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag == null)
            {
                return;
            }

            if (e.Button == MouseButtons.Left)
            {
                if (e.Node.Tag is BasePane)
                {
                    ParentEditor.ShowPaneEditor(e.Node.Tag as BasePane);
                }
            }
        }
Пример #2
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag == null)
            {
                return;
            }

            if (e.Button == MouseButtons.Left)
            {
                if (e.Node.Tag is BasePane)
                {
                    ParentEditor.ShowPaneEditor(e.Node.Tag as BasePane);
                }

                //Check fonts to open editor if possible
                if (e.Node.ImageKey == "font")
                {
                    foreach (var file in FirstPlugin.PluginRuntime.BxfntFiles)
                    {
                        if (file.FileName == e.Node.Text)
                        {
                            Form frm = new Form();

                            BffntEditor editor = new BffntEditor();
                            editor.Text = "Font Editor";
                            editor.Dock = DockStyle.Fill;
                            editor.LoadFontFile(file);
                            editor.OnFontEdited += bxfntEditor_FontEdited;
                            frm.Controls.Add(editor);

                            frm.Show(ParentEditor);
                        }
                    }
                }
            }
        }