Commit MetaInfo
Log Message
AppManager.SaveData.m_pluginをAppManager.pluginsに移動/bocoree, Boare.Lib.*を最新版に差し替え
Change Summary
Diff
| | @@ -32,6 +32,8 @@ | | 32 | 32 | /// </summary>
| | 33 | 33 | public static int MaxTelopLanes = 0;
| | 34 | 34 | private static bool m_edited;
| | 35 | + //[NonSerialized]
| | 36 | + public static PluginInfo[] plugins;
| | 35 | 37 |
| | 36 | 38 | /// <summary>
| | 37 | 39 | /// Editedプロパティが変更された時発生します
|
| | @@ -33,12 +33,12 @@ | | 33 | 33 | m_config = (EnvSettings)config.Clone();
| | 34 | 34 | int selected = -1;
| | 35 | 35 |
| | 36 | | - string[] t_list = Messaging.GetRegisteredLanguage();
| | 36 | + string[] t_list = Messaging.getRegisteredLanguage();
| | 37 | 37 | comboLanguage.Items.Clear();
| | 38 | 38 | comboLanguage.Items.Add( _DEFAULT_LANGUAGE_STRING );
| | 39 | 39 | foreach ( string lang in t_list ) {
| | 40 | 40 | comboLanguage.Items.Add( lang );
| | 41 | | - if ( lang == Messaging.Language ) {
| | 41 | + if ( lang == Messaging.getLanguage() ) {
| | 42 | 42 | selected = comboLanguage.Items.Count - 1;
| | 43 | 43 | }
| | 44 | 44 | }
|
| | @@ -93,7 +93,7 @@ | | 93 | 93 | public void ApplyFont( Font font ) {
| | 94 | 94 | this.Font = font;
| | 95 | 95 | foreach ( Control c in this.Controls ) {
| | 96 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 96 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 97 | 97 | }
| | 98 | 98 | }
| | 99 | 99 |
|
| | @@ -141,7 +141,7 @@ | | 141 | 141 | }
| | 142 | 142 |
| | 143 | 143 | public static string _( string s ) {
| | 144 | | - return Messaging.GetMessage( s );
| | 144 | + return Messaging.getMessage( s );
| | 145 | 145 | }
| | 146 | 146 |
| | 147 | 147 | private Font ScreenFont {
|
| | @@ -346,10 +346,10 @@ | | 346 | 346 | }
| | 347 | 347 |
| | 348 | 348 | private void btnReloadLanguageConfig_Click( object sender, EventArgs e ) {
| | 349 | | - Messaging.LoadMessages();
| | 349 | + Messaging.loadMessages();
| | 350 | 350 | string current_lang = m_config.Language;
| | 351 | 351 | comboLanguage.Items.Clear();
| | 352 | | - List<string> list = new List<string>( Messaging.GetRegisteredLanguage() );
| | 352 | + List<string> list = new List<string>( Messaging.getRegisteredLanguage() );
| | 353 | 353 | if ( !list.Contains( current_lang ) ) {
| | 354 | 354 | current_lang = _DEFAULT_LANGUAGE_STRING;
| | 355 | 355 | }
|
| | @@ -75,7 +75,7 @@ | | 75 | 75 | private static string sound_file;
| | 76 | 76 |
| | 77 | 77 | public static string gettext( string s ) {
| | 78 | | - return Messaging.GetMessage( s );
| | 78 | + return Messaging.getMessage( s );
| | 79 | 79 | }
| | 80 | 80 |
| | 81 | 81 |
|
| | @@ -158,7 +158,7 @@ | | 158 | 158 | #endregion
| | 159 | 159 |
| | 160 | 160 | public static string _( string s ) {
| | 161 | | - return Messaging.GetMessage( s );
| | 161 | + return Messaging.getMessage( s );
| | 162 | 162 | }
| | 163 | 163 |
| | 164 | 164 | /// <summary>
|
| | @@ -55,7 +55,7 @@ | | 55 | 55 | public void ApplyFont( Font font ) {
| | 56 | 56 | this.Font = font;
| | 57 | 57 | foreach ( Control c in this.Controls ) {
| | 58 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 58 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 59 | 59 | }
| | 60 | 60 | }
| | 61 | 61 |
|
| | @@ -77,7 +77,7 @@ | | 77 | 77 | }
| | 78 | 78 |
| | 79 | 79 | private static string _( string id ) {
| | 80 | | - return Messaging.GetMessage( id );
| | 80 | + return Messaging.getMessage( id );
| | 81 | 81 | }
| | 82 | 82 |
| | 83 | 83 | private void SettingsEx_CommandExecuted( TimeTableType command_target, CommandType command_type ) {
|
| | @@ -38,7 +38,7 @@ | | 38 | 38 | public void ApplyFont( Font font ) {
| | 39 | 39 | this.Font = font;
| | 40 | 40 | foreach ( Control c in this.Controls ) {
| | 41 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 41 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 42 | 42 | }
| | 43 | 43 | }
| | 44 | 44 |
|
| | @@ -50,7 +50,7 @@ | | 50 | 50 | }
| | 51 | 51 |
| | 52 | 52 | public string _( string s ) {
| | 53 | | - return Messaging.GetMessage( s );
| | 53 | + return Messaging.getMessage( s );
| | 54 | 54 | }
| | 55 | 55 |
| | 56 | 56 | public bool ImportTempoAndTimesig {
|
| | @@ -29,7 +29,7 @@ | | 29 | 29 | public void ApplyFont( Font font ) {
| | 30 | 30 | this.Font = font;
| | 31 | 31 | foreach ( Control c in this.Controls ) {
| | 32 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 32 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 33 | 33 | }
| | 34 | 34 | }
| | 35 | 35 |
|
| | @@ -34,7 +34,7 @@ | | 34 | 34 | public void ApplyFont( Font font ) {
| | 35 | 35 | this.Font = font;
| | 36 | 36 | foreach ( Control c in this.Controls ) {
| | 37 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 37 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 38 | 38 | }
| | 39 | 39 | }
| | 40 | 40 |
|
| | @@ -48,7 +48,7 @@ | | 48 | 48 | }
| | 49 | 49 |
| | 50 | 50 | public static string _( string s ) {
| | 51 | | - return Messaging.GetMessage( s );
| | 51 | + return Messaging.getMessage( s );
| | 52 | 52 | }
| | 53 | 53 |
| | 54 | 54 | public void itemAdd( ZorderItem item ) {
|
| | @@ -36,7 +36,7 @@ | | 36 | 36 | foreach ( PropertyInfo pi in properties ) {
| | 37 | 37 | if ( pi.PropertyType.Equals( typeof( System.Drawing.Imaging.ImageFormat ) ) ) {
| | 38 | 38 | System.Drawing.Imaging.ImageFormat ifm = (System.Drawing.Imaging.ImageFormat)pi.GetValue( null, null );
| | 39 | | - string ext = Misc.GetExtensionFromImageFormat( ifm );
| | 39 | + string ext = Util.GetExtensionFromImageFormat( ifm );
| | 40 | 40 | if ( ext.Length > 0 ) {
| | 41 | 41 | i++;
| | 42 | 42 | comboFormat.Items.Add( pi.Name );
|
| | @@ -54,14 +54,14 @@ | | 54 | 54 | public void ApplyFont( Font font ) {
| | 55 | 55 | this.Font = font;
| | 56 | 56 | foreach ( Control c in this.Controls ) {
| | 57 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 57 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 58 | 58 | }
| | 59 | 59 | }
| | 60 | 60 |
| | 61 | 61 | public string ParserString {
| | 62 | 62 | get {
| | 63 | 63 | if ( chkAutomaticallyAddExtension.Checked ) {
| | 64 | | - return txtParser.Text + Misc.GetExtensionFromImageFormat( ImageFormat );
| | 64 | + return txtParser.Text + Util.GetExtensionFromImageFormat( ImageFormat );
| | 65 | 65 | } else {
| | 66 | 66 | return txtParser.Text;
| | 67 | 67 | }
|
| | @@ -112,7 +112,7 @@ | | 112 | 112 | }
| | 113 | 113 |
| | 114 | 114 | public static string _( string s ) {
| | 115 | | - return Messaging.GetMessage( s );
| | 115 | + return Messaging.getMessage( s );
| | 116 | 116 | }
| | 117 | 117 |
| | 118 | 118 | public float Start {
|
| | @@ -194,7 +194,7 @@ | | 194 | 194 | private void UpdateSampleFileNames() {
| | 195 | 195 | string ret = _( "Sample File Name" ) + Environment.NewLine;
| | 196 | 196 | System.Drawing.Imaging.ImageFormat ifm = ImageFormat;
| | 197 | | - string ext = Misc.GetExtensionFromImageFormat( ifm );
| | 197 | + string ext = Util.GetExtensionFromImageFormat( ifm );
| | 198 | 198 | string parser = ParserString;
| | 199 | 199 | try {
| | 200 | 200 | ret += string.Format( parser, 0 ) + Environment.NewLine;
|
| | @@ -31,7 +31,7 @@ | | 31 | 31 | public void ApplyFont( Font font ) {
| | 32 | 32 | this.Font = font;
| | 33 | 33 | foreach ( Control c in this.Controls ) {
| | 34 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 34 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 35 | 35 | }
| | 36 | 36 | }
| | 37 | 37 |
|
| | @@ -219,8 +219,8 @@ | | 219 | 219 | property.titleLower.Text = _( "Property" );
| | 220 | 220 | property.ApplyLanguage();
| | 221 | 221 |
| | 222 | | - if ( AppManager.SaveData.m_plugins != null ) {
| | 223 | | - foreach ( PluginInfo plugin in AppManager.SaveData.m_plugins ) {
| | 222 | + if ( AppManager.plugins != null ) {
| | 223 | + foreach ( PluginInfo plugin in AppManager.plugins ) {
| | 224 | 224 | plugin.Instance.ApplyLanguage( AppManager.Config.Language );
| | 225 | 225 | }
| | 226 | 226 | }
|
| | @@ -267,7 +267,7 @@ | | 267 | 267 | }
| | 268 | 268 | AppManager.SaveData.m_totalSec = Math.Max( AppManager.SaveData.m_totalSec, (float)ust.getTotalSec() );
| | 269 | 269 | } else {
| | 270 | | - VsqFile vsqFile = new VsqFile( filename, Encoding.GetEncoding( "Shift_JIS" ) );
| | 270 | + VsqFile vsqFile = new VsqFile( filename, "Shift_JIS" );
| | 271 | 271 | int tracks = vsqFile.Track.Count;
| | 272 | 272 | string[] track_names = new string[tracks];
| | 273 | 273 | for ( int track = 0; track < tracks; track++ ) {
|
| | @@ -545,11 +545,12 @@ | | 545 | 545 | BinaryFormatter bf = new BinaryFormatter();
| | 546 | 546 | m_skip_paint = true;
| | 547 | 547 |
| | 548 | | - List<PluginInfo> t_plugin_info = new List<PluginInfo>();
| | 549 | | - foreach ( PluginInfo pinfo in AppManager.SaveData.m_plugins ) {
| | 548 | + /*List<PluginInfo> t_plugin_info = new List<PluginInfo>(); // 現在の保存データに入っているプラグイン情報のリスト
| | 549 | + foreach ( PluginInfo pinfo in AppManager.plugins ) {
| | 550 | 550 | t_plugin_info.Add( (PluginInfo)pinfo.Clone() );
| | 551 | | - }
| | 551 | + }*/
| | 552 | 552 |
| | 553 | + //SettingsEx old = AppManager.SaveData;
| | 553 | 554 | object tmp = bf.Deserialize( fs );
| | 554 | 555 | if ( tmp.GetType() == typeof( LipSync.Settings ) ) {
| | 555 | 556 | #if DEBUG
|
| | @@ -576,13 +577,13 @@ | | 576 | 577 |
| | 577 | 578 | AppManager.SaveData.m_zorder.Clear();
| | 578 | 579 |
| | 579 | | - int n_plugin = t_plugin_info.Count;
| | 580 | + /*int n_plugin = t_plugin_info.Count;
| | 580 | 581 | if ( n_plugin > 0 ) {
| | 581 | | - AppManager.SaveData.m_plugins = new PluginInfo[t_plugin_info.Count];
| | 582 | + AppManager.plugins = new PluginInfo[t_plugin_info.Count];
| | 582 | 583 | for ( int i = 0; i < t_plugin_info.Count; i++ ) {
| | 583 | | - AppManager.SaveData.m_plugins[i] = (PluginInfo)t_plugin_info[i].Clone();
| | 584 | + AppManager.plugins[i] = (PluginInfo)t_plugin_info[i].Clone();
| | 584 | 585 | }
| | 585 | | - }
| | 586 | + }*/
| | 586 | 587 |
| | 587 | 588 | AppManager.Edited = false;
| | 588 | 589 |
|
| | @@ -594,13 +595,16 @@ | | 594 | 595 |
| | 595 | 596 | List<TimeTable> tmp_ttable = new List<TimeTable>();
| | 596 | 597 | List<PluginConfig> tmp_config = new List<PluginConfig>();
| | 598 | +
| | 599 | + List<TimeTable> add_ttable = new List<TimeTable>(); //新しいプラグインが見つかった場合に,後で追加処理をするためのリスト
| | 600 | + List<PluginConfig> add_config = new List<PluginConfig>(); //
| | 597 | 601 | for ( int i = 0; i < AppManager.SaveData.m_plugins_config.Count; i++ ) {
| | 598 | 602 | #if DEBUG
| | 599 | 603 | Common.DebugWriteLine( "Form1.read(String); m_plugins_config[]; id=" + AppManager.SaveData.m_plugins_config[i].ID + "; config=" + AppManager.SaveData.m_plugins_config[i].Config );
| | 600 | 604 | #endif
| | 601 | 605 | bool found = false;
| | 602 | | - for ( int j = 0; j < AppManager.SaveData.m_plugins.Length; j++ ) {
| | 603 | | - if ( AppManager.SaveData.m_plugins_config[i].ID == AppManager.SaveData.m_plugins[j].ID ) {
| | 606 | + for ( int j = 0; j < AppManager.plugins.Length; j++ ) {
| | 607 | + if ( AppManager.SaveData.m_plugins_config[i].ID == AppManager.plugins[j].ID ) {
| | 604 | 608 | found = true;
| | 605 | 609 | break;
| | 606 | 610 | }
|
| | @@ -614,6 +618,28 @@ | | 614 | 618 | }
| | 615 | 619 | }
| | 616 | 620 |
| | 621 | + // インストールされているプラグイン(AppManager.plugin)と,
| | 622 | + // LSEに保存されているプラグインAppManager.SaveData.m_plugins_config
| | 623 | + // AppManager.SaveData.m_group_pluginとの整合性をとる
| | 624 | + bool[] confirmed = new bool[AppManager.plugins.Length];
| | 625 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 626 | + PluginInfo pi = AppManager.plugins[i];
| | 627 | + confirmed[i] = false;
| | 628 | + foreach ( PluginConfig pc in AppManager.SaveData.m_plugins_config ) {
| | 629 | + if ( pi.ID == pc.ID ) {
| | 630 | + confirmed[i] = true;
| | 631 | + break;
| | 632 | + }
| | 633 | + }
| | 634 | + }
| | 635 | + for ( int i = 0; i < confirmed.Length; i++ ) {
| | 636 | + if ( confirmed[i] ) {
| | 637 | + continue;
| | 638 | + }
| | 639 | + add_ttable.Add( new TimeTable( AppManager.plugins[i].ID, 0, TimeTableType.plugin, null ) );
| | 640 | + add_config.Add( new PluginConfig( AppManager.plugins[i].ID, "" ) );
| | 641 | + }
| | 642 | +
| | 617 | 643 | // Settingsに転送
| | 618 | 644 | AppManager.SaveData.m_group_plugin.Clear();
| | 619 | 645 | AppManager.SaveData.m_plugins_config.Clear();
|
| | @@ -621,14 +647,18 @@ | | 621 | 647 | AppManager.SaveData.m_group_plugin.Add( (TimeTable)tmp_ttable[i].Clone() );
| | 622 | 648 | AppManager.SaveData.m_plugins_config.Add( tmp_config[i].Clone() );
| | 623 | 649 | }
| | 650 | + for ( int i = 0; i < add_ttable.Count; i++ ) {
| | 651 | + AppManager.SaveData.m_group_plugin.Add( add_ttable[i] );
| | 652 | + AppManager.SaveData.m_plugins_config.Add( add_config[i] );
| | 653 | + }
| | 624 | 654 |
| | 625 | 655 | // プラグインの全体設定を適用
| | 626 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 627 | | - string id = AppManager.SaveData.m_plugins[i].ID;
| | 628 | | - AppManager.SaveData.m_plugins[i].Instance.Config = "";
| | 656 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 657 | + string id = AppManager.plugins[i].ID;
| | 658 | + AppManager.plugins[i].Instance.Config = "";
| | 629 | 659 | for ( int j = 0; j < AppManager.SaveData.m_group_plugin.Count; j++ ) {
| | 630 | 660 | if ( AppManager.SaveData.m_plugins_config[j].ID == id ) {
| | 631 | | - AppManager.SaveData.m_plugins[i].Instance.Config = AppManager.SaveData.m_plugins_config[j].Config;
| | 661 | + AppManager.plugins[i].Instance.Config = AppManager.SaveData.m_plugins_config[j].Config;
| | 632 | 662 | break;
| | 633 | 663 | }
| | 634 | 664 | }
|
| | @@ -660,8 +690,8 @@ | | 660 | 690 | for ( int i = 0; i < m_not_used_plugin_config.Count; i++ ) {
| | 661 | 691 | Common.DebugWriteLine( "Form1.read(String); not registered; id=" + m_not_used_plugin_config[i].ID );
| | 662 | 692 | }
| | 663 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 664 | | - Common.DebugWriteLine( "Form1.read(String); current plugin; id=" + AppManager.SaveData.m_plugins[i].ID + "; Config=" + AppManager.SaveData.m_plugins[i].Instance.Config );
| | 693 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 694 | + Common.DebugWriteLine( "Form1.read(String); current plugin; id=" + AppManager.plugins[i].ID + "; Config=" + AppManager.plugins[i].Instance.Config );
| | 665 | 695 | }
| | 666 | 696 | #endif
| | 667 | 697 | }
|
| | @@ -1292,11 +1322,11 @@ | | 1292 | 1322 | float end = (float)ust_file.getSecFromClock( (int)(count + ue.Length) );
| | 1293 | 1323 | string phrase = ue.Lyric;
| | 1294 | 1324 | if ( phrase != "R" ) {
| | 1295 | | - string symbol = "a";
| | 1296 | | - if ( !SymbolTable.attatch( phrase, out symbol ) ) {
| | 1297 | | - symbol = "a";
| | 1325 | + bocoree.ByRef<string> symbol = new bocoree.ByRef<string>( "a" );
| | 1326 | + if ( !SymbolTable.attatch( phrase, symbol ) ) {
| | 1327 | + symbol.value = "a";
| | 1298 | 1328 | }
| | 1299 | | - temp.Add( new TimeTableEntry( start, end, phrase + "(" + symbol + ")" ) );
| | 1329 | + temp.Add( new TimeTableEntry( start, end, phrase + "(" + symbol.value + ")" ) );
| | 1300 | 1330 | }
| | 1301 | 1331 | count += (int)ue.Length;
| | 1302 | 1332 | }
|
| | @@ -1413,7 +1443,7 @@ | | 1413 | 1443 | base.WindowState = FormWindowState.Maximized;
| | 1414 | 1444 | }
| | 1415 | 1445 |
| | 1416 | | - Messaging.Language = AppManager.Config.Language;
| | 1446 | + Messaging.setLanguage( AppManager.Config.Language );
| | 1417 | 1447 | ApplyLanguage();
| | 1418 | 1448 |
| | 1419 | 1449 | // 拡張前の設定ファイルに対応
|
| | @@ -1628,7 +1658,7 @@ | | 1628 | 1658 | }
| | 1629 | 1659 |
| | 1630 | 1660 | public string _( string s ) {
| | 1631 | | - return Messaging.GetMessage( s );
| | 1661 | + return Messaging.getMessage( s );
| | 1632 | 1662 | }
| | 1633 | 1663 |
| | 1634 | 1664 | private void m_text_TextChanged( object sender, EventArgs e ) {
|
| | @@ -116,7 +116,7 @@ | | 116 | 116 | int count = 0;
| | 117 | 117 | for ( int j = 0; j < i; j++ ) {
| | 118 | 118 | if ( list[j].Lane == index ){
| | 119 | | - if ( Boare.Lib.AppUtil.Misc.IsOverwrapped( list[i].Start, list[i].End, list[j].Start, list[j].End ) ) {
| | 119 | + if ( Boare.Lib.AppUtil.Util.IsOverwrapped( list[i].Start, list[i].End, list[j].Start, list[j].End ) ) {
| | 120 | 120 | count++;
| | 121 | 121 | break;
| | 122 | 122 | }
|
| | @@ -193,7 +193,7 @@ | | 193 | 193 | mc_scale.Color = Common.CURVE_SCALE;
| | 194 | 194 | mc_alpha.Color = Common.CURVE_ALPHA;
| | 195 | 195 | if ( m_font != null ) {
| | 196 | | - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font );
| | 196 | + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font );
| | 197 | 197 | }
| | 198 | 198 | }
| | 199 | 199 |
|
| | @@ -211,7 +211,7 @@ | | 211 | 211 | m_default_font = new Font( "MS UI Gothic", 18 );
| | 212 | 212 | m_font = (Font)m_default_font.Clone();
| | 213 | 213 | }
| | 214 | | - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font );
| | 214 | + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font );
| | 215 | 215 | m_id = id;
| | 216 | 216 | m_fore_color = m_telop_default_color;
| | 217 | 217 | }
|
| | @@ -357,7 +357,7 @@ | | 357 | 357 | set {
| | 358 | 358 | m_text = value;
| | 359 | 359 | if ( m_font != null ) {
| | 360 | | - m_size = Boare.Lib.AppUtil.Misc.MeasureString( this.m_text, this.m_font );
| | 360 | + m_size = Boare.Lib.AppUtil.Util.measureString( this.m_text, this.m_font );
| | 361 | 361 | } else {
| | 362 | 362 | m_size = new Size();
| | 363 | 363 | }
|
| | @@ -400,7 +400,7 @@ | | 400 | 400 | m_font = value;
| | 401 | 401 | m_default_font = (Font)m_font.Clone();
| | 402 | 402 | if ( m_font != null ) {
| | 403 | | - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font );
| | 403 | + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font );
| | 404 | 404 | } else {
| | 405 | 405 | m_size = new Size();
| | 406 | 406 | }
|
| | @@ -21,7 +21,7 @@ | | 21 | 21 | ListView m_listview;
| | 22 | 22 |
| | 23 | 23 | public static string _( string s ) {
| | 24 | | - return Messaging.GetMessage( s );
| | 24 | + return Messaging.getMessage( s );
| | 25 | 25 | }
| | 26 | 26 |
| | 27 | 27 | protected override void WndProc( ref Message m ) {
|
| | @@ -57,8 +57,6 @@ | | 57 | 57 | public uint m_dwScale = 1;
| | 58 | 58 | [NonSerialized]
| | 59 | 59 | private float m_fps_buffer = 30f;
| | 60 | | - [NonSerialized]
| | 61 | | - public PluginInfo[] m_plugins;
| | 62 | 60 | [OptionalField]
| | 63 | 61 | public List<Telop> m_telop_ex2 = new List<Telop>();
| | 64 | 62 | [OptionalField]
|
| | @@ -74,7 +72,7 @@ | | 74 | 72 | public static event CommandExecutedEventHandler CommandExecuted;
| | 75 | 73 |
| | 76 | 74 | private static string _( string s ) {
| | 77 | | - return Messaging.GetMessage( s );
| | 75 | + return Messaging.getMessage( s );
| | 78 | 76 | }
| | 79 | 77 |
| | 80 | 78 | public void DrawTo( Graphics g, Size mSize, float now, bool is_transparent ) {
|
| | @@ -182,7 +180,7 @@ | | 182 | 180 | s += "\n" + draw[i];
| | 183 | 181 | }
| | 184 | 182 | }
| | 185 | | - m_plugins[target_plugin].Instance.Render( g, mSize, now, s, "" );
| | 183 | + AppManager.plugins[target_plugin].Instance.Render( g, mSize, now, s, "" );
| | 186 | 184 | }
| | 187 | 185 | continue;
| | 188 | 186 | }
|
| | @@ -197,7 +195,7 @@ | | 197 | 195 | #endif
| | 198 | 196 | tmp = new Bitmap( mSize.Width, mSize.Height );
| | 199 | 197 | TimeTableEntry tmptt = m_group_plugin[index][entry];
| | 200 | | - m_plugins[index].Instance.Apply( ref tmp, now, tmptt.begin, tmptt.end, ref tmptt.body );
| | 198 | + AppManager.plugins[index].Instance.Apply( ref tmp, now, tmptt.begin, tmptt.end, ref tmptt.body );
| | 201 | 199 | m_group_plugin[index][entry] = tmptt;
| | 202 | 200 | size = mSize;
| | 203 | 201 | position = new PointF( 0f, 0f );
|
| | @@ -957,7 +955,7 @@ | | 957 | 955 | if ( command.group >= 0 ) {
| | 958 | 956 | m_groups_character[command.group].Character.PluginConfig.Config = command.str;
| | 959 | 957 | }
| | 960 | | - m_plugins[command.track].Instance.Config = command.str;
| | 958 | + AppManager.plugins[command.track].Instance.Config = command.str;
| | 961 | 959 | break;
| | 962 | 960 | case CommandType.changeFps:
| | 963 | 961 | ret = Command.GCommandChangeFps( m_dwRate, m_dwScale );
|
| | @@ -80,7 +80,7 @@ | | 80 | 80 | public int m_command_position = -1;
| | 81 | 81 |
| | 82 | 82 | public static string _( string s ) {
| | 83 | | - return Messaging.GetMessage( s );
| | 83 | + return Messaging.getMessage( s );
| | 84 | 84 | }
| | 85 | 85 |
| | 86 | 86 | public Settings() {
|
| | @@ -70,7 +70,7 @@ | | 70 | 70 | public void ApplyFont( Font font ) {
| | 71 | 71 | this.Font = font;
| | 72 | 72 | foreach ( Control c in this.Controls ) {
| | 73 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 73 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 74 | 74 | }
| | 75 | 75 | }
| | 76 | 76 |
|
| | @@ -50,7 +50,7 @@ | | 50 | 50 | public void ApplyFont( Font font ) {
| | 51 | 51 | this.Font = font;
| | 52 | 52 | foreach ( Control c in this.Controls ) {
| | 53 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 53 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 54 | 54 | }
| | 55 | 55 | }
| | 56 | 56 |
|
| | @@ -65,7 +65,7 @@ | | 65 | 65 | }
| | 66 | 66 |
| | 67 | 67 | public static string _( string s ) {
| | 68 | | - return Messaging.GetMessage( s );
| | 68 | + return Messaging.getMessage( s );
| | 69 | 69 | }
| | 70 | 70 |
| | 71 | 71 | public float Start {
|
| | @@ -28,7 +28,7 @@ | | 28 | 28 | public void ApplyFont( Font font ) {
| | 29 | 29 | this.Font = font;
| | 30 | 30 | foreach ( Control c in this.Controls ) {
| | 31 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 31 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 32 | 32 | }
| | 33 | 33 | }
| | 34 | 34 |
|
| | @@ -89,7 +89,7 @@ | | 89 | 89 | }
| | 90 | 90 | set {
| | 91 | 91 | m_track_height = value;
| | 92 | | - Size font_size = Misc.MeasureString( "abQBHqj", Font.GetFont() );
| | 92 | + Size font_size = Util.measureString( "abQBHqj", Font.GetFont() );
| | 93 | 93 | VerticalStringOffset = (m_track_height - font_size.Height) / 2;
| | 94 | 94 | }
| | 95 | 95 | }
|
| | @@ -54,14 +54,14 @@ | | 54 | 54 |
| | 55 | 55 | #region Static Readonly Field
| | 56 | 56 | private static readonly AuthorListEntry[] m_credit = new AuthorListEntry[]{
| | 57 | | - new AuthorListEntry( "is developped by:", FontStyle.Italic ),
| | 57 | + new AuthorListEntry( "is developped by:", bocoree.java.awt.Font.ITALIC ),
| | 58 | 58 | new AuthorListEntry( "kbinani" ),
| | 59 | | - new AuthorListEntry( "and he thanks to:", FontStyle.Italic ),
| | 59 | + new AuthorListEntry( "and he thanks to:", bocoree.java.awt.Font.ITALIC ),
| | 60 | 60 | new AuthorListEntry(),
| | 61 | | - new AuthorListEntry( "author of embedded character", FontStyle.Italic ),
| | 61 | + new AuthorListEntry( "author of embedded character", bocoree.java.awt.Font.ITALIC ),
| | 62 | 62 | new AuthorListEntry( "さなり" ),
| | 63 | 63 | new AuthorListEntry(),
| | 64 | | - new AuthorListEntry( "contributors", FontStyle.Italic ),
| | 64 | + new AuthorListEntry( "contributors", bocoree.java.awt.Font.ITALIC ),
| | 65 | 65 | new AuthorListEntry( "evm" ),
| | 66 | 66 | new AuthorListEntry( "鈴村優" ),
| | 67 | 67 | new AuthorListEntry( "そろそろP" ),
|
| | @@ -70,10 +70,10 @@ | | 70 | 70 | new AuthorListEntry( "NOIKE" ),
| | 71 | 71 | new AuthorListEntry( "逃亡者" ),
| | 72 | 72 | new AuthorListEntry(),
| | 73 | | - new AuthorListEntry( "translator", FontStyle.Italic ),
| | 73 | + new AuthorListEntry( "translator", bocoree.java.awt.Font.ITALIC ),
| | 74 | 74 | new AuthorListEntry( "E-Avalance" ),
| | 75 | 75 | new AuthorListEntry(),
| | 76 | | - new AuthorListEntry( "bugs and suggestions reporters", FontStyle.Italic ),
| | 76 | + new AuthorListEntry( "bugs and suggestions reporters", bocoree.java.awt.Font.ITALIC ),
| | 77 | 77 | new AuthorListEntry( "だんちゃん" ),
| | 78 | 78 | new AuthorListEntry( "灰" ),
| | 79 | 79 | new AuthorListEntry( "sanryo" ),
|
| | @@ -88,7 +88,7 @@ | | 88 | 88 | new AuthorListEntry( "IGASIO" ),
| | 89 | 89 | new AuthorListEntry( "PEX" ),
| | 90 | 90 | new AuthorListEntry(),
| | 91 | | - new AuthorListEntry( "and you.", FontStyle.Bold | FontStyle.Italic ),
| | 91 | + new AuthorListEntry( "and you.", bocoree.java.awt.Font.ITALIC | bocoree.java.awt.Font.BOLD ),
| | 92 | 92 | };
| | 93 | 93 | private static readonly Pen HILIGHT = new Pen( Color.Gray, 2 );
| | 94 | 94 | private static readonly Pen HILIGHT_EDIT = new Pen( Color.Red, 2 );
|
| | @@ -268,7 +268,7 @@ | | 268 | 268 | this.pictureBox1.MouseWheel += new MouseEventHandler( pictureBox1_MouseWheel );
| | 269 | 269 | m_player = new MediaPlayer();
| | 270 | 270 | previewer.TrackVolumeValue = m_player.Volume;
| | 271 | | - Messaging.LoadMessages();
| | 271 | + Messaging.loadMessages();
| | 272 | 272 | LoadConfig();
| | 273 | 273 | this.SizeChanged += new EventHandler( Form1_LocationOrSizeChanged );
| | 274 | 274 | this.LocationChanged += new EventHandler( Form1_LocationOrSizeChanged );
|
| | @@ -748,7 +748,7 @@ | | 748 | 748 | cmenu.Items.Add( mItemImage );
| | 749 | 749 | cmenu.Items.Add( "-" );
| | 750 | 750 | } else if ( m_clicked.type == TimeTableType.plugin ) {
| | 751 | | - if ( (AppManager.SaveData.m_plugins[m_clicked.track].Instance.Type & Constants.LS_ENABLES_ENTRY_SETTING) == Constants.LS_ENABLES_ENTRY_SETTING ) {
| | 751 | + if ( (AppManager.plugins[m_clicked.track].Instance.Type & Constants.LS_ENABLES_ENTRY_SETTING) == Constants.LS_ENABLES_ENTRY_SETTING ) {
| | 752 | 752 | cmenu.Items.Add( _( "Plugin config. of this entry" ), null, new EventHandler( h_entrySetting ) );
| | 753 | 753 | cmenu.Items.Add( "-" );
| | 754 | 754 | }
|
| | @@ -1533,7 +1533,7 @@ | | 1533 | 1533 | private void menuHelpVersionInfo_Click( object sender, EventArgs e ) {
| | 1534 | 1534 | if ( m_version_form == null ) {
| | 1535 | 1535 | string version_str = AppManager.VERSION + "\n\n" +
| | 1536 | | - GetAssemblyNameAndVersion( typeof( Boare.Lib.AppUtil.Misc ) ) + "\n" +
| | 1536 | + GetAssemblyNameAndVersion( typeof( Boare.Lib.AppUtil.Util ) ) + "\n" +
| | 1537 | 1537 | GetAssemblyNameAndVersion( typeof( Boare.Lib.Media.AviWriterVcm ) ) + "\n" +
| | 1538 | 1538 | GetAssemblyNameAndVersion( typeof( Boare.Lib.Vsq.VsqFile ) ) + "\n" +
| | 1539 | 1539 | #if DEBUG
|
| | @@ -1543,10 +1543,16 @@ | | 1543 | 1543 | m_version_form = new Boare.Lib.AppUtil.VersionInfo( _( "LipSync" ), version_str );
| | 1544 | 1544 | m_version_form.Font = AppManager.Config.Font.GetFont();
| | 1545 | 1545 | m_version_form.AuthorList = m_credit;
| | 1546 | | - m_version_form.AppNameColor = Color.RoyalBlue;
| | 1547 | | - m_version_form.VersionColor = Color.DimGray;
| | 1546 | + bocoree.java.awt.Color app_name = new bocoree.java.awt.Color();
| | 1547 | + app_name.color = Color.RoyalBlue;
| | 1548 | + m_version_form.AppNameColor = app_name;
| | 1549 | + bocoree.java.awt.Color vers = new bocoree.java.awt.Color();
| | 1550 | + vers.color = Color.DimGray;
| | 1551 | + m_version_form.VersionColor = vers;
| | 1548 | 1552 | #if !DEBUG
| | 1549 | | - m_version_form.Credit = AppManager.author_list;
| | 1553 | + bocoree.java.awt.image.BufferedImage img = new bocoree.java.awt.image.BufferedImage( 1, 1, bocoree.java.awt.image.BufferedImage.TYPE_INT_RGB );
| | 1554 | + img.m_image = AppManager.author_list;
| | 1555 | + m_version_form.Credit = img;
| | 1550 | 1556 | #endif
| | 1551 | 1557 | m_version_form.FormClosed += new FormClosedEventHandler( m_version_form_FormClosed );
| | 1552 | 1558 | m_version_form.Show();
|
| | @@ -1575,13 +1581,13 @@ | | 1575 | 1581 | // プラグインを読み込み
| | 1576 | 1582 | //インストールされているプラグインを調べる
| | 1577 | 1583 | //すべてのプラグインクラスのインスタンスを作成する
| | 1578 | | - AppManager.SaveData.m_plugins = PluginInfo.FindPlugins();
| | 1584 | + AppManager.plugins = PluginInfo.FindPlugins();
| | 1579 | 1585 |
| | 1580 | 1586 | AppManager.SaveData.m_group_plugin = new TimeTableGroup( _( "Plugin" ), -1, null );
| | 1581 | 1587 |
| | 1582 | 1588 | AppManager.SaveData.m_plugins_config = new List<PluginConfig>();
| | 1583 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 1584 | | - AppManager.SaveData.m_plugins_config.Add( new PluginConfig( AppManager.SaveData.m_plugins[i].Instance.Name, AppManager.SaveData.m_plugins[i].Instance.Config, Path.GetFileName( AppManager.SaveData.m_plugins[i].Location ) ) );
| | 1589 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 1590 | + AppManager.SaveData.m_plugins_config.Add( new PluginConfig( AppManager.plugins[i].Instance.Name, AppManager.plugins[i].Instance.Config, Path.GetFileName( AppManager.plugins[i].Location ) ) );
| | 1585 | 1591 | AppManager.SaveData.m_group_plugin.Add( new TimeTable( AppManager.SaveData.m_plugins_config[i].ID, 0, TimeTableType.plugin, null ) );
| | 1586 | 1592 | }
| | 1587 | 1593 |
|
| | @@ -1589,9 +1595,9 @@ | | 1589 | 1595 | * プラグインの種類に応じて、メインメニューを更新
| | 1590 | 1596 | */
| | 1591 | 1597 | // プラグイン設定
| | 1592 | | - if ( AppManager.SaveData.m_plugins.Length > 0 ) {
| | 1593 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 1594 | | - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_NO_EVENT_HANDLER) != Plugin.Constants.LS_NO_EVENT_HANDLER ) {
| | 1598 | + if ( AppManager.plugins.Length > 0 ) {
| | 1599 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 1600 | + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_NO_EVENT_HANDLER) != Plugin.Constants.LS_NO_EVENT_HANDLER ) {
| | 1595 | 1601 | menuToolPluginConfig.DropDownItems.Add( AppManager.SaveData.m_plugins_config[i].ID, null, new EventHandler( h_pluginSetting ) );
| | 1596 | 1602 | }
| | 1597 | 1603 | }
|
| | @@ -1599,8 +1605,8 @@ | | 1599 | 1605 |
| | 1600 | 1606 | // プラグインの情報
| | 1601 | 1607 | menuHelpPluginInfo.DropDownItems.Clear();
| | 1602 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 1603 | | - menuHelpPluginInfo.DropDownItems.Add( AppManager.SaveData.m_plugins[i].Instance.Name, null, new EventHandler( h_pluginInfo ) );
| | 1608 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 1609 | + menuHelpPluginInfo.DropDownItems.Add( AppManager.plugins[i].Instance.Name, null, new EventHandler( h_pluginInfo ) );
| | 1604 | 1610 | }
| | 1605 | 1611 |
| | 1606 | 1612 | AppManager.SaveData.m_group_vsq = new TimeTableGroup( _( "VSQ Tracks" ), -1, null );
|
| | @@ -1854,7 +1860,7 @@ | | 1854 | 1860 | if ( args.IsWaveMergeRequired ) {
| | 1855 | 1861 | #region merge wave file
| | 1856 | 1862 | if ( File.Exists( audio_file ) && AppManager.Config.PathFFmpeg != "" && File.Exists( AppManager.Config.PathFFmpeg ) ) {
| | 1857 | | - string tmp_avi = Misc.GetTempFileNameIn( Path.GetDirectoryName( args.AviFile ), ".avi" );
| | 1863 | + string tmp_avi = Util.GetTempFileNameIn( Path.GetDirectoryName( args.AviFile ), ".avi" );
| | 1858 | 1864 | File.Move( args.AviFile, tmp_avi );
| | 1859 | 1865 | // ffmpeg -i movie.mpeg -i audio.wav combined.avi
| | 1860 | 1866 | long frames = end_frame - start_frame + 1;
|
| | @@ -2006,8 +2012,8 @@ | | 2006 | 2012 |
| | 2007 | 2013 | private void menuEditAddCharacter_Click( object sender, EventArgs e ) {
| | 2008 | 2014 | List<string> plugins = new List<string>();
| | 2009 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 2010 | | - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) {
| | 2015 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 2016 | + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) {
| | 2011 | 2017 | plugins.Add( AppManager.SaveData.m_plugins_config[i].ID );
| | 2012 | 2018 | }
| | 2013 | 2019 | }
|
| | @@ -2139,7 +2145,7 @@ | | 2139 | 2145 |
| | 2140 | 2146 | // まず、zオーダーを設定可能なオブジェクトの個数を数える
| | 2141 | 2147 | // プラグイン
| | 2142 | | - count += AppManager.SaveData.m_plugins.Length;
| | 2148 | + count += AppManager.plugins.Length;
| | 2143 | 2149 | bool[] b_plugins = new bool[AppManager.SaveData.m_group_plugin.Count];
| | 2144 | 2150 | for ( int i = 0; i < AppManager.SaveData.m_group_plugin.Count; i++ ) {
| | 2145 | 2151 | b_plugins[i] = false;
|
| | @@ -2166,7 +2172,7 @@ | | 2166 | 2172 | int[] eval = new int[count];
| | 2167 | 2173 | int[] order = new int[count];
| | 2168 | 2174 | int index = -1;
| | 2169 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 2175 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 2170 | 2176 | index++;
| | 2171 | 2177 | list[index] = new ZorderItem( AppManager.SaveData.m_plugins_config[i].ID, ZorderItemType.plugin, i );
| | 2172 | 2178 | eval[index] = AppManager.SaveData.m_group_plugin[i].ZOrder;
|
| | @@ -2344,7 +2350,7 @@ | | 2344 | 2350 | if ( openVsqDialog.FilterIndex == 0 || Path.GetExtension( openVsqDialog.FileName ).ToLower() == ".vsq" ) {
| | 2345 | 2351 | // VsqFileを取得
| | 2346 | 2352 | int most_lyrics_track = 0; // 一番歌詞の文字数が多かったトラックの番号
| | 2347 | | - VsqFile vsqFile = new VsqFile( openVsqDialog.FileName, Encoding.GetEncoding( "Shift_JIS" ) );
| | 2353 | + VsqFile vsqFile = new VsqFile( openVsqDialog.FileName, "Shift_JIS" );
| | 2348 | 2354 | AppManager.SaveData.m_totalSec = (float)vsqFile.getTotalSec();
| | 2349 | 2355 |
| | 2350 | 2356 | AppManager.SaveData.m_timesig_ex = new List<TimeSigTableEntry>( vsqFile.TimesigTable.ToArray() );
|
| | @@ -2386,7 +2392,7 @@ | | 2386 | 2392 | } else {
| | 2387 | 2393 | UstFile ust_file = new UstFile( openVsqDialog.FileName );
| | 2388 | 2394 | for ( int track = 0; track < ust_file.getTrackCount(); track++ ) {
| | 2389 | | - for( Iterator itr = ust_file.getTrack( track ).getNoteEventIterator(); itr.hasNext(); ){
| | 2395 | + for( bocoree.java.util.Iterator itr = ust_file.getTrack( track ).getNoteEventIterator(); itr.hasNext(); ){
| | 2390 | 2396 | UstEvent ue = (UstEvent)itr.next();
| | 2391 | 2397 | if ( ue.Lyric == "u" ) {
| | 2392 | 2398 | ue.Lyric = "う";
|
| | @@ -3254,19 +3260,19 @@ | | 3254 | 3260 | }
| | 3255 | 3261 |
| | 3256 | 3262 | string lang = AppManager.Config.Language;
| | 3257 | | - string[] t_list = Messaging.GetRegisteredLanguage();
| | 3263 | + string[] t_list = Messaging.getRegisteredLanguage();
| | 3258 | 3264 | bool found = false;
| | 3259 | 3265 | foreach ( string lng in t_list ) {
| | 3260 | 3266 | if ( lng == lang ) {
| | 3261 | 3267 | AppManager.Config.Language = lng;
| | 3262 | | - Messaging.Language = lng;
| | 3268 | + Messaging.setLanguage( lng );
| | 3263 | 3269 | found = true;
| | 3264 | 3270 | break;
| | 3265 | 3271 | }
| | 3266 | 3272 | }
| | 3267 | 3273 | if ( !found ) {
| | 3268 | 3274 | AppManager.Config.Language = "";
| | 3269 | | - Messaging.Language = "";
| | 3275 | + Messaging.setLanguage( "" );
| | 3270 | 3276 | }
| | 3271 | 3277 | ApplyLanguage();
| | 3272 | 3278 | UpdateFormTitle();
|
| | @@ -72,12 +72,12 @@ | | 72 | 72 | public void ApplyFont( Font font ) {
| | 73 | 73 | this.Font = font;
| | 74 | 74 | foreach ( Control c in this.Controls ) {
| | 75 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 75 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 76 | 76 | }
| | 77 | 77 | }
| | 78 | 78 |
| | 79 | 79 | public static string _( string s ) {
| | 80 | | - return Messaging.GetMessage( s );
| | 80 | + return Messaging.getMessage( s );
| | 81 | 81 | }
| | 82 | 82 |
| | 83 | 83 | public T ResultWidth {
|
| | @@ -52,7 +52,7 @@ | | 52 | 52 | public void ApplyFont( Font font ) {
| | 53 | 53 | this.Font = font;
| | 54 | 54 | foreach ( Control c in this.Controls ) {
| | 55 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 55 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 56 | 56 | }
| | 57 | 57 | }
| | 58 | 58 |
|
| | @@ -71,7 +71,7 @@ | | 71 | 71 | }
| | 72 | 72 |
| | 73 | 73 | private static string _( string s ) {
| | 74 | | - return Messaging.GetMessage( s );
| | 74 | + return Messaging.getMessage( s );
| | 75 | 75 | }
| | 76 | 76 |
| | 77 | 77 | public float WinkInterval {
|
| | @@ -129,12 +129,12 @@ | | 129 | 129 | public void ApplyFont( Font font ) {
| | 130 | 130 | this.Font = font;
| | 131 | 131 | foreach ( Control c in this.Controls ) {
| | 132 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 132 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 133 | 133 | }
| | 134 | 134 | }
| | 135 | 135 |
| | 136 | 136 | public static string _( string s ) {
| | 137 | | - return Messaging.GetMessage( s );
| | 137 | + return Messaging.getMessage( s );
| | 138 | 138 | }
| | 139 | 139 |
| | 140 | 140 | public TimeTableGroup EditedResult {
|
| | @@ -102,12 +102,12 @@ | | 102 | 102 | public void ApplyFont( Font font ) {
| | 103 | 103 | this.Font = font;
| | 104 | 104 | foreach ( Control c in this.Controls ) {
| | 105 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 105 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 106 | 106 | }
| | 107 | 107 | }
| | 108 | 108 |
| | 109 | 109 | public static string _( string s ) {
| | 110 | | - return Messaging.GetMessage( s );
| | 110 | + return Messaging.getMessage( s );
| | 111 | 111 | }
| | 112 | 112 |
| | 113 | 113 | /// <summary>
|
| | @@ -72,7 +72,7 @@ | | 72 | 72 | }
| | 73 | 73 |
| | 74 | 74 | private static string _( string id ) {
| | 75 | | - return Messaging.GetMessage( id );
| | 75 | + return Messaging.getMessage( id );
| | 76 | 76 | }
| | 77 | 77 |
| | 78 | 78 | public void ApplyLanguage() {
|
| | @@ -90,7 +90,7 @@ | | 90 | 90 | }
| | 91 | 91 |
| | 92 | 92 | public void ApplyFont( Font font ) {
| | 93 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( this, font );
| | 93 | + Boare.Lib.AppUtil.Util.applyFontRecurse( this, font );
| | 94 | 94 | }
| | 95 | 95 |
| | 96 | 96 | public KeyValuePair<string, string>[] Assignment {
|
| | @@ -658,14 +658,14 @@ | | 658 | 658 | string plugin_name = item.Text;
| | 659 | 659 | for ( int i = 0; i < AppManager.SaveData.m_plugins_config.Count; i++ ) {
| | 660 | 660 | if ( plugin_name == AppManager.SaveData.m_plugins_config[i].ID ) {
| | 661 | | - string old_config = AppManager.SaveData.m_plugins[i].Instance.Config;
| | 662 | | - if ( AppManager.SaveData.m_plugins[i].Instance.BaseSetting() == DialogResult.OK ) {
| | 663 | | - string new_config = AppManager.SaveData.m_plugins[i].Instance.Config;
| | 664 | | - AppManager.SaveData.m_plugins[i].Instance.Config = old_config; //ちょっとセコイなw
| | 661 | + string old_config = AppManager.plugins[i].Instance.Config;
| | 662 | + if ( AppManager.plugins[i].Instance.BaseSetting() == DialogResult.OK ) {
| | 663 | + string new_config = AppManager.plugins[i].Instance.Config;
| | 664 | + AppManager.plugins[i].Instance.Config = old_config; //ちょっとセコイなw
| | 665 | 665 | if ( old_config != new_config ) {
| | 666 | 666 | Command run = Command.GCommandChangePluginConfig( i, new_config );
| | 667 | 667 | AppManager.Register( AppManager.SaveData.Execute( run ) );
| | 668 | | - AppManager.SaveData.m_plugins[i].Instance.Config = new_config;
| | 668 | + AppManager.plugins[i].Instance.Config = new_config;
| | 669 | 669 | AppManager.Edited = true;
| | 670 | 670 | }
| | 671 | 671 | }
|
| | @@ -678,7 +678,7 @@ | | 678 | 678 | int track = m_clicked.track;
| | 679 | 679 | int entry = m_clicked.entry;
| | 680 | 680 | string current = AppManager.SaveData.m_group_plugin[track][entry].body;
| | 681 | | - if ( AppManager.SaveData.m_plugins[track].Instance.EntrySetting( ref current ) == DialogResult.OK ) {
| | 681 | + if ( AppManager.plugins[track].Instance.EntrySetting( ref current ) == DialogResult.OK ) {
| | 682 | 682 | using ( TimeTableEntry tmp = new TimeTableEntry( AppManager.SaveData.m_group_plugin[track][entry].begin, AppManager.SaveData.m_group_plugin[track][entry].end, current ) ) {
| | 683 | 683 | Command run = Command.GCommandEditTimeTableEntry( TimeTableType.plugin, -1, track, entry, tmp );
| | 684 | 684 | AppManager.Register( AppManager.SaveData.Execute( run ) );
|
| | @@ -901,8 +901,8 @@ | | 901 | 901 | return;
| | 902 | 902 | }
| | 903 | 903 | List<string> plugins = new List<string>();
| | 904 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 905 | | - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) {
| | 904 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 905 | + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) {
| | 906 | 906 | plugins.Add( AppManager.SaveData.m_plugins_config[i].ID );
| | 907 | 907 | }
| | 908 | 908 | }
|
| | @@ -1044,8 +1044,8 @@ | | 1044 | 1044 | }
| | 1045 | 1045 | }
| | 1046 | 1046 | if ( index >= 0 ) {
| | 1047 | | - if ( AppManager.SaveData.m_plugins[index].Instance.BaseSetting() == DialogResult.OK ) {
| | 1048 | | - Command run = Command.GCommandChangePluginConfig( index, AppManager.SaveData.m_plugins[index].Instance.Config );
| | 1047 | + if ( AppManager.plugins[index].Instance.BaseSetting() == DialogResult.OK ) {
| | 1048 | + Command run = Command.GCommandChangePluginConfig( index, AppManager.plugins[index].Instance.Config );
| | 1049 | 1049 | AppManager.Register( AppManager.SaveData.Execute( run ) );
| | 1050 | 1050 | AppManager.Edited = true;
| | 1051 | 1051 | }
|
| | @@ -1138,14 +1138,14 @@ | | 1138 | 1138 | private void h_pluginInfo( object sender, EventArgs e ) {
| | 1139 | 1139 | ToolStripMenuItem c_sender = (ToolStripMenuItem)sender;
| | 1140 | 1140 | int index = -1;
| | 1141 | | - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) {
| | 1142 | | - if ( AppManager.SaveData.m_plugins[i].Instance.Name == c_sender.Text ) {
| | 1141 | + for ( int i = 0; i < AppManager.plugins.Length; i++ ) {
| | 1142 | + if ( AppManager.plugins[i].Instance.Name == c_sender.Text ) {
| | 1143 | 1143 | index = i;
| | 1144 | 1144 | break;
| | 1145 | 1145 | }
| | 1146 | 1146 | }
| | 1147 | 1147 | if ( index >= 0 ) {
| | 1148 | | - VersionBox info = new VersionBox( AppManager.SaveData.m_plugins[index].Instance.Name, AppManager.SaveData.m_plugins[index].Instance.Abstract );
| | 1148 | + VersionBox info = new VersionBox( AppManager.plugins[index].Instance.Name, AppManager.plugins[index].Instance.Abstract );
| | 1149 | 1149 | info.ShowDialog();
| | 1150 | 1150 | info.Dispose();
| | 1151 | 1151 | }
|
| | @@ -82,7 +82,7 @@ | | 82 | 82 | }
| | 83 | 83 |
| | 84 | 84 | public static string _( string s ) {
| | 85 | | - return Messaging.GetMessage( s );
| | 85 | + return Messaging.getMessage( s );
| | 86 | 86 | }
| | 87 | 87 |
| | 88 | 88 | public static Property Instance {
|
| | @@ -43,7 +43,7 @@ | | 43 | 43 | public void ApplyFont( Font font ) {
| | 44 | 44 | this.Font = font;
| | 45 | 45 | foreach ( Control c in this.Controls ) {
| | 46 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 46 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 47 | 47 | }
| | 48 | 48 | }
| | 49 | 49 |
|
| | @@ -60,7 +60,7 @@ | | 60 | 60 | }
| | 61 | 61 |
| | 62 | 62 | private static string _( string s ) {
| | 63 | | - return Messaging.GetMessage( s );
| | 63 | + return Messaging.getMessage( s );
| | 64 | 64 | }
| | 65 | 65 |
| | 66 | 66 | public string Path {
|
| | @@ -56,7 +56,7 @@ | | 56 | 56 | public void ApplyFont( Font font ) {
| | 57 | 57 | this.Font = font;
| | 58 | 58 | foreach ( Control c in this.Controls ) {
| | 59 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 59 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 60 | 60 | }
| | 61 | 61 | }
| | 62 | 62 |
|
| | @@ -90,7 +90,7 @@ | | 90 | 90 | }
| | 91 | 91 |
| | 92 | 92 | public static string _( string s ) {
| | 93 | | - return Messaging.GetMessage( s );
| | 93 | + return Messaging.getMessage( s );
| | 94 | 94 | }
| | 95 | 95 |
| | 96 | 96 | public AviOutputArguments Arguments {
|
| | @@ -37,7 +37,7 @@ | | 37 | 37 | public void ApplyFont( Font font ) {
| | 38 | 38 | this.Font = font;
| | 39 | 39 | foreach ( Control c in this.Controls ) {
| | 40 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 40 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 41 | 41 | }
| | 42 | 42 | }
| | 43 | 43 |
|
| | @@ -49,7 +49,7 @@ | | 49 | 49 | }
| | 50 | 50 |
| | 51 | 51 | public static string gettext( string s ) {
| | 52 | | - return Messaging.GetMessage( s );
| | 52 | + return Messaging.getMessage( s );
| | 53 | 53 | }
| | 54 | 54 |
| | 55 | 55 | new public PasteModeDialogResult DialogResult {
|
| | @@ -51,12 +51,12 @@ | | 51 | 51 | public void ApplyFont( Font font ) {
| | 52 | 52 | this.Font = font;
| | 53 | 53 | foreach ( Control c in this.Controls ) {
| | 54 | | - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font );
| | 54 | + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font );
| | 55 | 55 | }
| | 56 | 56 | }
| | 57 | 57 |
| | 58 | 58 | public static string _( string s ) {
| | 59 | | - return Messaging.GetMessage( s );
| | 59 | + return Messaging.getMessage( s );
| | 60 | 60 | }
| | 61 | 61 |
| | 62 | 62 | public void ApplyLanguage() {
|
| | @@ -48,7 +48,7 @@ | | 48 | 48 | }
| | 49 | 49 |
| | 50 | 50 | public static string _( string s ) {
| | 51 | | - return Messaging.GetMessage( s );
| | 51 | + return Messaging.getMessage( s );
| | 52 | 52 | }
| | 53 | 53 |
| | 54 | 54 | public void ApplyLanguage() {
|
| | @@ -188,7 +188,7 @@ | | 188 | 188 | }
| | 189 | 189 |
| | 190 | 190 | public static string _( string s ) {
| | 191 | | - return Messaging.GetMessage( s );
| | 191 | + return Messaging.getMessage( s );
| | 192 | 192 | }
| | 193 | 193 |
| | 194 | 194 | public Size GraphSize {
|
| | @@ -16,8 +16,8 @@ | | 16 | 16 | Console.WriteLine( "error; file \"" + result + "\" already exists." );
| | 17 | 17 | return;
| | 18 | 18 | }
| | 19 | | - Messaging.AppendFromFile( "template.po" );
| | 20 | | - Messaging.Language = "template";
| | 19 | + Messaging.appendFromFile( "template.po" );
| | 20 | + Messaging.setLanguage( "template" );
| | 21 | 21 | Dictionary<string, string> dict = new Dictionary<string, string>();
| | 22 | 22 | using ( StreamReader sr = new StreamReader( name ) ) {
| | 23 | 23 | string line;
|
| | @@ -61,9 +61,9 @@ | | 61 | 61 | sw.WriteLine( "\"X-Poedit-SearchPath-0: Editor\\n\"" );
| | 62 | 62 | sw.WriteLine( "\"X-Poedit-SearchPath-1: Common\\n\"" );
| | 63 | 63 | sw.WriteLine( "\"X-Poedit-SearchPath-2: AviFile\\n\"" );
| | 64 | | - string[] keys = Messaging.GetKeys( "template" );
| | 64 | + string[] keys = Messaging.getKeys( "template" );
| | 65 | 65 | foreach ( string key in keys ) {
| | 66 | | - string oldid = Messaging.GetMessage( key );
| | 66 | + string oldid = Messaging.getMessage( key );
| | 67 | 67 | if ( dict.ContainsKey( oldid ) ) {
| | 68 | 68 | string item = dict[oldid];
| | 69 | 69 | item = item.Replace( "\"", "\\\"" );
|
| | @@ -15,10 +15,10 @@ | | 15 | 15 | /// <param name="e_body">エントリの終了時刻</param>
| | 16 | 16 | /// <param name="e_end">エントリの設定値</param>
| | 17 | 17 | public void Apply( ref Bitmap frame, float time, float e_begin, float e_end, ref string e_body ) {
| | 18 | | - double rpm = 11.5821;
| | 19 | | - int centerx = 135;
| | 20 | | - int centery = 135;
| | 21 | | - int impeller_diameter = 153;
| | 18 | + double rpm = 12.4;
| | 19 | + int centerx = 144;
| | 20 | + int centery = 144;
| | 21 | + int impeller_diameter = 163;
| | 22 | 22 | int impeller_height_half = 12;
| | 23 | 23 | double theta0 = 0.0;
| | 24 | 24 |
|
旧リポジトリブラウザで表示
|