Subversion Repositories spk

Rev

Rev 173 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 173 Rev 197
Line 22... Line 22...
22
	///          resources associated with this form.
22
	///          resources associated with this form.
23
	/// </summary>
23
	/// </summary>
24
	public ref class EditGlobals : public System::Windows::Forms::Form
24
	public ref class EditGlobals : public System::Windows::Forms::Form
25
	{
25
	{
26
	public:
26
	public:
27
		EditGlobals(Utils::CStringList *globals)
27
		EditGlobals(Utils::WStringList *globals)
28
		{
28
		{
29
			InitializeComponent();
29
			InitializeComponent();
30
 
30
 
31
			_pGlobals = globals;
31
			_pGlobals = globals;
32
			m_pSaved = new CyStringList;
32
			m_pSaved = new Utils::WStringList;
33
 
33
 
34
			UpdateList();
34
			UpdateList();
35
		}
35
		}
36
 
36
 
37
		void UpdateList()
37
		void UpdateList()
Line 59... Line 59...
59
			}
59
			}
60
		}
60
		}
61
 
61
 
62
		void SaveList()
62
		void SaveList()
63
		{
63
		{
64
			m_pSaved->Clear();
64
			m_pSaved->clear();
65
			for ( int i = 0; i < this->listView1->Items->Count; i++ )
65
			for ( int i = 0; i < this->listView1->Items->Count; i++ )
66
			{
66
			{
67
				if ( !this->listView1->Items[i]->Checked )
67
				if ( !this->listView1->Items[i]->Checked )
68
					continue;
68
					continue;
69
 
69
 
70
				// compare against saved
70
				// compare against saved
71
				Utils::String data = _pGlobals->findString(_S(this->listView1->Items[i]->Text));
71
				Utils::WString data = _pGlobals->findString(_WS(this->listView1->Items[i]->Text));
72
				if (data.Compare(_S(this->listView1->Items[i]->SubItems[1]->Text)) )
72
				if (data.Compare(_WS(this->listView1->Items[i]->SubItems[1]->Text)) )
73
					continue;
73
					continue;
74
 
74
 
75
				m_pSaved->PushBack(CyStringFromSystemString(this->listView1->Items[i]->Text), CyStringFromSystemString(this->listView1->Items[i]->SubItems[1]->Text));
75
				m_pSaved->pushBack(_WS(this->listView1->Items[i]->Text), _WS(this->listView1->Items[i]->SubItems[1]->Text));
76
			}
76
			}
77
		}
77
		}
78
 
78
 
79
		CyStringList *GetSavedSettings() { return m_pSaved; }
79
		Utils::WStringList *GetSavedSettings() { return m_pSaved; }
80
 
80
 
81
	protected:
81
	protected:
82
		/// <summary>
82
		/// <summary>
83
		/// Clean up any resources being used.
83
		/// Clean up any resources being used.
84
		/// </summary>
84
		/// </summary>
Line 89... Line 89...
89
				delete components;
89
				delete components;
90
			}
90
			}
91
			delete m_pSaved;
91
			delete m_pSaved;
92
		}
92
		}
93
 
93
 
94
		Utils::CStringList *_pGlobals;
94
		Utils::WStringList *_pGlobals;
95
		CyStringList *m_pSaved;
95
		Utils::WStringList *m_pSaved;
96
 
96
 
97
	private: System::Windows::Forms::Panel^  panel1;
97
	private: System::Windows::Forms::Panel^  panel1;
98
	protected: 
98
	protected: 
99
	private: System::Windows::Forms::Button^  button2;
99
	private: System::Windows::Forms::Button^  button2;
100
	private: System::Windows::Forms::Button^  button1;
100
	private: System::Windows::Forms::Button^  button1;