Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 75 lines (68 sloc) 2.448 kB
ab31aaf First Commit
SensePost Pty Ltd authored
1 /*
2 Copyright (C) 2004 SensePost Research
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 using System;
20 using System.Collections.Generic;
21 using System.ComponentModel;
22 using System.Data;
23 using System.Drawing;
24 using System.Text;
25 using System.Windows.Forms;
26
27 namespace SensePost.Wikto
28 {
29 public partial class EditItems : Form
30 {
31 private frm_Wikto the_parent;
32 private ListBox the_target;
33 public EditItems(frm_Wikto frm, ListBox lst)
34 {
35 this.the_parent = frm;
36 this.the_target = lst;
37 InitializeComponent();
38 String TheItems = "";
39 for (int i = 0; i < the_target.Items.Count; i++)
40 {
41 String tmp = the_target.Items[i].ToString();
42 tmp = tmp.Replace("\r", "");
43 if (tmp.Length > 0)
44 {
45 if (TheItems.Length == 0)
46 TheItems = tmp;
47 else
48 TheItems = TheItems + "\r\n" + tmp;
49 }
50 }
51 this.txt_Items.Text = TheItems;
52 }
53
54 private void btn_Cancel_Click(object sender, EventArgs e)
55 {
56 the_parent.Focus();
57 this.Dispose();
58 }
59
60 private void btn_OK_Click(object sender, EventArgs e)
61 {
62 String[] AllItems = this.txt_Items.Text.Split('\n');
63 this.the_target.Items.Clear();
64 String tmp = "";
65 foreach (String itm in AllItems)
66 {
67 tmp = itm.Replace("\r", "");
68 if (tmp.Length > 0)
69 this.the_target.Items.Add(tmp);
70 }
71 the_parent.Focus();
72 this.Dispose();
73 }
74 }
75 }
Something went wrong with that request. Please try again.