Beispiel #1
0
	void OnEnter(wxCommandEvent &event) {
		wxString cmd=GetValue(); if (cmd.IsEmpty()) return;
		if (!input_history.GetCount() || input_history.Last()!=cmd) input_history.Add(cmd);
		input_history_pos=input_history.GetCount();
		if (input_history_pos) --input_history_pos;
		event.Skip();
	}
Beispiel #2
0
 virtual bool OnDropFiles(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
                          const wxArrayString& filenames)
     {
         if(filenames.GetCount() == 1)
         {
             if(wxMatchWild(wxT("*.*"), filenames.Last()))
             {
                 Globals::Instance()->GetMainFrame()->OpenFile(filenames.Last());
             }
             else
             {
                 wxLogError(wxT("Invalid File."));
             }
         }
         return true;
     }