Revision | 234 (tree) |
---|---|
Zeit | 2011-01-16 02:37:11 |
Autor | rankingloid |
Add FormMultipleMylist
@@ -0,0 +1,37 @@ | ||
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.ComponentModel; | |
4 | +using System.Data; | |
5 | +using System.Drawing; | |
6 | +using System.Text; | |
7 | +using System.Windows.Forms; | |
8 | + | |
9 | +namespace nicorank | |
10 | +{ | |
11 | + public partial class FormMultipleMylist : Form | |
12 | + { | |
13 | + FormMain form_main_; | |
14 | + | |
15 | + public FormMultipleMylist(FormMain form_main) | |
16 | + { | |
17 | + form_main_ = form_main; | |
18 | + InitializeComponent(); | |
19 | + } | |
20 | + | |
21 | + private void buttonAdd_Click(object sender, EventArgs e) | |
22 | + { | |
23 | + List<string> mylist_id_list = new List<string>(); | |
24 | + List<int> mylist_count_list = new List<int>(); | |
25 | + | |
26 | + for (int i = 0; i < dataGridViewMylist.Rows.Count; ++i) | |
27 | + { | |
28 | + if (!string.IsNullOrEmpty((string)dataGridViewMylist[0, i].Value)) | |
29 | + { | |
30 | + mylist_id_list.Add((string)dataGridViewMylist[0, i].Value); | |
31 | + mylist_count_list.Add(int.Parse(((string)dataGridViewMylist[1, i].Value))); | |
32 | + } | |
33 | + } | |
34 | + form_main_.AddMultipleMylist(mylist_id_list, mylist_count_list); | |
35 | + } | |
36 | + } | |
37 | +} |
@@ -0,0 +1,95 @@ | ||
1 | +namespace nicorank | |
2 | +{ | |
3 | + partial class FormMultipleMylist | |
4 | + { | |
5 | + /// <summary> | |
6 | + /// 必要なデザイナー変数です。 | |
7 | + /// </summary> | |
8 | + private System.ComponentModel.IContainer components = null; | |
9 | + | |
10 | + /// <summary> | |
11 | + /// 使用中のリソースをすべてクリーンアップします。 | |
12 | + /// </summary> | |
13 | + /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param> | |
14 | + protected override void Dispose(bool disposing) | |
15 | + { | |
16 | + if (disposing && (components != null)) | |
17 | + { | |
18 | + components.Dispose(); | |
19 | + } | |
20 | + base.Dispose(disposing); | |
21 | + } | |
22 | + | |
23 | + #region Windows フォーム デザイナーで生成されたコード | |
24 | + | |
25 | + /// <summary> | |
26 | + /// デザイナー サポートに必要なメソッドです。このメソッドの内容を | |
27 | + /// コード エディターで変更しないでください。 | |
28 | + /// </summary> | |
29 | + private void InitializeComponent() | |
30 | + { | |
31 | + this.dataGridViewMylist = new System.Windows.Forms.DataGridView(); | |
32 | + this.buttonAdd = new System.Windows.Forms.Button(); | |
33 | + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
34 | + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
35 | + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMylist)).BeginInit(); | |
36 | + this.SuspendLayout(); | |
37 | + // | |
38 | + // dataGridViewMylist | |
39 | + // | |
40 | + this.dataGridViewMylist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | |
41 | + | System.Windows.Forms.AnchorStyles.Left) | |
42 | + | System.Windows.Forms.AnchorStyles.Right))); | |
43 | + this.dataGridViewMylist.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |
44 | + this.dataGridViewMylist.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { | |
45 | + this.Column1, | |
46 | + this.Column2}); | |
47 | + this.dataGridViewMylist.Location = new System.Drawing.Point(12, 10); | |
48 | + this.dataGridViewMylist.Name = "dataGridViewMylist"; | |
49 | + this.dataGridViewMylist.RowTemplate.Height = 21; | |
50 | + this.dataGridViewMylist.Size = new System.Drawing.Size(214, 307); | |
51 | + this.dataGridViewMylist.TabIndex = 0; | |
52 | + // | |
53 | + // buttonAdd | |
54 | + // | |
55 | + this.buttonAdd.Location = new System.Drawing.Point(151, 323); | |
56 | + this.buttonAdd.Name = "buttonAdd"; | |
57 | + this.buttonAdd.Size = new System.Drawing.Size(75, 23); | |
58 | + this.buttonAdd.TabIndex = 1; | |
59 | + this.buttonAdd.Text = "追加"; | |
60 | + this.buttonAdd.UseVisualStyleBackColor = true; | |
61 | + this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); | |
62 | + // | |
63 | + // Column1 | |
64 | + // | |
65 | + this.Column1.HeaderText = "マイリストID"; | |
66 | + this.Column1.Name = "Column1"; | |
67 | + // | |
68 | + // Column2 | |
69 | + // | |
70 | + this.Column2.HeaderText = "追加数"; | |
71 | + this.Column2.Name = "Column2"; | |
72 | + this.Column2.Width = 70; | |
73 | + // | |
74 | + // FormMultipleMylist | |
75 | + // | |
76 | + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |
77 | + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |
78 | + this.ClientSize = new System.Drawing.Size(238, 351); | |
79 | + this.Controls.Add(this.buttonAdd); | |
80 | + this.Controls.Add(this.dataGridViewMylist); | |
81 | + this.Name = "FormMultipleMylist"; | |
82 | + this.Text = "マイリスト追加"; | |
83 | + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMylist)).EndInit(); | |
84 | + this.ResumeLayout(false); | |
85 | + | |
86 | + } | |
87 | + | |
88 | + #endregion | |
89 | + | |
90 | + private System.Windows.Forms.DataGridView dataGridViewMylist; | |
91 | + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; | |
92 | + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; | |
93 | + private System.Windows.Forms.Button buttonAdd; | |
94 | + } | |
95 | +} | |
\ No newline at end of file |