public void SetText(string Text, string EncodingType) { if (MainText.InvokeRequired) { SetText_d UiDelegate = new SetText_d(SetText); MainText.Invoke(UiDelegate, new object[] { Text, EncodingType }); } else { SetTextValue(Text, Tools.IsBinary(Text)); Encoding EncToUse = Encoding.GetEncoding(EncodingType); SetHex(EncToUse.GetBytes(Text)); this.EncodingType = EncodingType; this.ResetChangedStatus(); Find(); } }
public void SetText(string Text, string EncodingType) { if (MainText.InvokeRequired) { SetText_d UiDelegate = new SetText_d(SetText); MainText.Invoke(UiDelegate, new object[] { Text, EncodingType }); } else { SetTextValue(Text, Tools.IsBinary(Text)); Encoding EncToUse = Encoding.GetEncoding(EncodingType); SetHexValue(EncToUse.GetBytes(Text)); this.EncodingType = EncodingType; this.ResetChangedStatus(); if (IsInBinaryMode) { if (!MainTabs.SelectedTab.Name.Equals("HexTab")) { MainTabs.SelectTab("HexTab"); } } Find(); } }