예제 #1
0
        public void LoadUrl()
        {
            // Uri rulpaht = new Uri("http://www.kanng.net");

            //webBrowser1.Url = rulpaht;

            richTextBox1.Text = KanngHelper.SingleKanng(LoadPath).ReadAllText();


            List <UrlModel> urlModel = UrlXmlIO.ReadAllUrl();

            if (urlModel != null)
            {
                foreach (UrlModel model in urlModel)
                {
                    this.urlPatte1 = new UrlPatte();

                    urlPatte1.SetModel(model.guid, model.url, model.name);
                    //
                    // urlPatte1
                    //
                    this.urlPatte1.Cursor   = System.Windows.Forms.Cursors.Hand;
                    this.urlPatte1.Location = new System.Drawing.Point(3, 3);
                    this.urlPatte1.Name     = "urlPatte1";
                    this.urlPatte1.Size     = new System.Drawing.Size(87, 51);
                    this.urlPatte1.TabIndex = 3;

                    this.flowLayoutPanel1.Controls.Add(this.urlPatte1);
                }
            }
        }
예제 #2
0
        public void addControl(UrlModel model)
        {
            //this.Refresh();
            this.urlPatte1 = new UrlPatte();

            urlPatte1.SetModel(model.guid, model.url, model.name);
            //
            // urlPatte1
            //
            this.urlPatte1.Cursor   = System.Windows.Forms.Cursors.Hand;
            this.urlPatte1.Location = new System.Drawing.Point(3, 3);
            this.urlPatte1.Name     = "urlPatte1";
            this.urlPatte1.Size     = new System.Drawing.Size(87, 51);
            this.urlPatte1.TabIndex = 3;
            this.flowLayoutPanel1.Controls.Add(this.urlPatte1);
        }
예제 #3
0
        public void updateControl(UrlModel model)
        {
            //this.Refresh();
            this.urlPatte1 = (UrlPatte)this.flowLayoutPanel1.Controls.Find(model.guid, false)[0];

            urlPatte1.SetModel(model.guid, model.url, model.name, model.username, model.password);
            //
            // urlPatte1
            //
            this.urlPatte1.Cursor   = System.Windows.Forms.Cursors.Hand;
            this.urlPatte1.Location = new System.Drawing.Point(3, 3);
            this.urlPatte1.Name     = model.guid;
            this.urlPatte1.Size     = new System.Drawing.Size(87, 51);
            this.urlPatte1.TabIndex = 3;
            urlPatte1.label1.Text   = model.name;
            this.urlPatte1.Refresh();
        }