public static string Error(string str, params object[] args) { string s = MyTranslateResource.str(str, args); Log.Error(s); return(s); }
public static void ShowStopError(string str) { string message = R.Error(MyTranslateResource.str(str)); if (Program.IsCommandLine) { U.echo(message); return; } if (U.CountLines(message) > 10 || message.IndexOf("https://") >= 0) { try { ErrorLongMessageDialogForm f = (ErrorLongMessageDialogForm)InputFormRef.JumpFormLow <ErrorLongMessageDialogForm>(); f.SetErrorMessage(message); f.ShowDialog(); return; } catch (Exception e) { Log.Error(R.ExceptionToString(e)); } } string title = R._("エラー"); MessageBox.Show(message , title , MessageBoxButtons.OK , MessageBoxIcon.Error); }
public MapLoadFunctionForm() { InitializeComponent(); //FE8のみ L_0_COMBO.BeginUpdate(); if (Program.ROM.RomInfo.is_multibyte()) { //{0}=ワールドマップ以外からでも入れる string a = MyTranslateResource.str((string)L_0_COMBO.Items[0]); L_0_COMBO.Items[0] = a.Replace("{0}", U.ToHexString(0x80C1FF0)); //{1}=必ずワールドマップから移動する必要がある a = MyTranslateResource.str((string)L_0_COMBO.Items[1]); L_0_COMBO.Items[1] = a.Replace("{0}", U.ToHexString(0x80C1FB4)); } else { //{0}=ワールドマップ以外からでも入れる string a = MyTranslateResource.str((string)L_0_COMBO.Items[0]); L_0_COMBO.Items[0] = a.Replace("{0}", U.ToHexString(0x80BD1E4)); //{1}=必ずワールドマップから移動する必要がある a = MyTranslateResource.str((string)L_0_COMBO.Items[1]); L_0_COMBO.Items[1] = a.Replace("{0}", U.ToHexString(0x80BD1A8)); } L_0_COMBO.EndUpdate(); this.InputFormRef = Init(this); this.InputFormRef.MakeGeneralAddressListContextMenu(true); ReInit(this.InputFormRef); }
public static string Debug(string str, params object[] args) { string s = MyTranslateResource.str(str, args); #if DEBUG Log.Debug(s); #endif return(s); }
public static string _(string str, params object[] args) { if (args.Length > 0) { string s = MyTranslateResource.str(str, args); return(s); } else { return(MyTranslateResource.str(str)); } }
public UnitIncreaseHeightForm() { InitializeComponent(); //伸ばさない string a = MyTranslateResource.str((string)L_0_COMBO.Items[0]); L_0_COMBO.Items[0] = a.Replace("{0}", U.ToHexString(Program.ROM.RomInfo.unit_increase_height_no)); //伸ばす a = MyTranslateResource.str((string)L_0_COMBO.Items[1]); L_0_COMBO.Items[1] = a.Replace("{0}", U.ToHexString(Program.ROM.RomInfo.unit_increase_height_yes)); this.AddressList.OwnerDraw(ListBoxEx.DrawImagePortraitAndText, DrawMode.OwnerDrawFixed); this.InputFormRef = Init(this); this.InputFormRef.CheckProtectionAddrHigh = false; //書き換える対象がswitchなので低い位地に書き換えるデータがあります。 this.InputFormRef.MakeGeneralAddressListContextMenu(true); ReInit(this.InputFormRef); }