| 1 |
using System; |
| 2 |
using System.Xml; |
| 3 |
using System.IO; |
| 4 |
//using System.Windows.Forms; |
| 5 |
using System.Data; |
| 6 |
|
| 7 |
namespace RipSync.RsiEditor |
| 8 |
{ |
| 9 |
class RsiManager : IDisposable |
| 10 |
{ |
| 11 |
//ÚEűĚÇÁÚ |
| 12 |
public const int MC_EYEADDMAX = 6; |
| 13 |
public const int MC_MOUTHADDMAX = 6; |
| 14 |
|
| 15 |
//î{ |
| 16 |
public string RsiFileName; |
| 17 |
public string Eshi; |
| 18 |
public string Base; |
| 19 |
public string BaseHeight; |
| 20 |
public string BaseWidth; |
| 21 |
|
| 22 |
//Ú |
| 23 |
public string EyeClose; |
| 24 |
public string EyeThin; |
| 25 |
public string EyeNormal; |
| 26 |
|
| 27 |
//ű |
| 28 |
public string MouthA; |
| 29 |
public string MouthI; |
| 30 |
public string MouthU; |
| 31 |
public string MouthE; |
| 32 |
public string MouthO; |
| 33 |
public string MouthN; |
| 34 |
public string MouthXo; |
| 35 |
public string MouthAa; |
| 36 |
|
| 37 |
//ÚÇÁ |
| 38 |
public String[] EyeAddName = new String[MC_EYEADDMAX]; |
| 39 |
public String[] EyeAdd = new String[MC_EYEADDMAX]; |
| 40 |
|
| 41 |
//űÇÁ |
| 42 |
public String[] MouthAddName = new String[MC_MOUTHADDMAX]; |
| 43 |
public String[] MouthAdd = new String[MC_MOUTHADDMAX]; |
| 44 |
|
| 45 |
/// <summary> |
| 46 |
/// RXgN^B |
| 47 |
/// </summary> |
| 48 |
public RsiManager() |
| 49 |
{ |
| 50 |
} |
| 51 |
|
| 52 |
/// <summary> |
| 53 |
/// RXgN^B |
| 54 |
/// </summary> |
| 55 |
/// <param name="_filename"></param> |
| 56 |
public RsiManager(string _filename) |
| 57 |
{ |
| 58 |
if (!Load(_filename)) |
| 59 |
{ |
| 60 |
throw new Exception(); |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
/// <summary> |
| 65 |
/// RXgN^B |
| 66 |
/// </summary> |
| 67 |
/// <param name="_stream"></param> |
| 68 |
public RsiManager(Stream _stream) |
| 69 |
{ |
| 70 |
if (!Load(_stream)) |
| 71 |
{ |
| 72 |
throw new Exception(); |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
/// <summary> |
| 77 |
/// RsiManagerđÇÝŢB |
| 78 |
/// </summary> |
| 79 |
/// <param name="_filename"></param> |
| 80 |
/// <returns></returns> |
| 81 |
public bool Load(string _filename) |
| 82 |
{ |
| 83 |
bool ret = true; |
| 84 |
FileStream fs = null; |
| 85 |
try |
| 86 |
{ |
| 87 |
fs = new FileStream(_filename, FileMode.Open, FileAccess.Read); |
| 88 |
ret = this.Load(fs); |
| 89 |
} |
| 90 |
catch( Exception e) |
| 91 |
{ |
| 92 |
Logger.GetInstance().ErrorWrite("ConfigLoader", e); |
| 93 |
ret = false; |
| 94 |
} |
| 95 |
|
| 96 |
if (fs != null) fs.Close(); |
| 97 |
return ret; |
| 98 |
} |
| 99 |
|
| 100 |
/// <summary> |
| 101 |
/// RsiManagerđÇÝŢB |
| 102 |
/// </summary> |
| 103 |
/// <param name="_stream"></param> |
| 104 |
/// <returns></returns> |
| 105 |
public bool Load(Stream _stream) |
| 106 |
{ |
| 107 |
int eyeidx = 0; |
| 108 |
int mouthidx = 0; |
| 109 |
|
| 110 |
XmlDocument xmlDoc = new XmlDocument(); |
| 111 |
try |
| 112 |
{ |
| 113 |
xmlDoc.Load(_stream); |
| 114 |
} |
| 115 |
catch(Exception e) |
| 116 |
{ |
| 117 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", String.Format("XMLđÍĹG[ŞśľÜľ˝F{0}", e.Message)); |
| 118 |
return false; |
| 119 |
} |
| 120 |
|
| 121 |
Logger.GetInstance().Write(LogLevel.Info, "RsiManager.Load", "î{îńÇÝÝJnB"); |
| 122 |
|
| 123 |
XmlElement docelm = (XmlElement)xmlDoc.FirstChild; |
| 124 |
XmlNodeList nls; |
| 125 |
nls = docelm.GetElementsByTagName("Title"); |
| 126 |
if (nls.Count != 1) |
| 127 |
{ |
| 128 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", "TitleGgފŠčÜšńB"); |
| 129 |
return false; |
| 130 |
} |
| 131 |
Eshi = nls[0].FirstChild.Value; |
| 132 |
|
| 133 |
//[gC[W |
| 134 |
nls = docelm.GetElementsByTagName("RootImageName"); |
| 135 |
if (nls.Count != 1) |
| 136 |
{ |
| 137 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", "RootImageNameGgފŠčÜšńB"); |
| 138 |
return false; |
| 139 |
} |
| 140 |
Base = nls[0].FirstChild.Value; |
| 141 |
|
| 142 |
//Width, Height |
| 143 |
nls = docelm.GetElementsByTagName("Size"); |
| 144 |
if (nls.Count != 1) |
| 145 |
{ |
| 146 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", "SizeGgފŠčÜšńB"); |
| 147 |
return false; |
| 148 |
} |
| 149 |
string[] ss; |
| 150 |
ss =nls[0].FirstChild.Value.Split(",".ToCharArray()); |
| 151 |
BaseWidth = ss[0]; |
| 152 |
BaseHeight = ss[1]; |
| 153 |
|
| 154 |
//ImageÇÝÝ |
| 155 |
nls = docelm.GetElementsByTagName("Images"); |
| 156 |
if (nls.Count != 1) |
| 157 |
{ |
| 158 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", "ImagesGgފŠčÜšńB"); |
| 159 |
return false; |
| 160 |
} |
| 161 |
foreach (XmlNode elm_ in nls[0].ChildNodes) |
| 162 |
{ |
| 163 |
XmlElement elm; |
| 164 |
if (!(elm_ is XmlElement)) continue; |
| 165 |
elm = (XmlElement)elm_; |
| 166 |
|
| 167 |
Logger.GetInstance().Write(LogLevel.Info, "RsiManager.Load", "@loading elm:" + elm.Name + " " + elm.Attributes["name"].Value); |
| 168 |
|
| 169 |
if (elm.Name == "Image") |
| 170 |
{ |
| 171 |
switch (elm.Attributes["name"].Value) |
| 172 |
{ |
| 173 |
case "base": // x[Xć |
| 174 |
Base = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 175 |
break; |
| 176 |
case "eye_close": //ÂÚ |
| 177 |
EyeClose = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 178 |
break; |
| 179 |
case "eye_thin": //Ú |
| 180 |
EyeThin = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 181 |
break; |
| 182 |
case "eye_normal": //Ęí |
| 183 |
EyeNormal = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 184 |
break; |
| 185 |
case "mouth_a": //ű |
| 186 |
MouthA = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 187 |
break; |
| 188 |
case "mouth_i": //ű˘ |
| 189 |
MouthI = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 190 |
break; |
| 191 |
case "mouth_u": //ű¤ |
| 192 |
MouthU = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 193 |
break; |
| 194 |
case "mouth_e": //űŚ |
| 195 |
MouthE = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 196 |
break; |
| 197 |
case "mouth_o": //ű¨ |
| 198 |
MouthO = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 199 |
break; |
| 200 |
case "mouth_n": //űń |
| 201 |
MouthN = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 202 |
break; |
| 203 |
case "mouth_aa": //ű |
| 204 |
MouthAa = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 205 |
break; |
| 206 |
case "mouth_xo": //ű§ |
| 207 |
MouthXo = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 208 |
break; |
| 209 |
default: |
| 210 |
//ÚÇÁĚC[WšŠH |
| 211 |
if (elm.Attributes["name"].Value.ToString().Length > 4 && |
| 212 |
elm.Attributes["name"].Value.ToString().Substring(0, 4) == "eye_") |
| 213 |
{ |
| 214 |
//˝ˇŹÜšńŠH |
| 215 |
if (eyeidx < MC_EYEADDMAX) |
| 216 |
{ |
| 217 |
//ÇÁľÄnjÉá |
| 218 |
EyeAddName[eyeidx] = elm.Attributes["trigger"].Value; |
| 219 |
EyeAdd[eyeidx] = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 220 |
eyeidx++; |
| 221 |
} |
| 222 |
else |
| 223 |
{ |
| 224 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", " ÚĚ檽ˇŹÄÇÝĚÄÜľ˝B"); |
| 225 |
} |
| 226 |
|
| 227 |
} |
| 228 |
//űÇÁĚC[WšŠH |
| 229 |
else if (elm.Attributes["name"].Value.ToString().Length > 6 && |
| 230 |
elm.Attributes["name"].Value.ToString().Substring(0, 6) == "mouth_") |
| 231 |
{ |
| 232 |
//˝ˇŹÜšńŠH |
| 233 |
if (mouthidx < MC_MOUTHADDMAX) |
| 234 |
{ |
| 235 |
//ÇÁľÄnjÉá |
| 236 |
MouthAddName[mouthidx] = elm.Attributes["trigger"].Value; |
| 237 |
MouthAdd[mouthidx] = elm.Attributes["path"].Value.Replace("/", "\\"); |
| 238 |
mouthidx++; |
| 239 |
} |
| 240 |
else |
| 241 |
{ |
| 242 |
Logger.GetInstance().Write(LogLevel.Warn, "RsiManager", " űĚ檽ˇŹÄÇÝĚÄÜľ˝B"); |
| 243 |
} |
| 244 |
} |
| 245 |
break; |
| 246 |
} |
| 247 |
} |
| 248 |
//C[WČOÇÝĚÄEEE(^_^;) |
| 249 |
} |
| 250 |
Logger.GetInstance().Write(LogLevel.Info, "RsiManager", "LoadIš"); |
| 251 |
return true; |
| 252 |
} |
| 253 |
|
| 254 |
|
| 255 |
/// <summary> |
| 256 |
/// ÝčđŰśˇéB(ăŤŰś) |
| 257 |
/// </summary> |
| 258 |
/// <param name="_filename"></param> |
| 259 |
/// <returns></returns> |
| 260 |
public bool Save() |
| 261 |
{ |
| 262 |
return this.Save(RsiFileName); |
| 263 |
} |
| 264 |
|
| 265 |
/// <summary> |
| 266 |
/// ÝčđŰśˇéB |
| 267 |
/// </summary> |
| 268 |
/// <param name="_filename"></param> |
| 269 |
/// <returns></returns> |
| 270 |
public bool Save(string _filename) |
| 271 |
{ |
| 272 |
Logger.GetInstance().Write(LogLevel.Info, "RsiManager", "ÝčđŰśľÜˇB"); |
| 273 |
RsiFileName = _filename; |
| 274 |
|
| 275 |
try |
| 276 |
{ |
| 277 |
XmlDocument doc = new XmlDocument(); |
| 278 |
XmlElement elm = doc.CreateElement("SingerConfig"); |
| 279 |
//nodeKey = "/SingerConfig/Title"; |
| 280 |
doc.AppendChild(elm); |
| 281 |
|
| 282 |
//GfB^o[WđoÍ |
| 283 |
elm.AppendChild(doc.CreateComment(String.Concat("RSI Editer ", RsiEditor.frmRsiEditor.strVersion))); |
| 284 |
|
| 285 |
XmlElement elm2; |
| 286 |
XmlElement elm3; |
| 287 |
XmlElement elm4; |
| 288 |
|
| 289 |
int eyecnt; |
| 290 |
int mouthcnt; |
| 291 |
int i; |
| 292 |
|
| 293 |
//ÚĚÇÁćđJEg |
| 294 |
for ( i = 0; i < MC_EYEADDMAX; i++) |
| 295 |
{ |
| 296 |
if (EyeAddName[i] == "") |
| 297 |
{ |
| 298 |
break; |
| 299 |
} |
| 300 |
} |
| 301 |
if ( i > MC_EYEADDMAX) i = MC_EYEADDMAX; |
| 302 |
eyecnt = i; |
| 303 |
|
| 304 |
//űĚÇÁćđJEg |
| 305 |
for (i = 0; i < MC_MOUTHADDMAX; i++) |
| 306 |
{ |
| 307 |
if (MouthAddName[i] == "") |
| 308 |
{ |
| 309 |
break; |
| 310 |
} |
| 311 |
} |
| 312 |
if (i > MC_MOUTHADDMAX) i = MC_MOUTHADDMAX; |
| 313 |
mouthcnt = i; |
| 314 |
|
| 315 |
|
| 316 |
//^CgiGt-L) |
| 317 |
elm2 = doc.CreateElement("Title"); |
| 318 |
elm2.AppendChild(doc.CreateTextNode(Eshi)); |
| 319 |
elm.AppendChild(elm2); |
| 320 |
|
| 321 |
//Width, Height |
| 322 |
elm2 = doc.CreateElement("Size"); |
| 323 |
String strSize = String.Concat(BaseWidth, ",", BaseHeight); |
| 324 |
elm2.AppendChild(doc.CreateTextNode(strSize)); |
| 325 |
elm.AppendChild(elm2); |
| 326 |
|
| 327 |
//[gC[W |
| 328 |
elm2 = doc.CreateElement("RootImageName"); |
| 329 |
elm2.AppendChild(doc.CreateTextNode("root")); |
| 330 |
elm.AppendChild(elm2); |
| 331 |
|
| 332 |
//yC[WzO[v |
| 333 |
elm2 = doc.CreateElement("Images"); |
| 334 |
|
| 335 |
//@Base |
| 336 |
elm2.AppendChild(doc.CreateComment("fĚ")); |
| 337 |
elm3 = doc.CreateElement("Image"); |
| 338 |
elm3.SetAttribute("name", "base"); |
| 339 |
elm3.SetAttribute("size", strSize); |
| 340 |
elm3.SetAttribute("path", Base.Replace("\\", "/")); |
| 341 |
elm2.AppendChild(elm3); |
| 342 |
|
| 343 |
//ŠŽp |
| 344 |
elm2.AppendChild(doc.CreateComment("ŠŽp")); |
| 345 |
//@Ú |
| 346 |
elm3 = doc.CreateElement("Image"); |
| 347 |
elm3.SetAttribute("name", "auto_eye_close"); |
| 348 |
elm3.SetAttribute("size", strSize); |
| 349 |
elm3.SetAttribute("path", EyeClose.Replace("\\", "/")); |
| 350 |
elm2.AppendChild(elm3); |
| 351 |
|
| 352 |
elm3 = doc.CreateElement("Image"); |
| 353 |
elm3.SetAttribute("name", "auto_eye_thin"); |
| 354 |
elm3.SetAttribute("size", strSize); |
| 355 |
elm3.SetAttribute("path", EyeThin.Replace("\\", "/")); |
| 356 |
elm2.AppendChild(elm3); |
| 357 |
|
| 358 |
elm3 = doc.CreateElement("Image"); |
| 359 |
elm3.SetAttribute("name", "auto_eye_normal"); |
| 360 |
elm3.SetAttribute("size", strSize); |
| 361 |
elm3.SetAttribute("path", EyeNormal.Replace("\\", "/")); |
| 362 |
elm2.AppendChild(elm3); |
| 363 |
|
| 364 |
//@ű |
| 365 |
elm3 = doc.CreateElement("Image"); |
| 366 |
elm3.SetAttribute("name", "a"); |
| 367 |
elm3.SetAttribute("size", strSize); |
| 368 |
elm3.SetAttribute("path", MouthA.Replace("\\", "/")); |
| 369 |
elm2.AppendChild(elm3); |
| 370 |
|
| 371 |
elm3 = doc.CreateElement("Image"); |
| 372 |
elm3.SetAttribute("name", "aa"); |
| 373 |
elm3.SetAttribute("size", strSize); |
| 374 |
elm3.SetAttribute("path", MouthAa.Replace("\\", "/")); |
| 375 |
elm2.AppendChild(elm3); |
| 376 |
|
| 377 |
elm3 = doc.CreateElement("Image"); |
| 378 |
elm3.SetAttribute("name", "e"); |
| 379 |
elm3.SetAttribute("size", strSize); |
| 380 |
elm3.SetAttribute("path", MouthE.Replace("\\", "/")); |
| 381 |
elm2.AppendChild(elm3); |
| 382 |
|
| 383 |
elm3 = doc.CreateElement("Image"); |
| 384 |
elm3.SetAttribute("name", "i"); |
| 385 |
elm3.SetAttribute("size", strSize); |
| 386 |
elm3.SetAttribute("path", MouthI.Replace("\\", "/")); |
| 387 |
elm2.AppendChild(elm3); |
| 388 |
|
| 389 |
elm3 = doc.CreateElement("Image"); |
| 390 |
elm3.SetAttribute("name", "nn"); |
| 391 |
elm3.SetAttribute("size", strSize); |
| 392 |
elm3.SetAttribute("path", MouthN.Replace("\\", "/")); |
| 393 |
elm2.AppendChild(elm3); |
| 394 |
|
| 395 |
elm3 = doc.CreateElement("Image"); |
| 396 |
elm3.SetAttribute("name", "o"); |
| 397 |
elm3.SetAttribute("size", strSize); |
| 398 |
elm3.SetAttribute("path", MouthO.Replace("\\", "/")); |
| 399 |
elm2.AppendChild(elm3); |
| 400 |
|
| 401 |
elm3 = doc.CreateElement("Image"); |
| 402 |
elm3.SetAttribute("name", "u"); |
| 403 |
elm3.SetAttribute("size", strSize); |
| 404 |
elm3.SetAttribute("path", MouthU.Replace("\\", "/")); |
| 405 |
elm2.AppendChild(elm3); |
| 406 |
|
| 407 |
elm3 = doc.CreateElement("Image"); |
| 408 |
elm3.SetAttribute("name", "xo"); |
| 409 |
elm3.SetAttribute("size", strSize); |
| 410 |
elm3.SetAttribute("path", MouthXo.Replace("\\", "/")); |
| 411 |
elm2.AppendChild(elm3); |
| 412 |
|
| 413 |
//Ú |
| 414 |
elm2.AppendChild(doc.CreateComment("Ú")); |
| 415 |
|
| 416 |
elm3 = doc.CreateElement("Image"); |
| 417 |
elm3.SetAttribute("trigger", "Ęí"); |
| 418 |
elm3.SetAttribute("name", "eye_normal"); |
| 419 |
elm3.SetAttribute("size", strSize); |
| 420 |
elm3.SetAttribute("path", EyeNormal.Replace("\\", "/")); |
| 421 |
elm2.AppendChild(elm3); |
| 422 |
|
| 423 |
elm3 = doc.CreateElement("Image"); |
| 424 |
elm3.SetAttribute("trigger", "Ú"); |
| 425 |
elm3.SetAttribute("name", "eye_thin"); |
| 426 |
elm3.SetAttribute("size", strSize); |
| 427 |
elm3.SetAttribute("path", EyeThin.Replace("\\", "/")); |
| 428 |
elm2.AppendChild(elm3); |
| 429 |
|
| 430 |
elm3 = doc.CreateElement("Image"); |
| 431 |
elm3.SetAttribute("trigger", "ÂÚ"); |
| 432 |
elm3.SetAttribute("name", "eye_close"); |
| 433 |
elm3.SetAttribute("size", strSize); |
| 434 |
elm3.SetAttribute("path", EyeClose.Replace("\\", "/")); |
| 435 |
elm2.AppendChild(elm3); |
| 436 |
|
| 437 |
//Ú@ÇÁŞ |
| 438 |
for( i=0; i<eyecnt; i++) |
| 439 |
{ |
| 440 |
elm3 = doc.CreateElement("Image"); |
| 441 |
elm3.SetAttribute("trigger", EyeAddName[i]); |
| 442 |
elm3.SetAttribute("name", String.Concat("eye_", EyeAddName[i])); |
| 443 |
elm3.SetAttribute("size", strSize); |
| 444 |
elm3.SetAttribute("path", EyeAdd[i].Replace("\\", "/")); |
| 445 |
elm2.AppendChild(elm3); |
| 446 |
} |
| 447 |
|
| 448 |
//ű |
| 449 |
elm2.AppendChild(doc.CreateComment("ű")); |
| 450 |
|
| 451 |
elm3 = doc.CreateElement("Image"); |
| 452 |
elm3.SetAttribute("trigger", " "); |
| 453 |
elm3.SetAttribute("name", "mouth_a"); |
| 454 |
elm3.SetAttribute("size", strSize); |
| 455 |
elm3.SetAttribute("path", MouthA.Replace("\\", "/")); |
| 456 |
elm2.AppendChild(elm3); |
| 457 |
|
| 458 |
elm3 = doc.CreateElement("Image"); |
| 459 |
elm3.SetAttribute("trigger", " "); |
| 460 |
elm3.SetAttribute("name", "mouth_aa"); |
| 461 |
elm3.SetAttribute("size", strSize); |
| 462 |
elm3.SetAttribute("path", MouthAa.Replace("\\", "/")); |
| 463 |
elm2.AppendChild(elm3); |
| 464 |
|
| 465 |
elm3 = doc.CreateElement("Image"); |
| 466 |
elm3.SetAttribute("trigger", "Ś"); |
| 467 |
elm3.SetAttribute("name", "mouth_e"); |
| 468 |
elm3.SetAttribute("size", strSize); |
| 469 |
elm3.SetAttribute("path", MouthE.Replace("\\", "/")); |
| 470 |
elm2.AppendChild(elm3); |
| 471 |
|
| 472 |
elm3 = doc.CreateElement("Image"); |
| 473 |
elm3.SetAttribute("trigger", "˘"); |
| 474 |
elm3.SetAttribute("name", "mouth_i"); |
| 475 |
elm3.SetAttribute("size", strSize); |
| 476 |
elm3.SetAttribute("path", MouthI.Replace("\\", "/")); |
| 477 |
elm2.AppendChild(elm3); |
| 478 |
|
| 479 |
elm3 = doc.CreateElement("Image"); |
| 480 |
elm3.SetAttribute("trigger", "ń"); |
| 481 |
elm3.SetAttribute("name", "mouth_n"); |
| 482 |
elm3.SetAttribute("size", strSize); |
| 483 |
elm3.SetAttribute("path", MouthN.Replace("\\", "/")); |
| 484 |
elm2.AppendChild(elm3); |
| 485 |
|
| 486 |
elm3 = doc.CreateElement("Image"); |
| 487 |
elm3.SetAttribute("trigger", "¨"); |
| 488 |
elm3.SetAttribute("name", "mouth_o"); |
| 489 |
elm3.SetAttribute("size", strSize); |
| 490 |
elm3.SetAttribute("path", MouthO.Replace("\\", "/")); |
| 491 |
elm2.AppendChild(elm3); |
| 492 |
|
| 493 |
elm3 = doc.CreateElement("Image"); |
| 494 |
elm3.SetAttribute("trigger", "¤"); |
| 495 |
elm3.SetAttribute("name", "mouth_u"); |
| 496 |
elm3.SetAttribute("size", strSize); |
| 497 |
elm3.SetAttribute("path", MouthU.Replace("\\", "/")); |
| 498 |
elm2.AppendChild(elm3); |
| 499 |
|
| 500 |
elm3 = doc.CreateElement("Image"); |
| 501 |
elm3.SetAttribute("trigger", "§"); |
| 502 |
elm3.SetAttribute("name", "mouth_xo"); |
| 503 |
elm3.SetAttribute("size", strSize); |
| 504 |
elm3.SetAttribute("path", MouthXo.Replace("\\", "/")); |
| 505 |
elm2.AppendChild(elm3); |
| 506 |
|
| 507 |
//ű@ÇÁŞ |
| 508 |
for ( i = 0; i < mouthcnt; i++) |
| 509 |
{ |
| 510 |
elm3 = doc.CreateElement("Image"); |
| 511 |
elm3.SetAttribute("trigger", MouthAddName[i]); |
| 512 |
elm3.SetAttribute("name", String.Concat("mouth_", MouthAddName[i])); |
| 513 |
elm3.SetAttribute("size", strSize); |
| 514 |
elm3.SetAttribute("path", MouthAdd[i].Replace("\\", "/")); |
| 515 |
elm2.AppendChild(elm3); |
| 516 |
} |
| 517 |
|
| 518 |
//ťĚź |
| 519 |
elm2.AppendChild(doc.CreateComment("ťĚź")); |
| 520 |
//ÚŠŽAj[V |
| 521 |
elm3 = doc.CreateElement("Animation"); |
| 522 |
elm3.SetAttribute("name", "eye_auto_set"); |
| 523 |
elm3.SetAttribute("trigger", "ÚŠŽ"); |
| 524 |
elm3.SetAttribute("size", strSize); |
| 525 |
elm3.SetAttribute("count", "33"); |
| 526 |
elm3.SetAttribute("interval", "0.15"); |
| 527 |
|
| 528 |
elm4 = doc.CreateElement("Image"); |
| 529 |
elm4.SetAttribute("index", "0"); |
| 530 |
elm4.SetAttribute("imageName", "auto_eye_normal"); |
| 531 |
elm3.AppendChild(elm4); |
| 532 |
|
| 533 |
elm4 = doc.CreateElement("Image"); |
| 534 |
elm4.SetAttribute("index", "1"); |
| 535 |
elm4.SetAttribute("imageName", "auto_eye_thin"); |
| 536 |
elm3.AppendChild(elm4); |
| 537 |
|
| 538 |
elm4 = doc.CreateElement("Image"); |
| 539 |
elm4.SetAttribute("index", "2"); |
| 540 |
elm4.SetAttribute("imageName", "auto_eye_close"); |
| 541 |
elm3.AppendChild(elm4); |
| 542 |
|
| 543 |
elm4 = doc.CreateElement("Image"); |
| 544 |
elm4.SetAttribute("index", "3"); |
| 545 |
elm4.SetAttribute("imageName", "auto_eye_thin"); |
| 546 |
elm3.AppendChild(elm4); |
| 547 |
|
| 548 |
elm4 = doc.CreateElement("Image"); |
| 549 |
elm4.SetAttribute("index", "4"); |
| 550 |
elm4.SetAttribute("imageName", "auto_eye_normal"); |
| 551 |
elm3.AppendChild(elm4); |
| 552 |
|
| 553 |
elm2.AppendChild(elm3); |
| 554 |
|
| 555 |
//ÚčŽZbg |
| 556 |
elm3 = doc.CreateElement("Set"); |
| 557 |
elm3.SetAttribute("name", "eye_manual_set"); |
| 558 |
elm3.SetAttribute("trigger", "ÚčŽ"); |
| 559 |
elm3.SetAttribute("size", strSize); |
| 560 |
elm3.SetAttribute("count", String.Format("{0}",eyecnt + 3)); |
| 561 |
|
| 562 |
elm4 = doc.CreateElement("Image"); |
| 563 |
elm4.SetAttribute("index", "0"); |
| 564 |
elm4.SetAttribute("imageName", "eye_close"); |
| 565 |
elm4.SetAttribute("offset", "0,0"); |
| 566 |
elm3.AppendChild(elm4); |
| 567 |
|
| 568 |
elm4 = doc.CreateElement("Image"); |
| 569 |
elm4.SetAttribute("index", "1"); |
| 570 |
elm4.SetAttribute("imageName", "eye_normal"); |
| 571 |
elm4.SetAttribute("offset", "0,0"); |
| 572 |
elm3.AppendChild(elm4); |
| 573 |
|
| 574 |
elm4 = doc.CreateElement("Image"); |
| 575 |
elm4.SetAttribute("index", "2"); |
| 576 |
elm4.SetAttribute("imageName", "eye_thin"); |
| 577 |
elm4.SetAttribute("offset", "0,0"); |
| 578 |
elm3.AppendChild(elm4); |
| 579 |
|
| 580 |
for ( i = 0; i < eyecnt; i++) |
| 581 |
{ |
| 582 |
elm4 = doc.CreateElement("Image"); |
| 583 |
elm4.SetAttribute("index", String.Format("{0}", 3 + i)); |
| 584 |
elm4.SetAttribute("imageName", String.Concat("eye_", EyeAddName[i])); |
| 585 |
elm4.SetAttribute("offset", "0,0"); |
| 586 |
elm3.AppendChild(elm4); |
| 587 |
} |
| 588 |
elm2.AppendChild(elm3); |
| 589 |
|
| 590 |
//űŠŽAj[V |
| 591 |
elm3 = doc.CreateElement("Set"); |
| 592 |
elm3.SetAttribute("name", "mouth_auto_set"); |
| 593 |
elm3.SetAttribute("trigger", "űŠŽ"); |
| 594 |
elm3.SetAttribute("size", strSize); |
| 595 |
elm3.SetAttribute("count", "1"); |
| 596 |
|
| 597 |
elm4 = doc.CreateElement("Image"); |
| 598 |
elm4.SetAttribute("index", "0"); |
| 599 |
elm4.SetAttribute("imageName", "mouth"); |
| 600 |
elm4.SetAttribute("offset", "0,0"); |
| 601 |
elm3.AppendChild(elm4); |
| 602 |
elm2.AppendChild(elm3); |
| 603 |
|
| 604 |
|
| 605 |
//űčŽZbg |
| 606 |
elm3 = doc.CreateElement("Set"); |
| 607 |
elm3.SetAttribute("name", "mouth_manual_set"); |
| 608 |
elm3.SetAttribute("trigger", "űčŽ"); |
| 609 |
elm3.SetAttribute("size", strSize); |
| 610 |
elm3.SetAttribute("count", String.Format("{0}", mouthcnt + 7)); |
| 611 |
|
| 612 |
elm4 = doc.CreateElement("Image"); |
| 613 |
elm4.SetAttribute("index", "0"); |
| 614 |
elm4.SetAttribute("imageName", "mouth_a"); |
| 615 |
elm4.SetAttribute("offset", "0,0"); |
| 616 |
elm3.AppendChild(elm4); |
| 617 |
|
| 618 |
elm4 = doc.CreateElement("Image"); |
| 619 |
elm4.SetAttribute("index", "1"); |
| 620 |
elm4.SetAttribute("imageName", "mouth_n"); |
| 621 |
elm4.SetAttribute("offset", "0,0"); |
| 622 |
elm3.AppendChild(elm4); |
| 623 |
|
| 624 |
elm4 = doc.CreateElement("Image"); |
| 625 |
elm4.SetAttribute("index", "2"); |
| 626 |
elm4.SetAttribute("imageName", "mouth_e"); |
| 627 |
elm4.SetAttribute("offset", "0,0"); |
| 628 |
elm3.AppendChild(elm4); |
| 629 |
|
| 630 |
elm4 = doc.CreateElement("Image"); |
| 631 |
elm4.SetAttribute("index", "3"); |
| 632 |
elm4.SetAttribute("imageName", "mouth_i"); |
| 633 |
elm4.SetAttribute("offset", "0,0"); |
| 634 |
elm3.AppendChild(elm4); |
| 635 |
|
| 636 |
elm4 = doc.CreateElement("Image"); |
| 637 |
elm4.SetAttribute("index", "4"); |
| 638 |
elm4.SetAttribute("imageName", "mouth_o"); |
| 639 |
elm4.SetAttribute("offset", "0,0"); |
| 640 |
elm3.AppendChild(elm4); |
| 641 |
|
| 642 |
elm4 = doc.CreateElement("Image"); |
| 643 |
elm4.SetAttribute("index", "5"); |
| 644 |
elm4.SetAttribute("imageName", "mouth_u"); |
| 645 |
elm4.SetAttribute("offset", "0,0"); |
| 646 |
elm3.AppendChild(elm4); |
| 647 |
|
| 648 |
elm4 = doc.CreateElement("Image"); |
| 649 |
elm4.SetAttribute("index", "6"); |
| 650 |
elm4.SetAttribute("imageName", "mouth_xo"); |
| 651 |
elm4.SetAttribute("offset", "0,0"); |
| 652 |
elm3.AppendChild(elm4); |
| 653 |
|
| 654 |
for (i = 0; i < mouthcnt; i++) |
| 655 |
{ |
| 656 |
elm4 = doc.CreateElement("Image"); |
| 657 |
elm4.SetAttribute("index", String.Format("{0}", 7 + i)); |
| 658 |
elm4.SetAttribute("imageName", String.Concat("mouth_", MouthAddName[i])); |
| 659 |
elm4.SetAttribute("offset", "0,0"); |
| 660 |
elm3.AppendChild(elm4); |
| 661 |
} |
| 662 |
elm2.AppendChild(elm3); |
| 663 |
|
| 664 |
|
| 665 |
//[g |
| 666 |
elm2.AppendChild(doc.CreateComment("[g")); |
| 667 |
|
| 668 |
elm3 = doc.CreateElement("Set"); |
| 669 |
elm3.SetAttribute("name", "root"); |
| 670 |
elm3.SetAttribute("size", strSize); |
| 671 |
elm3.SetAttribute("count", "5"); |
| 672 |
|
| 673 |
elm4 = doc.CreateElement("Image"); |
| 674 |
elm4.SetAttribute("index", "0"); |
| 675 |
elm4.SetAttribute("imageName", "base"); |
| 676 |
elm4.SetAttribute("offset", "0,0"); |
| 677 |
elm3.AppendChild(elm4); |
| 678 |
|
| 679 |
elm4 = doc.CreateElement("Image"); |
| 680 |
elm4.SetAttribute("index", "1"); |
| 681 |
elm4.SetAttribute("imageName", "eye_auto_set"); |
| 682 |
elm4.SetAttribute("offset", "0,0"); |
| 683 |
elm3.AppendChild(elm4); |
| 684 |
|
| 685 |
elm4 = doc.CreateElement("Image"); |
| 686 |
elm4.SetAttribute("index", "2"); |
| 687 |
elm4.SetAttribute("imageName", "eye_manual_set"); |
| 688 |
elm4.SetAttribute("offset", "0,0"); |
| 689 |
elm3.AppendChild(elm4); |
| 690 |
|
| 691 |
elm4 = doc.CreateElement("Image"); |
| 692 |
elm4.SetAttribute("index", "3"); |
| 693 |
elm4.SetAttribute("imageName", "mouth_auto_set"); |
| 694 |
elm4.SetAttribute("offset", "0,0"); |
| 695 |
elm3.AppendChild(elm4); |
| 696 |
|
| 697 |
elm4 = doc.CreateElement("Image"); |
| 698 |
elm4.SetAttribute("index", "4"); |
| 699 |
elm4.SetAttribute("imageName", "mouth_manual_set"); |
| 700 |
elm4.SetAttribute("offset", "0,0"); |
| 701 |
elm3.AppendChild(elm4); |
| 702 |
|
| 703 |
elm2.AppendChild(elm3); |
| 704 |
|
| 705 |
//yC[WzO[vo^ |
| 706 |
elm.AppendChild(elm2); |
| 707 |
|
| 708 |
//ygK[zO[v |
| 709 |
elm2 = doc.CreateElement("Triggers"); |
| 710 |
//Ú |
| 711 |
elm3 = doc.CreateElement("Trigger"); |
| 712 |
elm3.SetAttribute("default", "on"); |
| 713 |
elm3.SetAttribute("name", "ÚŠŽ"); |
| 714 |
elm3.SetAttribute("group", "Ú§ä"); |
| 715 |
elm3.SetAttribute("preview", EyeNormal.Replace("\\", "/")); |
| 716 |
elm2.AppendChild(elm3); |
| 717 |
|
| 718 |
elm3 = doc.CreateElement("Trigger"); |
| 719 |
elm3.SetAttribute("name", "ÚčŽ"); |
| 720 |
elm3.SetAttribute("group", "Ú§ä"); |
| 721 |
elm3.SetAttribute("preview", EyeNormal.Replace("\\", "/")); |
| 722 |
elm2.AppendChild(elm3); |
| 723 |
|
| 724 |
elm3 = doc.CreateElement("Trigger"); |
| 725 |
elm3.SetAttribute("default", "on"); |
| 726 |
elm3.SetAttribute("name", "űŠŽ"); |
| 727 |
elm3.SetAttribute("group", "ű§ä"); |
| 728 |
elm3.SetAttribute("preview", MouthA.Replace("\\", "/")); |
| 729 |
elm2.AppendChild(elm3); |
| 730 |
|
| 731 |
elm3 = doc.CreateElement("Trigger"); |
| 732 |
elm3.SetAttribute("name", "űčŽ"); |
| 733 |
elm3.SetAttribute("group", "ű§ä"); |
| 734 |
elm3.SetAttribute("preview", MouthA.Replace("\\", "/")); |
| 735 |
elm2.AppendChild(elm3); |
| 736 |
|
| 737 |
elm3 = doc.CreateElement("Trigger"); |
| 738 |
elm3.SetAttribute("name", "Ęí"); |
| 739 |
elm3.SetAttribute("group", "Ú"); |
| 740 |
elm3.SetAttribute("preview", EyeNormal.Replace("\\", "/")); |
| 741 |
elm2.AppendChild(elm3); |
| 742 |
|
| 743 |
elm3 = doc.CreateElement("Trigger"); |
| 744 |
elm3.SetAttribute("name", "ÂÚ"); |
| 745 |
elm3.SetAttribute("group", "Ú"); |
| 746 |
elm3.SetAttribute("preview", EyeClose.Replace("\\", "/")); |
| 747 |
elm2.AppendChild(elm3); |
| 748 |
|
| 749 |
elm3 = doc.CreateElement("Trigger"); |
| 750 |
elm3.SetAttribute("name", "Ú"); |
| 751 |
elm3.SetAttribute("group", "Ú"); |
| 752 |
elm3.SetAttribute("preview", EyeThin.Replace("\\", "/")); |
| 753 |
elm2.AppendChild(elm3); |
| 754 |
|
| 755 |
for (i = 0; i < eyecnt; i++) |
| 756 |
{ |
| 757 |
elm3 = doc.CreateElement("Trigger"); |
| 758 |
//elm3.SetAttribute("name", String.Concat("Ú", EyeAddName[i])); |
| 759 |
elm3.SetAttribute("name", EyeAddName[i]); |
| 760 |
elm3.SetAttribute("group", "Ú"); |
| 761 |
elm3.SetAttribute("preview", EyeAdd[i].Replace("\\", "/")); |
| 762 |
elm2.AppendChild(elm3); |
| 763 |
} |
| 764 |
|
| 765 |
elm3 = doc.CreateElement("Trigger"); |
| 766 |
elm3.SetAttribute("name", " "); |
| 767 |
elm3.SetAttribute("group", "ű"); |
| 768 |
elm3.SetAttribute("preview", MouthA.Replace("\\", "/")); |
| 769 |
elm2.AppendChild(elm3); |
| 770 |
|
| 771 |
elm3 = doc.CreateElement("Trigger"); |
| 772 |
elm3.SetAttribute("name", " "); |
| 773 |
elm3.SetAttribute("group", "ű"); |
| 774 |
elm3.SetAttribute("preview", MouthAa.Replace("\\", "/")); |
| 775 |
elm2.AppendChild(elm3); |
| 776 |
|
| 777 |
elm3 = doc.CreateElement("Trigger"); |
| 778 |
elm3.SetAttribute("name", "ń"); |
| 779 |
elm3.SetAttribute("group", "ű"); |
| 780 |
elm3.SetAttribute("preview", MouthN.Replace("\\", "/")); |
| 781 |
elm2.AppendChild(elm3); |
| 782 |
|
| 783 |
elm3 = doc.CreateElement("Trigger"); |
| 784 |
elm3.SetAttribute("name", "Ś"); |
| 785 |
elm3.SetAttribute("group", "ű"); |
| 786 |
elm3.SetAttribute("preview", MouthE.Replace("\\", "/")); |
| 787 |
elm2.AppendChild(elm3); |
| 788 |
|
| 789 |
elm3 = doc.CreateElement("Trigger"); |
| 790 |
elm3.SetAttribute("name", "˘"); |
| 791 |
elm3.SetAttribute("group", "ű"); |
| 792 |
elm3.SetAttribute("preview", MouthI.Replace("\\", "/")); |
| 793 |
elm2.AppendChild(elm3); |
| 794 |
|
| 795 |
elm3 = doc.CreateElement("Trigger"); |
| 796 |
elm3.SetAttribute("name", "¨"); |
| 797 |
elm3.SetAttribute("group", "ű"); |
| 798 |
elm3.SetAttribute("preview", MouthO.Replace("\\", "/")); |
| 799 |
elm2.AppendChild(elm3); |
| 800 |
|
| 801 |
elm3 = doc.CreateElement("Trigger"); |
| 802 |
elm3.SetAttribute("name", "¤"); |
| 803 |
elm3.SetAttribute("group", "ű"); |
| 804 |
elm3.SetAttribute("preview", MouthU.Replace("\\", "/")); |
| 805 |
elm2.AppendChild(elm3); |
| 806 |
|
| 807 |
elm3 = doc.CreateElement("Trigger"); |
| 808 |
elm3.SetAttribute("name", "§"); |
| 809 |
elm3.SetAttribute("group", "ű"); |
| 810 |
elm3.SetAttribute("preview", MouthXo.Replace("\\", "/")); |
| 811 |
elm2.AppendChild(elm3); |
| 812 |
|
| 813 |
for (i = 0; i < mouthcnt; i++) |
| 814 |
{ |
| 815 |
elm3 = doc.CreateElement("Trigger"); |
| 816 |
//elm3.SetAttribute("name", String.Concat("ű", MouthAddName[i])); |
| 817 |
elm3.SetAttribute("name", MouthAddName[i]); |
| 818 |
elm3.SetAttribute("group", "ű"); |
| 819 |
elm3.SetAttribute("preview", MouthAdd[i].Replace("\\", "/")); |
| 820 |
elm2.AppendChild(elm3); |
| 821 |
} |
| 822 |
|
| 823 |
//ygK[zO[vo^ |
| 824 |
elm.AppendChild(elm2); |
| 825 |
|
| 826 |
//gK[ĚrźÝč |
| 827 |
elm2.AppendChild(doc.CreateComment("gK[ĚrźÝč")); |
| 828 |
|
| 829 |
elm3 = doc.CreateElement("Selection"); |
| 830 |
elm4 = doc.CreateElement("Item"); |
| 831 |
elm4.SetAttribute("Trigger", "ÚŠŽ"); |
| 832 |
elm3.AppendChild(elm4); |
| 833 |
elm4 = doc.CreateElement("Item"); |
| 834 |
elm4.SetAttribute("Trigger", "ÚčŽ"); |
| 835 |
elm3.AppendChild(elm4); |
| 836 |
elm2.AppendChild(elm3); |
| 837 |
|
| 838 |
elm3 = doc.CreateElement("Selection"); |
| 839 |
elm4 = doc.CreateElement("Item"); |
| 840 |
elm4.SetAttribute("Trigger", "űŠŽ"); |
| 841 |
elm3.AppendChild(elm4); |
| 842 |
elm4 = doc.CreateElement("Item"); |
| 843 |
elm4.SetAttribute("Trigger", "űčŽ"); |
| 844 |
elm3.AppendChild(elm4); |
| 845 |
elm2.AppendChild(elm3); |
| 846 |
|
| 847 |
elm3 = doc.CreateElement("Selection"); |
| 848 |
elm4 = doc.CreateElement("Item"); |
| 849 |
elm4.SetAttribute("Trigger", "Ęí"); |
| 850 |
elm3.AppendChild(elm4); |
| 851 |
elm4 = doc.CreateElement("Item"); |
| 852 |
elm4.SetAttribute("Trigger", "ÂÚ"); |
| 853 |
elm3.AppendChild(elm4); |
| 854 |
elm4 = doc.CreateElement("Item"); |
| 855 |
elm4.SetAttribute("Trigger", "Ú"); |
| 856 |
elm3.AppendChild(elm4); |
| 857 |
for (i = 0; i < eyecnt; i++) |
| 858 |
{ |
| 859 |
elm4 = doc.CreateElement("Item"); |
| 860 |
//elm4.SetAttribute("Trigger", String.Concat("Ú", EyeAddName[i])); |
| 861 |
elm4.SetAttribute("Trigger", EyeAddName[i]); |
| 862 |
elm3.AppendChild(elm4); |
| 863 |
} |
| 864 |
elm2.AppendChild(elm3); |
| 865 |
|
| 866 |
elm3 = doc.CreateElement("Selection"); |
| 867 |
elm4 = doc.CreateElement("Item"); |
| 868 |
elm4.SetAttribute("Trigger", " "); |
| 869 |
elm3.AppendChild(elm4); |
| 870 |
elm4 = doc.CreateElement("Item"); |
| 871 |
elm4.SetAttribute("Trigger", " "); |
| 872 |
elm3.AppendChild(elm4); |
| 873 |
elm4 = doc.CreateElement("Item"); |
| 874 |
elm4.SetAttribute("Trigger", "ń"); |
| 875 |
elm3.AppendChild(elm4); |
| 876 |
elm4 = doc.CreateElement("Item"); |
| 877 |
elm4.SetAttribute("Trigger", "Ś"); |
| 878 |
elm3.AppendChild(elm4); |
| 879 |
elm4 = doc.CreateElement("Item"); |
| 880 |
elm4.SetAttribute("Trigger", "˘"); |
| 881 |
elm3.AppendChild(elm4); |
| 882 |
elm4 = doc.CreateElement("Item"); |
| 883 |
elm4.SetAttribute("Trigger", "¨"); |
| 884 |
elm3.AppendChild(elm4); |
| 885 |
elm4 = doc.CreateElement("Item"); |
| 886 |
elm4.SetAttribute("Trigger", "¤"); |
| 887 |
elm3.AppendChild(elm4); |
| 888 |
elm4 = doc.CreateElement("Item"); |
| 889 |
elm4.SetAttribute("Trigger", "§"); |
| 890 |
elm3.AppendChild(elm4); |
| 891 |
for (i = 0; i < mouthcnt; i++) |
| 892 |
{ |
| 893 |
elm4 = doc.CreateElement("Item"); |
| 894 |
//elm4.SetAttribute("Trigger", String.Concat("ű", MouthAddName[i])); |
| 895 |
elm4.SetAttribute("Trigger", MouthAddName[i]); |
| 896 |
elm3.AppendChild(elm4); |
| 897 |
} |
| 898 |
elm2.AppendChild(elm3); |
| 899 |
|
| 900 |
|
| 901 |
//////űpNîń |
| 902 |
|
| 903 |
elm2 = doc.CreateElement("Mouths"); |
| 904 |
|
| 905 |
elm3 = doc.CreateElement("Default"); |
| 906 |
elm3.SetAttribute("imageName", "nn"); |
| 907 |
elm2.AppendChild(elm3); |
| 908 |
|
| 909 |
SetElement_Mouth(doc, elm2, "a", "aa"); |
| 910 |
SetElement_Mouth(doc, elm2,"i", "i"); |
| 911 |
SetElement_Mouth(doc, elm2,"M", "u"); |
| 912 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"e\" imageName=\"e\" ")); |
| 913 |
SetElement_Mouth(doc, elm2,"o", "o"); |
| 914 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"k\" imageName=\"xo\" ")); |
| 915 |
SetElement_Mouth(doc, elm2,"k'", "i"); |
| 916 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"g\" imageName=\"xo\" ")); |
| 917 |
SetElement_Mouth(doc, elm2,"g'", "i"); |
| 918 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"N\" imageName=\"nn\" ")); |
| 919 |
SetElement_Mouth(doc, elm2,"N'", "nn"); |
| 920 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"s\" imageName=\"xo\" ")); |
| 921 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"S\" imageName=\"i\" ")); |
| 922 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"z\" imageName=\"i\" ")); |
| 923 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"Z\" imageName=\"i\" ")); |
| 924 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"t\" imageName=\"xo\" ")); |
| 925 |
SetElement_Mouth(doc, elm2,"t'", "xo"); |
| 926 |
SetElement_Mouth(doc, elm2,"ts", "xo"); |
| 927 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"tS\" imageName=\"i\" ")); |
| 928 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"d\" imageName=\"xo\" ")); |
| 929 |
SetElement_Mouth(doc, elm2,"d'", "xo"); |
| 930 |
SetElement_Mouth(doc, elm2,"dz", "xo"); |
| 931 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"dZ\" imageName=\"i\" ")); |
| 932 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"n\" imageName=\"nn\" ")); |
| 933 |
SetElement_Mouth(doc, elm2,"J", "nn"); |
| 934 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"h\" imageName=\"xo\" ")); |
| 935 |
SetElement_Mouth(doc, elm2,"h\\", "xo"); |
| 936 |
SetElement_Mouth(doc, elm2,"C", "xo"); |
| 937 |
SetElement_Mouth(doc, elm2,"p\\", "xo"); |
| 938 |
SetElement_Mouth(doc, elm2,"p\\'", "xo"); |
| 939 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"b\" imageName=\"nn\" ")); |
| 940 |
SetElement_Mouth(doc, elm2,"b'", "nn"); |
| 941 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"p\" imageName=\"nn\" ")); |
| 942 |
SetElement_Mouth(doc, elm2,"p'", "nn"); |
| 943 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"m\" imageName=\"nn\" ")); |
| 944 |
SetElement_Mouth(doc, elm2,"m'", "nn"); |
| 945 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"j\" imageName=\"xo\" ")); |
| 946 |
SetElement_Mouth(doc, elm2,"4", "u"); |
| 947 |
SetElement_Mouth(doc, elm2,"4'", "i"); |
| 948 |
//elm2.AppendChild(doc.CreateComment("Attach symbol=\"w\" imageName=\"xo\" ")); |
| 949 |
SetElement_Mouth(doc, elm2,"N\\", "nn"); |
| 950 |
SetElement_Mouth(doc, elm2,"@", "aa"); |
| 951 |
SetElement_Mouth(doc, elm2,"V", "aa"); |
| 952 |
SetElement_Mouth(doc, elm2,"e", "e"); |
| 953 |
SetElement_Mouth(doc, elm2,"I", "i"); |
| 954 |
SetElement_Mouth(doc, elm2,"i:", "i"); |
| 955 |
SetElement_Mouth(doc, elm2,"{", "a"); |
| 956 |
SetElement_Mouth(doc, elm2,"O:", "o"); |
| 957 |
SetElement_Mouth(doc, elm2,"Q", "o"); |
| 958 |
SetElement_Mouth(doc, elm2,"U", "u"); |
| 959 |
SetElement_Mouth(doc, elm2,"u:", "u"); |
| 960 |
SetElement_Mouth(doc, elm2,"@r", "a"); |
| 961 |
SetElement_Mouth(doc, elm2,"eI", "e"); |
| 962 |
SetElement_Mouth(doc, elm2,"aI", "aa"); |
| 963 |
SetElement_Mouth(doc, elm2,"OI", "o"); |
| 964 |
SetElement_Mouth(doc, elm2,"@U", "o"); |
| 965 |
SetElement_Mouth(doc, elm2,"aU", "aa"); |
| 966 |
SetElement_Mouth(doc, elm2,"I@", "i"); |
| 967 |
SetElement_Mouth(doc, elm2,"e@", "e"); |
| 968 |
SetElement_Mouth(doc, elm2,"U@", "u"); |
| 969 |
SetElement_Mouth(doc, elm2,"O@", "o"); |
| 970 |
SetElement_Mouth(doc, elm2,"Q@", "a"); |
| 971 |
SetElement_Mouth(doc, elm2,"w", "xo"); |
| 972 |
SetElement_Mouth(doc, elm2,"j", "xo"); |
| 973 |
SetElement_Mouth(doc, elm2,"b", "nn"); |
| 974 |
SetElement_Mouth(doc, elm2,"d", "xo"); |
| 975 |
SetElement_Mouth(doc, elm2,"g", "xo"); |
| 976 |
SetElement_Mouth(doc, elm2,"bh", "nn"); |
| 977 |
SetElement_Mouth(doc, elm2,"dh", "o"); |
| 978 |
SetElement_Mouth(doc, elm2,"gh", "u"); |
| 979 |
SetElement_Mouth(doc, elm2,"dZ", "i"); |
| 980 |
SetElement_Mouth(doc, elm2,"v", "u"); |
| 981 |
SetElement_Mouth(doc, elm2,"D", "e"); |
| 982 |
SetElement_Mouth(doc, elm2,"z", "u"); |
| 983 |
SetElement_Mouth(doc, elm2,"Z", "i"); |
| 984 |
SetElement_Mouth(doc, elm2,"m", "nn"); |
| 985 |
SetElement_Mouth(doc, elm2,"n", "nn"); |
| 986 |
SetElement_Mouth(doc, elm2,"N", "nn"); |
| 987 |
SetElement_Mouth(doc, elm2,"r", "xo"); |
| 988 |
SetElement_Mouth(doc, elm2,"l", "u"); |
| 989 |
SetElement_Mouth(doc, elm2,"lO", "u"); |
| 990 |
SetElement_Mouth(doc, elm2,"p", "nn"); |
| 991 |
SetElement_Mouth(doc, elm2,"t", "u"); |
| 992 |
SetElement_Mouth(doc, elm2,"k", "xo"); |
| 993 |
SetElement_Mouth(doc, elm2,"ph", "nn"); |
| 994 |
SetElement_Mouth(doc, elm2,"th", "u"); |
| 995 |
SetElement_Mouth(doc, elm2,"kh", "u"); |
| 996 |
SetElement_Mouth(doc, elm2,"tS", "i"); |
| 997 |
SetElement_Mouth(doc, elm2,"f", "u"); |
| 998 |
SetElement_Mouth(doc, elm2,"T", "u"); |
| 999 |
SetElement_Mouth(doc, elm2,"s", "u"); |
| 1000 |
SetElement_Mouth(doc, elm2,"S", "u"); |
| 1001 |
SetElement_Mouth(doc, elm2,"h", "xo"); |
| 1002 |
|
| 1003 |
|
| 1004 |
elm.AppendChild(elm2); |
| 1005 |
|
| 1006 |
//Űś |
| 1007 |
doc.Save(_filename); |
| 1008 |
|
| 1009 |
Logger.GetInstance().Write(LogLevel.Info, "RsiManager", "ŰśIšB"); |
| 1010 |
//MessageBox.Show("ŰśľÜľ˝B", "mF", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| 1011 |
return true; |
| 1012 |
} |
| 1013 |
catch (Exception e) |
| 1014 |
{ |
| 1015 |
Logger.GetInstance().ErrorWrite("AppManager", e); |
| 1016 |
//MessageBox.Show("ۜɸsľÜľ˝B", "G[", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| 1017 |
return false; |
| 1018 |
} |
| 1019 |
} |
| 1020 |
private void SetElement_Mouth(XmlDocument _doc, XmlElement _elm, String _symbolname, string _imagename) |
| 1021 |
{ |
| 1022 |
XmlElement elm = _doc.CreateElement("Attach"); |
| 1023 |
elm.SetAttribute("symbol", _symbolname); |
| 1024 |
elm.SetAttribute("imageName", _imagename); |
| 1025 |
_elm.AppendChild(elm); |
| 1026 |
} |
| 1027 |
|
| 1028 |
#region IDisposable o |
| 1029 |
|
| 1030 |
public void Dispose() |
| 1031 |
{ |
| 1032 |
//foreach (SingerImageBase img in images.Values) |
| 1033 |
//{ |
| 1034 |
// img.Dispose(); |
| 1035 |
//} |
| 1036 |
} |
| 1037 |
|
| 1038 |
#endregion |
| 1039 |
} |
| 1040 |
} |