ConsoleControl.ConsoleControl.ChangeFolder C# (CSharp) Method

ChangeFolder() public method

public ChangeFolder ( string Folder, bool IsFileSystem ) : void
Folder string
IsFileSystem bool
return void
		public void ChangeFolder(string Folder, bool IsFileSystem) {
			string Value = null;

			richTextBoxConsole.ReadOnly = false;


			if (!IsProcessRunning)
				/*this._cmdhandle =*/
				processInterace.StartProcess("cmd.exe", null);

			this._ShouldClear = true;
			ClearOutput();

			if (IsFileSystem)
				Value = $"cd /D \"{Folder}\"";
			if (!this._IsCodepageSet) {
				//Enable UTF-8 for the ConsoleControl
				WriteInput("chcp 65001", Color.Wheat, false);
				this._IsCodepageSet = true;
			}

			WriteInput(Value, Color.Wheat, false);
			this.LastLinePath = Folder;
		}