예제 #1
0
        /// <summary>
        /// 각 ViewKind와 툴바를 매핑하는 작업
        /// </summary>
        private void InitView()
        {
            //메인 화면
            ViewBase coverViewBase = CoverView.CreateView(ViewKind.None, this);

            coverViewBase.ViewKind = ViewKind.None;
            coverViewBase.Dock     = System.Windows.Forms.DockStyle.Fill;
            coverViewBase.Location = new System.Drawing.Point(0, 0);
            coverViewBase.Name     = "coverView";
            coverViewBase.Size     = new System.Drawing.Size(1904, 937);
            this.middlePanel.Controls.Add(coverViewBase);
            this.dicViews.Add(ViewKind.None, coverViewBase);

            //방송발령 화면
            ViewBase orderViewBase = OrderView19201080.CreateView(ViewKind.OrderView19201080, this);

            orderViewBase.Interval = 1000;
            orderViewBase.ViewKind = ViewKind.OrderView19201080;
            orderViewBase.Dock     = System.Windows.Forms.DockStyle.Fill;
            orderViewBase.Location = new System.Drawing.Point(0, 0);
            orderViewBase.Name     = "orderView";
            orderViewBase.Size     = new System.Drawing.Size(1904, 937);
            this.middlePanel.Controls.Add(orderViewBase);
            this.dicViews.Add(ViewKind.OrderView19201080, orderViewBase);

            //방송결과 화면
            ViewBase resultViewBase = ResultView.CreateView(ViewKind.ResultView, this);

            resultViewBase.Interval = 1000;
            resultViewBase.ViewKind = ViewKind.ResultView;
            resultViewBase.Dock     = System.Windows.Forms.DockStyle.Fill;
            resultViewBase.Location = new System.Drawing.Point(0, 0);
            resultViewBase.Name     = "resultView";
            resultViewBase.Size     = new System.Drawing.Size(1904, 937);
            this.middlePanel.Controls.Add(resultViewBase);
            this.dicViews.Add(ViewKind.ResultView, resultViewBase);

            //장비감시 화면
            ViewBase deviceMonViewBase = DeviceMonitorView.CreateView(ViewKind.DevMonView, this);

            deviceMonViewBase.Interval = 1000;
            deviceMonViewBase.ViewKind = ViewKind.DevMonView;
            deviceMonViewBase.Dock     = System.Windows.Forms.DockStyle.Fill;
            deviceMonViewBase.Location = new System.Drawing.Point(0, 0);
            deviceMonViewBase.Name     = "deviceMonitorView";
            deviceMonViewBase.Size     = new System.Drawing.Size(1904, 937);
            this.middlePanel.Controls.Add(deviceMonViewBase);
            this.dicViews.Add(ViewKind.DevMonView, deviceMonViewBase);

            this.btnOrderMenu.Tag       = ViewKind.OrderView19201080;
            this.btnOrderResultMenu.Tag = ViewKind.ResultView;
            this.btnDevMonMenu.Tag      = ViewKind.DevMonView;
        }
예제 #2
0
        /// <summary>
        /// View를 생성하는 Factory method
        /// </summary>
        /// <param name="viewKind">ViewKind 종류</param>
        /// <param name="main">MainForm</param>
        /// <returns></returns>
        public static ViewBase CreateView(MainForm.ViewKind viewKind, MainForm main)
        {
            switch (viewKind)
            {
            case MainForm.ViewKind.None:
                CoverView cover = new CoverView(main);
                return(cover);

            case MainForm.ViewKind.OrderView19201080:
                OrderView19201080 order19201080 = new OrderView19201080(main);
                return(order19201080);

            case MainForm.ViewKind.ResultView:
                ResultView result = new ResultView(main);
                return(result);

            case MainForm.ViewKind.DevMonView:
                DeviceMonitorView deviceMonitor = new DeviceMonitorView(main);
                return(deviceMonitor);

            default:
                return(new ViewBase(main));
            }
        }