示例#1
0
 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();
     }
 }
示例#2
0
 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();
     }
 }