Пример #1
0
        public PTimes(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            for (int i = 2015; i < 2026; i++)
            {
                cmbYear.Items.Add(i);
            }
            cmbYear.SelectedValue = 2020;
            toolboxSub.Children.Add(cmbYear);
            cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "配网规划演进", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnEvolve_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "配网历史变迁", group = "2", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnHistory_Click);
            toolboxSub.Children.Add(btn);
            //btn = new zButton() { text = "用电负荷变化", group = "3", IsEnabled=false };
            //btn.Click += new System.Windows.RoutedEventHandler(btnLoadChange_Click);
            //toolboxSub.Children.Add(btn);
        }
Пример #2
0
        public RRealTime(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化

            zButton btn;

            btn = new zButton()
            {
                text = "显示潮流", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnFlow_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "变压器负载", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadColumn_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电压等值图", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnVLContour_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "停电区域", group = "1", Margin = new System.Windows.Thickness(0, 0, 10, 0)
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCutArea_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #3
0
        //区块负荷预测
        void btnLoadForcast_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Planning.PRunLoadForcast))
                {
                    app.end();                           //不为空,不为本身,执行结束操作
                }
                if (!(app is Planning.PRunLoadForcast))  //不为本身,执行创建
                {
                    app = new Planning.PRunLoadForcast(root);
                    app.begin();
                }
            }
            else
            {
                if (app != null && (app is Planning.PRunLoadForcast))
                {
                    app.end();
                    app = null;
                }
            }
        }
Пример #4
0
        public PChoice(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            for (int i = 2015; i < 2026; i++)
            {
                cmbYear.Items.Add(i);
            }
            cmbYear.SelectedValue = 2020;
            toolboxSub.Children.Add(cmbYear);
            cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "变电站选址定容", IsEnabled = false,
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnTransform_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "充电桩选址定容"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCharge_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "储能装置选址定容", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnStore_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #5
0
        public RFullView(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            zButton btn;

            btn = new zButton()
            {
                text = "网格区域", group = "0"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnArea_Click);
            toolboxSub.Children.Add(btn);
            btnArea = btn;

            btn = new zButton()
            {
                text = "技术指标", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndex_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "网架规模", group = "2"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnSize_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "生产统计", group = "3"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnStat_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #6
0
        //统计负荷特性
        void btnSummary_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Interact.IParaSetSummary))
                {
                    app.end();                           //不为空,不为本身,执行结束操作
                }
                if (!(app is Interact.IParaSetSummary))  //不为本身,执行创建
                {
                    app = new Interact.IParaSetSummary(root);
                    app.begin();
                }
                else
                {
                    (app as Interact.IParaSetSummary).show();
                }
            }
            else
            if (app is Interact.IParaSetSummary)
            {
                (app as Interact.IParaSetSummary).hide();
            }
        }
Пример #7
0
        void btnSize_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Run.RFullViewSize))
                {
                    app.end();                    //不为空,不为本身,执行结束操作
                }
                if (!(app is Run.RFullViewSize))  //不为本身,执行创建
                {
                    app = new Run.RFullViewSize(root);
                    app.begin();
                }
            }
            (app as RFullViewSize).show(btn.isChecked);
            if (btn.isChecked)
            {
                panel.Visibility = System.Windows.Visibility.Hidden;
            }
            else
            {
                panel.Visibility = System.Windows.Visibility.Visible;
            }
        }
Пример #8
0
        public PEvalute(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            object container = VisualTreeHelper.GetParent(_Global.InstanceSelector);

            if (container != null)
            {
                (container as System.Windows.Controls.StackPanel).Children.Remove(_Global.InstanceSelector);
            }
            toolboxSub.Children.Add(_Global.InstanceSelector);

            //// 工具栏初始化
            //for (int i = 2015; i < 2026; i++)
            //    cmbYear.Items.Add(i);
            //cmbYear.SelectedValue = 2020;
            //toolboxSub.Children.Add(cmbYear);
            //cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "指标体系"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndex_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "指标鱼骨图"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndexFish_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "KPI关键指标"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnKPI_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "评价指数"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIDX_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "财务评价指标"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnEconomy_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "敏感性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnPrice_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #9
0
        public PEvalute(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            for (int i = 2015; i < 2026; i++)
            {
                cmbYear.Items.Add(i);
            }
            cmbYear.SelectedValue = 2020;
            toolboxSub.Children.Add(cmbYear);
            cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "指标体系"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndex_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "指标鱼骨图"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndexFish_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "KPI关键指标"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnKPI_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "评价指数"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIDX_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "财务评价指标"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnEconomy_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "敏感性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnPrice_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #10
0
        public PAnalyse(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            object container = VisualTreeHelper.GetParent(_Global.InstanceSelector);

            if (container != null)
            {
                (container as System.Windows.Controls.StackPanel).Children.Remove(_Global.InstanceSelector);
            }
            toolboxSub.Children.Add(_Global.InstanceSelector);

            //// 工具栏初始化
            //for (int i = 2015; i < 2026; i++)
            //    cmbYear.Items.Add(i);
            //cmbYear.SelectedValue = 2020;
            //toolboxSub.Children.Add(cmbYear);
            //cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "配网自动化程度"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnAuto_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "可靠性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnReliability_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "N-1分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnN1_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "主动性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnInitiative_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "方案对比"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCompare_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #11
0
        public RHistory(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            toolboxSub.Children.Add(new TextBlock()
            {
                Text = "时间段:", Foreground = Brushes.Cyan, VerticalAlignment = System.Windows.VerticalAlignment.Bottom, Margin = new System.Windows.Thickness(20, 0, 0, 0), FontSize = 16
            });
            dateStart = new DevExpress.Xpf.Editors.DateEdit()
            {
                DateTime = DateTime.Now.AddDays(-1), Height = 24, VerticalAlignment = System.Windows.VerticalAlignment.Bottom
            };
            toolboxSub.Children.Add(dateStart);
            toolboxSub.Children.Add(new TextBlock()
            {
                Text = "――――", Foreground = Brushes.Cyan, VerticalAlignment = System.Windows.VerticalAlignment.Bottom, Margin = new System.Windows.Thickness(4, 0, 4, 0)
            });
            dateEnd = new DevExpress.Xpf.Editors.DateEdit()
            {
                DateTime = DateTime.Now, Height = 24, Margin = new System.Windows.Thickness(0, 0, 60, 0), VerticalAlignment = System.Windows.VerticalAlignment.Bottom
            };
            toolboxSub.Children.Add(dateEnd);

            dateStart.EditValueChanged += new DevExpress.Xpf.Editors.EditValueChangedEventHandler(dateStart_EditValueChanged);
            dateEnd.EditValueChanged   += new DevExpress.Xpf.Editors.EditValueChangedEventHandler(dateEnd_EditValueChanged);

            // 工具栏初始化
            zButton btn;

            btn = new zButton()
            {
                text = "运行重演", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnReplay_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "统计分析", group = "2", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnStatistics_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "指标评价", group = "3"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnIndexEvaluate_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #12
0
        //负荷变化
        void btnLoadChange_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Planning.PRunFlow))
                {
                    app.end();                    //不为空,不为本身,执行结束操作
                }
                if (!(app is Planning.PRunFlow))  //不为本身,执行创建
                {
                    //app = new Planning.PFlow(root);
                    //app.begin();
                }
            }
        }
Пример #13
0
        //指标鱼骨图
        void btnIndexFish_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Planning.PEvaluteIndexFish))
                {
                    app.end();                             //不为空,不为本身,执行结束操作
                }
                if (!(app is Planning.PEvaluteIndexFish))  //不为本身,执行创建
                {
                    app = new Planning.PEvaluteIndexFish(root);
                    app.begin();
                }
            }
        }
Пример #14
0
        //可靠性
        void btnReliability_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Planning.PAnalyseReliability))
                {
                    app.end();                               //不为空,不为本身,执行结束操作
                }
                if (!(app is Planning.PAnalyseReliability))  //不为本身,执行创建
                {
                    app = new Planning.PAnalyseReliability(root);
                    app.begin();
                }
            }
        }
Пример #15
0
        public PAnalyse(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            for (int i = 2015; i < 2026; i++)
            {
                cmbYear.Items.Add(i);
            }
            cmbYear.SelectedValue = 2020;
            toolboxSub.Children.Add(cmbYear);
            cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "配网自动化程度"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnAuto_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "可靠性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnReliability_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "N-1分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnN1_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "主动性分析"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnInitiative_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "方案对比"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCompare_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #16
0
        //电压等值图
        void btnVLContour_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Run.RRunFlow))
                {
                    app.end();               //不为空,不为本身,执行结束操作
                }
                if (!(app is Run.RRunFlow))  //不为本身,执行创建
                {
                    app = new Run.RRunFlow(root);
                    app.begin();
                }
            }
            (app as RRunFlow).ShowVL(btn.isChecked);
        }
Пример #17
0
        //负荷等值图
        void btnLoadContour_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Planning.PRunLoadContour))
                {
                    app.end();                           //不为空,不为本身,执行结束操作
                }
                if (!(app is Planning.PRunLoadContour))  //不为本身,执行创建
                {
                    app = new Planning.PRunLoadContour(root);
                    app.begin();
                }
            }
            (app as Planning.PRunLoadContour).showhide(btn.isChecked);
        }
Пример #18
0
        //指标评价
        void btnIndexEvaluate_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Run.RHistoryIndexFish))
                {
                    app.end();                        //不为空,不为本身,执行结束操作
                }
                if (!(app is Run.RHistoryIndexFish))  //不为本身,执行创建
                {
                    app = new Run.RHistoryIndexFish(root);
                    app.begin();
                }
            }
            (app as RHistoryIndexFish).show(btn.isChecked);
        }
Пример #19
0
        public IParaSet(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            zButton btn;

            btn = new zButton()
            {
                text = "分类负荷特性"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnClassifcation_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "统计负荷特性"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnSummary_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #20
0
        //运行重演
        void btnReplay_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            zButton btn = sender as zButton;

            if (btn.isChecked)
            {
                if (app != null && !(app is Run.RHistoryReplay))
                {
                    app.end();                     //不为空,不为本身,执行结束操作
                }
                if (!(app is Run.RHistoryReplay))  //不为本身,执行创建
                {
                    app = new Run.RHistoryReplay(root);
                    app.begin();
                }
            }
            (app as RHistoryReplay).curcontrol.startDate = dateStart.DateTime.Date;
            (app as RHistoryReplay).curcontrol.endDate   = dateEnd.DateTime.Date.AddDays(1);
            (app as RHistoryReplay).show(btn.isChecked);
        }
Пример #21
0
        public RFuture(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            zButton btn;

            // 工具栏初始化
            cmbSelect.Items.Add("5分钟后");
            cmbSelect.Items.Add("30分钟后");
            cmbSelect.Items.Add("60分钟后");

            toolboxSub.Children.Add(cmbSelect);
            cmbSelect.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbSelect_SelectionChanged);


            btn = new zButton()
            {
                text = "预测 ", Foreground = new SolidColorBrush(Colors.Blue), isNormalButton = true, group = "0", Margin = new System.Windows.Thickness(3, 0, 30, 0), IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCal_Click);
            toolboxSub.Children.Add(btn);
            //显示部分
            btn = new zButton()
            {
                text = "预测潮流", group = "1", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnFlow_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "负荷转移", group = "1", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadTransfer_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电压无功", group = "1", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnVLRP_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #22
0
        public PChoice(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            object container = VisualTreeHelper.GetParent(_Global.InstanceSelector);

            if (container != null)
            {
                (container as System.Windows.Controls.StackPanel).Children.Remove(_Global.InstanceSelector);
            }
            toolboxSub.Children.Add(_Global.InstanceSelector);

            //// 工具栏初始化
            //for (int i = 2015; i < 2026; i++)
            //    cmbYear.Items.Add(i);
            //cmbYear.SelectedValue = 2020;
            //toolboxSub.Children.Add(cmbYear);
            //cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "变电站选址定容", IsEnabled = false,
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnTransform_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "充电桩选址定容"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnCharge_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "储能装置选址定容", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnStore_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #23
0
        public PTimes(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            object container = VisualTreeHelper.GetParent(_Global.InstanceSelector);

            if (container != null)
            {
                (container as System.Windows.Controls.StackPanel).Children.Remove(_Global.InstanceSelector);
            }
            toolboxSub.Children.Add(_Global.InstanceSelector);

            //// 工具栏初始化
            //for (int i = 2015; i < 2026; i++)
            //    cmbYear.Items.Add(i);
            //cmbYear.SelectedValue = 2020;
            //toolboxSub.Children.Add(cmbYear);
            //cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "配网规划演进", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnEvolve_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "配网历史变迁", group = "2", IsEnabled = false
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnHistory_Click);
            toolboxSub.Children.Add(btn);
            //btn = new zButton() { text = "用电负荷变化", group = "3", IsEnabled=false };
            //btn.Click += new System.Windows.RoutedEventHandler(btnLoadChange_Click);
            //toolboxSub.Children.Add(btn);
        }
Пример #24
0
        public PRun(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            // 工具栏初始化
            for (int i = 2015; i < 2026; i++)
            {
                cmbYear.Items.Add(i);
            }
            cmbYear.SelectedValue = 2020;
            toolboxSub.Children.Add(cmbYear);
            cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "潮流", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnFlow_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "负载率", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoad_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电压", group = "1", Margin = new System.Windows.Thickness(0, 0, 10, 0)
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnVL_Click);
            toolboxSub.Children.Add(btn);

            //btn = new zButton() { text = "断面潮流", group = "5" };
            //btn.Click += new System.Windows.RoutedEventHandler(btnSection_Click);
            //toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电源追溯", group = "2"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnTrace_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "供电范围", group = "3"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnRange_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "负荷等值图", group = "6"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadContour_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "区块负荷预测", group = "4"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadForcast_Click);
            toolboxSub.Children.Add(btn);
        }
Пример #25
0
        public PRun(UCDNV863 parent, string AppName, Brush icon)
            : base(parent, AppName, icon)
        {
            object container = VisualTreeHelper.GetParent(_Global.InstanceSelector);

            if (container != null)
            {
                (container as System.Windows.Controls.StackPanel).Children.Remove(_Global.InstanceSelector);
            }
            toolboxSub.Children.Add(_Global.InstanceSelector);

            // 工具栏初始化
            //for (int i = 2015; i < 2026; i++)
            //    cmbYear.Items.Add(i);
            //cmbYear.SelectedValue = 2020;
            //toolboxSub.Children.Add(cmbYear);
            //cmbYear.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(cmbYear_SelectionChanged);

            zButton btn;

            btn = new zButton()
            {
                text = "潮流", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnFlow_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "负载率", group = "1"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoad_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电压", group = "1", Margin = new System.Windows.Thickness(0, 0, 10, 0)
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnVL_Click);
            toolboxSub.Children.Add(btn);

            //btn = new zButton() { text = "断面潮流", group = "5" };
            //btn.Click += new System.Windows.RoutedEventHandler(btnSection_Click);
            //toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "电源追溯", group = "2"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnTrace_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "供电范围", group = "3"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnRange_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "负荷等值图", group = "6"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadContour_Click);
            toolboxSub.Children.Add(btn);
            btn = new zButton()
            {
                text = "区块负荷预测", group = "4"
            };
            btn.Click += new System.Windows.RoutedEventHandler(btnLoadForcast_Click);
            toolboxSub.Children.Add(btn);
        }