Example #1
0
        void AddMagicFormula(object sender, EventArgs e)
        {
            ConfirmIfNotUpdated();
            var magicFormulaImpl = new Node_MagicFormula(
                StaticFunctions.GetUniqueName(this.TreeView, "回帰曲線"),
                Impl
                );
            var magicFormula = new TreeViewNode_MagicFormula(
                this.TreeView,
                magicFormulaImpl
                );

            this.Nodes.Add(magicFormula);
            this.Expand();
        }
Example #2
0
        public TreeViewNode_MagicFormula(TreeView tv, Node_MagicFormula impl)
            : base(tv, impl)
        {
            Impl             = impl;
            FittinWizardMenu = new ToolStripMenuItem("フィッティングウィザードの開始(&W)", null, Wizard, Keys.W & Keys.Control);
            ContextMenuStrip.Items.Insert(0, FittinWizardMenu);
            base.UpdateMenuShow = false;
            UpdateMenu          = new ToolStripMenuItem("親ノードを更新してウィザードを開始(&U)", null, delegate
            {
                Impl.Update();
                if (!Wizard())
                {
                    Impl.ConfirmNotUpdated();
                }
            }, Keys.U | Keys.Control);
            ContextMenuStrip.Items.Insert(0, UpdateMenu);

            var tsmi = new ToolStripMenuItem("マジックフォーミュラを保存(&S)", null, delegate
            {
                SaveAs();
            }, Keys.S & Keys.Control);

            tsmi.Visible = Impl.MFFD.Initialized;
            ContextMenuStrip.Items.Add(tsmi);
            tsmi = new ToolStripMenuItem("エクスポート", null, null, Keys.None);

            tsmi.DropDownItems.Add(new ToolStripMenuItem("エクセル形式(.xlsx)", null, delegate
            {
                ExportMagicFormula(ExportMode.excel);
            }, Keys.None));
            tsmi.Visible = Impl.MFFD.Initialized;
            ContextMenuStrip.Items.Add(tsmi);

            UpdateMenu.Visible = false;
            OnUpdateStateChanged(Impl.Updated);
            impl.OnUpdateStateChanged += OnUpdateStateChanged;
            impl.MFFD.OnInitialized   += OnMFInitialized;
        }