コード例 #1
0
ファイル: Engine.cs プロジェクト: ThiccPadx/pva-public
        public void RefreshViewTab()
        {
            var dtT = new VisaTask
            {
                City     = "Львов",
                CityCode = "1"
            };

            _visaTasks = new BindingList <VisaTask> {
                dtT
            };

            foreach (var dt in _visaTasks)
            {
                if (!_cityTasks.ContainsKey(dt.CityV))
                {
                    // Create UI tab first
                    var tabPage = new TabPage(dt.CityV)
                    {
                        Name = dt.CityV
                    };

                    // Create webbrowser UI
                    var webBrowser = new WebBrowser
                    {
                        Location = new Point(0, 0),
                        Size     = new Size(1000, 460),
                        Dock     = DockStyle.Top,
                        Name     = "webBrowser" + dt.City,
                        Url      = new Uri("http://google.com")
                    };
                    tabPage.Controls.Add(webBrowser);

                    var logTxtBox = new RichTextBox
                    {
                        Location = new Point(0, 0),
                        Size     = new Size(1000, 130),
                        Dock     = DockStyle.Bottom,
                        Name     = "logTxtBox" + dt.CityCode
                    };
                    tabPage.Controls.Add(logTxtBox);

                    SetTabHeader(tabPage, Color.Chartreuse);
                    _tabControl.TabPages.Add(tabPage);

                    VisaTabs visaTab = new VisaTabs(dt, tabPage);
                    _cityTasks.Add(dt.CityV, visaTab);
                }
                else
                {
                    return;
                }
            }

            foreach (KeyValuePair <string, VisaTabs> pair in _cityTasks)
            {
            }
        }
コード例 #2
0
ファイル: Engine.cs プロジェクト: vikewoods/pva-public
        public void RefreshViewTab()
        {
            var dtT = new VisaTask
            {
                City = "Львов",
                CityCode = "1"
            };
            _visaTasks = new BindingList<VisaTask> {dtT};

            foreach (var dt in _visaTasks)
            {
                if (!_cityTasks.ContainsKey(dt.CityV))
                {
                    // Create UI tab first
                    var tabPage = new TabPage(dt.CityV) {Name = dt.CityV};

                    // Create webbrowser UI
                    var webBrowser = new WebBrowser
                    {
                        Location = new Point(0, 0),
                        Size = new Size(1000, 460),
                        Dock = DockStyle.Top,
                        Name = "webBrowser" + dt.City,
                        Url = new Uri("http://google.com")
                    };
                    tabPage.Controls.Add(webBrowser);

                    var logTxtBox = new RichTextBox
                    {
                        Location = new Point(0, 0),
                        Size = new Size(1000, 130),
                        Dock = DockStyle.Bottom,
                        Name = "logTxtBox" + dt.CityCode
                    };
                    tabPage.Controls.Add(logTxtBox);

                    SetTabHeader(tabPage, Color.Chartreuse);
                    _tabControl.TabPages.Add(tabPage);

                    VisaTabs visaTab = new VisaTabs(dt, tabPage);
                    _cityTasks.Add(dt.CityV, visaTab);
                }
                else
                {
                    return;
                }
            }

            foreach (KeyValuePair<string, VisaTabs> pair in _cityTasks)
            {

            }
        }