#include <xtd/diagnostics/process>
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/text_box>
#include <xtd/environment>
#include <xtd/startup>
public:
virtual_console() {
}
protected:
switch (e.key_code()) {
default: break;
}
}
private:
if (pos != xtd::string::npos) {
pos += prompt.size();
return text().substring(pos);
}
return "";
}
e.handled(true);
}
e.handled(true);
}
auto command_line = get_command();
if (!command_line.empty()) {
try {
auto args = command_line.split(' ');
if (args.size() > 1)
} else {
}
} else {
process.start_info(start_info);
process.start();
std::istream& standard_error = process.standard_error();
std::istream& standard_output = process.standard_output();
}
}
}
} catch (...) {
}
}
e.handled(true);
}
};
class form_main : public form {
public:
static auto main() {
application::run(form_main());
}
form_main() {
client_size({600, 600});
virtual_console.dock(dock_style::fill);
virtual_console.parent(*this);
}
private:
class virtual_console virtual_console;
};
xtd::size last_index_of(const basic_string &value) const noexcept
Reports the index of the last occurrence of the specified basic_string in this basic_string.
Definition basic_string.hpp:1476
Specifies a set of values that are used when you start a process.
Definition process_start_info.hpp:39
bool redirect_standard_output() const noexcept
Gets a value that indicates whether the textual output of an application is written to the xtd::diagn...
bool redirect_standard_error() const noexcept
Gets a value that indicates whether the error output of an application is written to the xtd::diagnos...
const xtd::string & arguments() const noexcept
Gets the set of command-line arguments to use when starting the application.
const xtd::string & file_name() const noexcept
Gets the application or document to start.
Provides access to local and remote processes and enables you to start and stop local system processe...
Definition process.hpp:50
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
static const xtd::drawing::color lime
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant.
Definition color.hpp:287
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition color.hpp:80
static font_family generic_monospace() noexcept
Gets a generic monospace font_family.
Defines a particular format for text, including font face, size, and style attributes....
Definition font.hpp:45
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
@ home
The file system directory that contains home folder.
Definition environment.hpp:243
static xtd::string get_folder_path(environment::special_folder folder)
Gets the path to the system special folder that is identified by the specified enumeration.
Definition environment.hpp:613
static xtd::string current_directory()
Gets the fully qualified path of the current working directory.
virtual bool multiline() const noexcept
Gets a value indicating whether this is a multiline text box control.
Represents a standard Windows text box.
Definition text_box.hpp:31
drawing::color default_back_color() const noexcept override
Gets the default background color of the control.
drawing::color default_fore_color() const noexcept override
Gets the default foreground color of the control.
void append_text(const xtd::string &value) override
Appends text to the current text of a text box.
const xtd::string & text() const noexcept override
Gets the text associated with this control.
static bool exists(const xtd::string &path)
Determines whether the given path refers to an existing directory on disk.
Implements a xtd::io::text_reader that reads characters from a byte stream.
Definition stream_reader.hpp:28
bool end_of_stream() const
Gets a value that indicates whether the current stream position is at the end of the stream.
virtual xtd::string read_line()
Reads a line of characters from the current stream and returns the data as a string.
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::array< xtd::string > argument_collection
Represents the collection of arguments passed to the main entry point method.
Definition argument_collection.hpp:19
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:32