From 0ecb06bd11add545b0d167e79779703dfeed5007 Mon Sep 17 00:00:00 2001 From: kbinani Date: Mon, 30 Nov 2009 11:14:58 +0000 Subject: [PATCH] =?UTF-8?q?AppManager.SaveData.m=5Fplugin=E3=82=92AppManag?= =?UTF-8?q?er.plugins=E3=81=AB=E7=A7=BB=E5=8B=95=EF=BC=8Fbocoree,=20Boare.?= =?UTF-8?q?Lib.*=E3=82=92=E6=9C=80=E6=96=B0=E7=89=88=E3=81=AB=E5=B7=AE?= =?UTF-8?q?=E3=81=97=E6=9B=BF=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.sourceforge.jp/svnroot/lipsync@16 b1f601f4-4f45-0410-8980-aecacb008692 --- trunk/LipSync/LipSync.sln | 6 +- trunk/LipSync/LipSync/Common/CurveEditor.cs | 2 +- trunk/LipSync/LipSync/Editor/AppManager.cs | 2 + trunk/LipSync/LipSync/Editor/AviOutput.cs | 4 +- .../LipSync/Editor/DisplacementControl.cs | 4 +- trunk/LipSync/LipSync/Editor/EditEntry.cs | 4 +- .../LipSync/Editor/EnvConfiguration.cs | 12 +-- trunk/LipSync/LipSync/Editor/EnvSettings.cs | 2 +- trunk/LipSync/LipSync/Editor/Form1.cs | 68 +++++++++------- trunk/LipSync/LipSync/Editor/Form1Util.cs | 80 +++++++++++++------ .../LipSync/Editor/Form1_EventHandler.cs | 26 +++--- .../LipSync/Editor/FormCommandHistory.cs | 4 +- .../LipSync/LipSync/Editor/FormObjectList.cs | 2 +- trunk/LipSync/LipSync/Editor/FormPreview.cs | 2 +- .../LipSync/LipSync/Editor/FormSeriesImage.cs | 10 +-- .../LipSync/Editor/FormSetFrameRate.cs | 4 +- .../LipSync/LipSync/Editor/FormVocalomark.cs | 4 +- .../LipSync/Editor/GenerateCharacter.cs | 4 +- trunk/LipSync/LipSync/Editor/InputBox.cs | 2 +- .../LipSync/LipSync/Editor/PasteModeDialog.cs | 4 +- trunk/LipSync/LipSync/Editor/Previewer.cs | 2 +- trunk/LipSync/LipSync/Editor/Property.cs | 2 +- .../LipSync/Editor/RipSync/RsiWriter.cs | 2 +- .../LipSync/Editor/RipSync/RspImporter.cs | 2 +- .../LipSync/LipSync/Editor/SelectCharacter.cs | 4 +- trunk/LipSync/LipSync/Editor/SetSize.cs | 4 +- trunk/LipSync/LipSync/Editor/Settings.cs | 2 +- trunk/LipSync/LipSync/Editor/SettingsEx.cs | 10 +-- trunk/LipSync/LipSync/Editor/Telop.cs | 10 +-- trunk/LipSync/LipSync/Editor/TrackSelecter.cs | 4 +- trunk/LipSync/LipSync/Editor/VersionBox.cs | 2 +- trunk/LipSync/LipSync/Editor/Winker.cs | 4 +- trunk/LipSync/LipSync/Editor/ZOrder.cs | 4 +- .../OverlayImpeller/OverlayImpeller.cs | 8 +- trunk/LipSync/lang2po/Program.cs | 8 +- 35 files changed, 174 insertions(+), 140 deletions(-) diff --git a/trunk/LipSync/LipSync.sln b/trunk/LipSync/LipSync.sln index 77b5f5a..8ede7be 100644 --- a/trunk/LipSync/LipSync.sln +++ b/trunk/LipSync/LipSync.sln @@ -64,10 +64,8 @@ Global {D60A11E0-8FFA-4CBC-A2F9-7365AFDF47A9}.Debug|Any CPU.Build.0 = Debug|Any CPU {D60A11E0-8FFA-4CBC-A2F9-7365AFDF47A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {D60A11E0-8FFA-4CBC-A2F9-7365AFDF47A9}.Release|Any CPU.Build.0 = Release|Any CPU - {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Release|Any CPU.Build.0 = Release|Any CPU + {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Debug|Any CPU.ActiveCfg = Debug|x86 + {0C58B068-272F-4390-A14F-3D72AFCF3DFB}.Release|Any CPU.ActiveCfg = Release|x86 {F4F8F601-4E3D-43F5-A8A8-AA1FB7F48452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F4F8F601-4E3D-43F5-A8A8-AA1FB7F48452}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4F8F601-4E3D-43F5-A8A8-AA1FB7F48452}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/trunk/LipSync/LipSync/Common/CurveEditor.cs b/trunk/LipSync/LipSync/Common/CurveEditor.cs index 0903f72..4a75867 100644 --- a/trunk/LipSync/LipSync/Common/CurveEditor.cs +++ b/trunk/LipSync/LipSync/Common/CurveEditor.cs @@ -188,7 +188,7 @@ namespace CurveEditor { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public Size GraphSize { diff --git a/trunk/LipSync/LipSync/Editor/AppManager.cs b/trunk/LipSync/LipSync/Editor/AppManager.cs index fb4a32d..03cc9b1 100644 --- a/trunk/LipSync/LipSync/Editor/AppManager.cs +++ b/trunk/LipSync/LipSync/Editor/AppManager.cs @@ -32,6 +32,8 @@ namespace LipSync { /// public static int MaxTelopLanes = 0; private static bool m_edited; + //[NonSerialized] + public static PluginInfo[] plugins; /// /// Editedプロパティが変更された時発生します diff --git a/trunk/LipSync/LipSync/Editor/AviOutput.cs b/trunk/LipSync/LipSync/Editor/AviOutput.cs index e1ed2fb..c1ed554 100644 --- a/trunk/LipSync/LipSync/Editor/AviOutput.cs +++ b/trunk/LipSync/LipSync/Editor/AviOutput.cs @@ -56,7 +56,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -90,7 +90,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public AviOutputArguments Arguments { diff --git a/trunk/LipSync/LipSync/Editor/DisplacementControl.cs b/trunk/LipSync/LipSync/Editor/DisplacementControl.cs index eed8a4b..9cf8776 100644 --- a/trunk/LipSync/LipSync/Editor/DisplacementControl.cs +++ b/trunk/LipSync/LipSync/Editor/DisplacementControl.cs @@ -102,12 +102,12 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } /// diff --git a/trunk/LipSync/LipSync/Editor/EditEntry.cs b/trunk/LipSync/LipSync/Editor/EditEntry.cs index 76f4f46..bc3b22c 100644 --- a/trunk/LipSync/LipSync/Editor/EditEntry.cs +++ b/trunk/LipSync/LipSync/Editor/EditEntry.cs @@ -50,7 +50,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -65,7 +65,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public float Start { diff --git a/trunk/LipSync/LipSync/Editor/EnvConfiguration.cs b/trunk/LipSync/LipSync/Editor/EnvConfiguration.cs index 338bd5a..ba266d7 100644 --- a/trunk/LipSync/LipSync/Editor/EnvConfiguration.cs +++ b/trunk/LipSync/LipSync/Editor/EnvConfiguration.cs @@ -33,12 +33,12 @@ namespace LipSync { m_config = (EnvSettings)config.Clone(); int selected = -1; - string[] t_list = Messaging.GetRegisteredLanguage(); + string[] t_list = Messaging.getRegisteredLanguage(); comboLanguage.Items.Clear(); comboLanguage.Items.Add( _DEFAULT_LANGUAGE_STRING ); foreach ( string lang in t_list ) { comboLanguage.Items.Add( lang ); - if ( lang == Messaging.Language ) { + if ( lang == Messaging.getLanguage() ) { selected = comboLanguage.Items.Count - 1; } } @@ -93,7 +93,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -141,7 +141,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } private Font ScreenFont { @@ -346,10 +346,10 @@ namespace LipSync { } private void btnReloadLanguageConfig_Click( object sender, EventArgs e ) { - Messaging.LoadMessages(); + Messaging.loadMessages(); string current_lang = m_config.Language; comboLanguage.Items.Clear(); - List list = new List( Messaging.GetRegisteredLanguage() ); + List list = new List( Messaging.getRegisteredLanguage() ); if ( !list.Contains( current_lang ) ) { current_lang = _DEFAULT_LANGUAGE_STRING; } diff --git a/trunk/LipSync/LipSync/Editor/EnvSettings.cs b/trunk/LipSync/LipSync/Editor/EnvSettings.cs index efaac18..d939c36 100644 --- a/trunk/LipSync/LipSync/Editor/EnvSettings.cs +++ b/trunk/LipSync/LipSync/Editor/EnvSettings.cs @@ -89,7 +89,7 @@ namespace LipSync { } set { m_track_height = value; - Size font_size = Misc.MeasureString( "abQBHqj", Font.GetFont() ); + Size font_size = Util.measureString( "abQBHqj", Font.GetFont() ); VerticalStringOffset = (m_track_height - font_size.Height) / 2; } } diff --git a/trunk/LipSync/LipSync/Editor/Form1.cs b/trunk/LipSync/LipSync/Editor/Form1.cs index 5654bae..061ae72 100644 --- a/trunk/LipSync/LipSync/Editor/Form1.cs +++ b/trunk/LipSync/LipSync/Editor/Form1.cs @@ -54,14 +54,14 @@ namespace LipSync { #region Static Readonly Field private static readonly AuthorListEntry[] m_credit = new AuthorListEntry[]{ - new AuthorListEntry( "is developped by:", FontStyle.Italic ), + new AuthorListEntry( "is developped by:", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry( "kbinani" ), - new AuthorListEntry( "and he thanks to:", FontStyle.Italic ), + new AuthorListEntry( "and he thanks to:", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry(), - new AuthorListEntry( "author of embedded character", FontStyle.Italic ), + new AuthorListEntry( "author of embedded character", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry( "さなり" ), new AuthorListEntry(), - new AuthorListEntry( "contributors", FontStyle.Italic ), + new AuthorListEntry( "contributors", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry( "evm" ), new AuthorListEntry( "鈴村優" ), new AuthorListEntry( "そろそろP" ), @@ -70,10 +70,10 @@ namespace LipSync { new AuthorListEntry( "NOIKE" ), new AuthorListEntry( "逃亡者" ), new AuthorListEntry(), - new AuthorListEntry( "translator", FontStyle.Italic ), + new AuthorListEntry( "translator", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry( "E-Avalance" ), new AuthorListEntry(), - new AuthorListEntry( "bugs and suggestions reporters", FontStyle.Italic ), + new AuthorListEntry( "bugs and suggestions reporters", bocoree.java.awt.Font.ITALIC ), new AuthorListEntry( "だんちゃん" ), new AuthorListEntry( "灰" ), new AuthorListEntry( "sanryo" ), @@ -88,7 +88,7 @@ namespace LipSync { new AuthorListEntry( "IGASIO" ), new AuthorListEntry( "PEX" ), new AuthorListEntry(), - new AuthorListEntry( "and you.", FontStyle.Bold | FontStyle.Italic ), + new AuthorListEntry( "and you.", bocoree.java.awt.Font.ITALIC | bocoree.java.awt.Font.BOLD ), }; private static readonly Pen HILIGHT = new Pen( Color.Gray, 2 ); private static readonly Pen HILIGHT_EDIT = new Pen( Color.Red, 2 ); @@ -268,7 +268,7 @@ namespace LipSync { this.pictureBox1.MouseWheel += new MouseEventHandler( pictureBox1_MouseWheel ); m_player = new MediaPlayer(); previewer.TrackVolumeValue = m_player.Volume; - Messaging.LoadMessages(); + Messaging.loadMessages(); LoadConfig(); this.SizeChanged += new EventHandler( Form1_LocationOrSizeChanged ); this.LocationChanged += new EventHandler( Form1_LocationOrSizeChanged ); @@ -748,7 +748,7 @@ namespace LipSync { cmenu.Items.Add( mItemImage ); cmenu.Items.Add( "-" ); } else if ( m_clicked.type == TimeTableType.plugin ) { - if ( (AppManager.SaveData.m_plugins[m_clicked.track].Instance.Type & Constants.LS_ENABLES_ENTRY_SETTING) == Constants.LS_ENABLES_ENTRY_SETTING ) { + if ( (AppManager.plugins[m_clicked.track].Instance.Type & Constants.LS_ENABLES_ENTRY_SETTING) == Constants.LS_ENABLES_ENTRY_SETTING ) { cmenu.Items.Add( _( "Plugin config. of this entry" ), null, new EventHandler( h_entrySetting ) ); cmenu.Items.Add( "-" ); } @@ -1533,7 +1533,7 @@ namespace LipSync { private void menuHelpVersionInfo_Click( object sender, EventArgs e ) { if ( m_version_form == null ) { string version_str = AppManager.VERSION + "\n\n" + - GetAssemblyNameAndVersion( typeof( Boare.Lib.AppUtil.Misc ) ) + "\n" + + GetAssemblyNameAndVersion( typeof( Boare.Lib.AppUtil.Util ) ) + "\n" + GetAssemblyNameAndVersion( typeof( Boare.Lib.Media.AviWriterVcm ) ) + "\n" + GetAssemblyNameAndVersion( typeof( Boare.Lib.Vsq.VsqFile ) ) + "\n" + #if DEBUG @@ -1543,10 +1543,16 @@ namespace LipSync { m_version_form = new Boare.Lib.AppUtil.VersionInfo( _( "LipSync" ), version_str ); m_version_form.Font = AppManager.Config.Font.GetFont(); m_version_form.AuthorList = m_credit; - m_version_form.AppNameColor = Color.RoyalBlue; - m_version_form.VersionColor = Color.DimGray; + bocoree.java.awt.Color app_name = new bocoree.java.awt.Color(); + app_name.color = Color.RoyalBlue; + m_version_form.AppNameColor = app_name; + bocoree.java.awt.Color vers = new bocoree.java.awt.Color(); + vers.color = Color.DimGray; + m_version_form.VersionColor = vers; #if !DEBUG - m_version_form.Credit = AppManager.author_list; + bocoree.java.awt.image.BufferedImage img = new bocoree.java.awt.image.BufferedImage( 1, 1, bocoree.java.awt.image.BufferedImage.TYPE_INT_RGB ); + img.m_image = AppManager.author_list; + m_version_form.Credit = img; #endif m_version_form.FormClosed += new FormClosedEventHandler( m_version_form_FormClosed ); m_version_form.Show(); @@ -1575,13 +1581,13 @@ namespace LipSync { // プラグインを読み込み //インストールされているプラグインを調べる //すべてのプラグインクラスのインスタンスを作成する - AppManager.SaveData.m_plugins = PluginInfo.FindPlugins(); + AppManager.plugins = PluginInfo.FindPlugins(); AppManager.SaveData.m_group_plugin = new TimeTableGroup( _( "Plugin" ), -1, null ); AppManager.SaveData.m_plugins_config = new List(); - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - 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 ) ) ); + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + AppManager.SaveData.m_plugins_config.Add( new PluginConfig( AppManager.plugins[i].Instance.Name, AppManager.plugins[i].Instance.Config, Path.GetFileName( AppManager.plugins[i].Location ) ) ); AppManager.SaveData.m_group_plugin.Add( new TimeTable( AppManager.SaveData.m_plugins_config[i].ID, 0, TimeTableType.plugin, null ) ); } @@ -1589,9 +1595,9 @@ namespace LipSync { * プラグインの種類に応じて、メインメニューを更新 */ // プラグイン設定 - if ( AppManager.SaveData.m_plugins.Length > 0 ) { - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_NO_EVENT_HANDLER) != Plugin.Constants.LS_NO_EVENT_HANDLER ) { + if ( AppManager.plugins.Length > 0 ) { + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_NO_EVENT_HANDLER) != Plugin.Constants.LS_NO_EVENT_HANDLER ) { menuToolPluginConfig.DropDownItems.Add( AppManager.SaveData.m_plugins_config[i].ID, null, new EventHandler( h_pluginSetting ) ); } } @@ -1599,8 +1605,8 @@ namespace LipSync { // プラグインの情報 menuHelpPluginInfo.DropDownItems.Clear(); - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - menuHelpPluginInfo.DropDownItems.Add( AppManager.SaveData.m_plugins[i].Instance.Name, null, new EventHandler( h_pluginInfo ) ); + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + menuHelpPluginInfo.DropDownItems.Add( AppManager.plugins[i].Instance.Name, null, new EventHandler( h_pluginInfo ) ); } AppManager.SaveData.m_group_vsq = new TimeTableGroup( _( "VSQ Tracks" ), -1, null ); @@ -1854,7 +1860,7 @@ namespace LipSync { if ( args.IsWaveMergeRequired ) { #region merge wave file if ( File.Exists( audio_file ) && AppManager.Config.PathFFmpeg != "" && File.Exists( AppManager.Config.PathFFmpeg ) ) { - string tmp_avi = Misc.GetTempFileNameIn( Path.GetDirectoryName( args.AviFile ), ".avi" ); + string tmp_avi = Util.GetTempFileNameIn( Path.GetDirectoryName( args.AviFile ), ".avi" ); File.Move( args.AviFile, tmp_avi ); // ffmpeg -i movie.mpeg -i audio.wav combined.avi long frames = end_frame - start_frame + 1; @@ -2006,8 +2012,8 @@ namespace LipSync { private void menuEditAddCharacter_Click( object sender, EventArgs e ) { List plugins = new List(); - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) { + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) { plugins.Add( AppManager.SaveData.m_plugins_config[i].ID ); } } @@ -2139,7 +2145,7 @@ namespace LipSync { // まず、zオーダーを設定可能なオブジェクトの個数を数える // プラグイン - count += AppManager.SaveData.m_plugins.Length; + count += AppManager.plugins.Length; bool[] b_plugins = new bool[AppManager.SaveData.m_group_plugin.Count]; for ( int i = 0; i < AppManager.SaveData.m_group_plugin.Count; i++ ) { b_plugins[i] = false; @@ -2166,7 +2172,7 @@ namespace LipSync { int[] eval = new int[count]; int[] order = new int[count]; int index = -1; - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { index++; list[index] = new ZorderItem( AppManager.SaveData.m_plugins_config[i].ID, ZorderItemType.plugin, i ); eval[index] = AppManager.SaveData.m_group_plugin[i].ZOrder; @@ -2344,7 +2350,7 @@ namespace LipSync { if ( openVsqDialog.FilterIndex == 0 || Path.GetExtension( openVsqDialog.FileName ).ToLower() == ".vsq" ) { // VsqFileを取得 int most_lyrics_track = 0; // 一番歌詞の文字数が多かったトラックの番号 - VsqFile vsqFile = new VsqFile( openVsqDialog.FileName, Encoding.GetEncoding( "Shift_JIS" ) ); + VsqFile vsqFile = new VsqFile( openVsqDialog.FileName, "Shift_JIS" ); AppManager.SaveData.m_totalSec = (float)vsqFile.getTotalSec(); AppManager.SaveData.m_timesig_ex = new List( vsqFile.TimesigTable.ToArray() ); @@ -2386,7 +2392,7 @@ namespace LipSync { } else { UstFile ust_file = new UstFile( openVsqDialog.FileName ); for ( int track = 0; track < ust_file.getTrackCount(); track++ ) { - for( Iterator itr = ust_file.getTrack( track ).getNoteEventIterator(); itr.hasNext(); ){ + for( bocoree.java.util.Iterator itr = ust_file.getTrack( track ).getNoteEventIterator(); itr.hasNext(); ){ UstEvent ue = (UstEvent)itr.next(); if ( ue.Lyric == "u" ) { ue.Lyric = "う"; @@ -3254,19 +3260,19 @@ namespace LipSync { } string lang = AppManager.Config.Language; - string[] t_list = Messaging.GetRegisteredLanguage(); + string[] t_list = Messaging.getRegisteredLanguage(); bool found = false; foreach ( string lng in t_list ) { if ( lng == lang ) { AppManager.Config.Language = lng; - Messaging.Language = lng; + Messaging.setLanguage( lng ); found = true; break; } } if ( !found ) { AppManager.Config.Language = ""; - Messaging.Language = ""; + Messaging.setLanguage( "" ); } ApplyLanguage(); UpdateFormTitle(); diff --git a/trunk/LipSync/LipSync/Editor/Form1Util.cs b/trunk/LipSync/LipSync/Editor/Form1Util.cs index 0005cf4..b9c2c3c 100644 --- a/trunk/LipSync/LipSync/Editor/Form1Util.cs +++ b/trunk/LipSync/LipSync/Editor/Form1Util.cs @@ -31,7 +31,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -219,8 +219,8 @@ namespace LipSync { property.titleLower.Text = _( "Property" ); property.ApplyLanguage(); - if ( AppManager.SaveData.m_plugins != null ) { - foreach ( PluginInfo plugin in AppManager.SaveData.m_plugins ) { + if ( AppManager.plugins != null ) { + foreach ( PluginInfo plugin in AppManager.plugins ) { plugin.Instance.ApplyLanguage( AppManager.Config.Language ); } } @@ -267,7 +267,7 @@ namespace LipSync { } AppManager.SaveData.m_totalSec = Math.Max( AppManager.SaveData.m_totalSec, (float)ust.getTotalSec() ); } else { - VsqFile vsqFile = new VsqFile( filename, Encoding.GetEncoding( "Shift_JIS" ) ); + VsqFile vsqFile = new VsqFile( filename, "Shift_JIS" ); int tracks = vsqFile.Track.Count; string[] track_names = new string[tracks]; for ( int track = 0; track < tracks; track++ ) { @@ -545,11 +545,12 @@ namespace LipSync { BinaryFormatter bf = new BinaryFormatter(); m_skip_paint = true; - List t_plugin_info = new List(); - foreach ( PluginInfo pinfo in AppManager.SaveData.m_plugins ) { + /*List t_plugin_info = new List(); // 現在の保存データに入っているプラグイン情報のリスト + foreach ( PluginInfo pinfo in AppManager.plugins ) { t_plugin_info.Add( (PluginInfo)pinfo.Clone() ); - } + }*/ + //SettingsEx old = AppManager.SaveData; object tmp = bf.Deserialize( fs ); if ( tmp.GetType() == typeof( LipSync.Settings ) ) { #if DEBUG @@ -576,13 +577,13 @@ namespace LipSync { AppManager.SaveData.m_zorder.Clear(); - int n_plugin = t_plugin_info.Count; + /*int n_plugin = t_plugin_info.Count; if ( n_plugin > 0 ) { - AppManager.SaveData.m_plugins = new PluginInfo[t_plugin_info.Count]; + AppManager.plugins = new PluginInfo[t_plugin_info.Count]; for ( int i = 0; i < t_plugin_info.Count; i++ ) { - AppManager.SaveData.m_plugins[i] = (PluginInfo)t_plugin_info[i].Clone(); + AppManager.plugins[i] = (PluginInfo)t_plugin_info[i].Clone(); } - } + }*/ AppManager.Edited = false; @@ -594,13 +595,16 @@ namespace LipSync { List tmp_ttable = new List(); List tmp_config = new List(); + + List add_ttable = new List(); //新しいプラグインが見つかった場合に,後で追加処理をするためのリスト + List add_config = new List(); // for ( int i = 0; i < AppManager.SaveData.m_plugins_config.Count; i++ ) { #if DEBUG Common.DebugWriteLine( "Form1.read(String); m_plugins_config[]; id=" + AppManager.SaveData.m_plugins_config[i].ID + "; config=" + AppManager.SaveData.m_plugins_config[i].Config ); #endif bool found = false; - for ( int j = 0; j < AppManager.SaveData.m_plugins.Length; j++ ) { - if ( AppManager.SaveData.m_plugins_config[i].ID == AppManager.SaveData.m_plugins[j].ID ) { + for ( int j = 0; j < AppManager.plugins.Length; j++ ) { + if ( AppManager.SaveData.m_plugins_config[i].ID == AppManager.plugins[j].ID ) { found = true; break; } @@ -614,6 +618,28 @@ namespace LipSync { } } + // インストールされているプラグイン(AppManager.plugin)と, + // LSEに保存されているプラグインAppManager.SaveData.m_plugins_config + // AppManager.SaveData.m_group_pluginとの整合性をとる + bool[] confirmed = new bool[AppManager.plugins.Length]; + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + PluginInfo pi = AppManager.plugins[i]; + confirmed[i] = false; + foreach ( PluginConfig pc in AppManager.SaveData.m_plugins_config ) { + if ( pi.ID == pc.ID ) { + confirmed[i] = true; + break; + } + } + } + for ( int i = 0; i < confirmed.Length; i++ ) { + if ( confirmed[i] ) { + continue; + } + add_ttable.Add( new TimeTable( AppManager.plugins[i].ID, 0, TimeTableType.plugin, null ) ); + add_config.Add( new PluginConfig( AppManager.plugins[i].ID, "" ) ); + } + // Settingsに転送 AppManager.SaveData.m_group_plugin.Clear(); AppManager.SaveData.m_plugins_config.Clear(); @@ -621,14 +647,18 @@ namespace LipSync { AppManager.SaveData.m_group_plugin.Add( (TimeTable)tmp_ttable[i].Clone() ); AppManager.SaveData.m_plugins_config.Add( tmp_config[i].Clone() ); } + for ( int i = 0; i < add_ttable.Count; i++ ) { + AppManager.SaveData.m_group_plugin.Add( add_ttable[i] ); + AppManager.SaveData.m_plugins_config.Add( add_config[i] ); + } // プラグインの全体設定を適用 - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - string id = AppManager.SaveData.m_plugins[i].ID; - AppManager.SaveData.m_plugins[i].Instance.Config = ""; + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + string id = AppManager.plugins[i].ID; + AppManager.plugins[i].Instance.Config = ""; for ( int j = 0; j < AppManager.SaveData.m_group_plugin.Count; j++ ) { if ( AppManager.SaveData.m_plugins_config[j].ID == id ) { - AppManager.SaveData.m_plugins[i].Instance.Config = AppManager.SaveData.m_plugins_config[j].Config; + AppManager.plugins[i].Instance.Config = AppManager.SaveData.m_plugins_config[j].Config; break; } } @@ -660,8 +690,8 @@ namespace LipSync { for ( int i = 0; i < m_not_used_plugin_config.Count; i++ ) { Common.DebugWriteLine( "Form1.read(String); not registered; id=" + m_not_used_plugin_config[i].ID ); } - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - Common.DebugWriteLine( "Form1.read(String); current plugin; id=" + AppManager.SaveData.m_plugins[i].ID + "; Config=" + AppManager.SaveData.m_plugins[i].Instance.Config ); + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + Common.DebugWriteLine( "Form1.read(String); current plugin; id=" + AppManager.plugins[i].ID + "; Config=" + AppManager.plugins[i].Instance.Config ); } #endif } @@ -1292,11 +1322,11 @@ namespace LipSync { float end = (float)ust_file.getSecFromClock( (int)(count + ue.Length) ); string phrase = ue.Lyric; if ( phrase != "R" ) { - string symbol = "a"; - if ( !SymbolTable.attatch( phrase, out symbol ) ) { - symbol = "a"; + bocoree.ByRef symbol = new bocoree.ByRef( "a" ); + if ( !SymbolTable.attatch( phrase, symbol ) ) { + symbol.value = "a"; } - temp.Add( new TimeTableEntry( start, end, phrase + "(" + symbol + ")" ) ); + temp.Add( new TimeTableEntry( start, end, phrase + "(" + symbol.value + ")" ) ); } count += (int)ue.Length; } @@ -1413,7 +1443,7 @@ namespace LipSync { base.WindowState = FormWindowState.Maximized; } - Messaging.Language = AppManager.Config.Language; + Messaging.setLanguage( AppManager.Config.Language ); ApplyLanguage(); // 拡張前の設定ファイルに対応 @@ -1628,7 +1658,7 @@ namespace LipSync { } public string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } private void m_text_TextChanged( object sender, EventArgs e ) { diff --git a/trunk/LipSync/LipSync/Editor/Form1_EventHandler.cs b/trunk/LipSync/LipSync/Editor/Form1_EventHandler.cs index d267851..c0bdd3f 100644 --- a/trunk/LipSync/LipSync/Editor/Form1_EventHandler.cs +++ b/trunk/LipSync/LipSync/Editor/Form1_EventHandler.cs @@ -658,14 +658,14 @@ namespace LipSync { string plugin_name = item.Text; for ( int i = 0; i < AppManager.SaveData.m_plugins_config.Count; i++ ) { if ( plugin_name == AppManager.SaveData.m_plugins_config[i].ID ) { - string old_config = AppManager.SaveData.m_plugins[i].Instance.Config; - if ( AppManager.SaveData.m_plugins[i].Instance.BaseSetting() == DialogResult.OK ) { - string new_config = AppManager.SaveData.m_plugins[i].Instance.Config; - AppManager.SaveData.m_plugins[i].Instance.Config = old_config; //ちょっとセコイなw + string old_config = AppManager.plugins[i].Instance.Config; + if ( AppManager.plugins[i].Instance.BaseSetting() == DialogResult.OK ) { + string new_config = AppManager.plugins[i].Instance.Config; + AppManager.plugins[i].Instance.Config = old_config; //ちょっとセコイなw if ( old_config != new_config ) { Command run = Command.GCommandChangePluginConfig( i, new_config ); AppManager.Register( AppManager.SaveData.Execute( run ) ); - AppManager.SaveData.m_plugins[i].Instance.Config = new_config; + AppManager.plugins[i].Instance.Config = new_config; AppManager.Edited = true; } } @@ -678,7 +678,7 @@ namespace LipSync { int track = m_clicked.track; int entry = m_clicked.entry; string current = AppManager.SaveData.m_group_plugin[track][entry].body; - if ( AppManager.SaveData.m_plugins[track].Instance.EntrySetting( ref current ) == DialogResult.OK ) { + if ( AppManager.plugins[track].Instance.EntrySetting( ref current ) == DialogResult.OK ) { using ( TimeTableEntry tmp = new TimeTableEntry( AppManager.SaveData.m_group_plugin[track][entry].begin, AppManager.SaveData.m_group_plugin[track][entry].end, current ) ) { Command run = Command.GCommandEditTimeTableEntry( TimeTableType.plugin, -1, track, entry, tmp ); AppManager.Register( AppManager.SaveData.Execute( run ) ); @@ -901,8 +901,8 @@ namespace LipSync { return; } List plugins = new List(); - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - if ( (AppManager.SaveData.m_plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) { + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + if ( (AppManager.plugins[i].Instance.Type & Plugin.Constants.LS_TYPE_CHARACTER) == Plugin.Constants.LS_TYPE_CHARACTER ) { plugins.Add( AppManager.SaveData.m_plugins_config[i].ID ); } } @@ -1044,8 +1044,8 @@ namespace LipSync { } } if ( index >= 0 ) { - if ( AppManager.SaveData.m_plugins[index].Instance.BaseSetting() == DialogResult.OK ) { - Command run = Command.GCommandChangePluginConfig( index, AppManager.SaveData.m_plugins[index].Instance.Config ); + if ( AppManager.plugins[index].Instance.BaseSetting() == DialogResult.OK ) { + Command run = Command.GCommandChangePluginConfig( index, AppManager.plugins[index].Instance.Config ); AppManager.Register( AppManager.SaveData.Execute( run ) ); AppManager.Edited = true; } @@ -1138,14 +1138,14 @@ namespace LipSync { private void h_pluginInfo( object sender, EventArgs e ) { ToolStripMenuItem c_sender = (ToolStripMenuItem)sender; int index = -1; - for ( int i = 0; i < AppManager.SaveData.m_plugins.Length; i++ ) { - if ( AppManager.SaveData.m_plugins[i].Instance.Name == c_sender.Text ) { + for ( int i = 0; i < AppManager.plugins.Length; i++ ) { + if ( AppManager.plugins[i].Instance.Name == c_sender.Text ) { index = i; break; } } if ( index >= 0 ) { - VersionBox info = new VersionBox( AppManager.SaveData.m_plugins[index].Instance.Name, AppManager.SaveData.m_plugins[index].Instance.Abstract ); + VersionBox info = new VersionBox( AppManager.plugins[index].Instance.Name, AppManager.plugins[index].Instance.Abstract ); info.ShowDialog(); info.Dispose(); } diff --git a/trunk/LipSync/LipSync/Editor/FormCommandHistory.cs b/trunk/LipSync/LipSync/Editor/FormCommandHistory.cs index 4668e53..2749fda 100644 --- a/trunk/LipSync/LipSync/Editor/FormCommandHistory.cs +++ b/trunk/LipSync/LipSync/Editor/FormCommandHistory.cs @@ -55,7 +55,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -77,7 +77,7 @@ namespace LipSync { } private static string _( string id ) { - return Messaging.GetMessage( id ); + return Messaging.getMessage( id ); } private void SettingsEx_CommandExecuted( TimeTableType command_target, CommandType command_type ) { diff --git a/trunk/LipSync/LipSync/Editor/FormObjectList.cs b/trunk/LipSync/LipSync/Editor/FormObjectList.cs index f8bb231..4e7462c 100644 --- a/trunk/LipSync/LipSync/Editor/FormObjectList.cs +++ b/trunk/LipSync/LipSync/Editor/FormObjectList.cs @@ -21,7 +21,7 @@ namespace LipSync { ListView m_listview; public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } protected override void WndProc( ref Message m ) { diff --git a/trunk/LipSync/LipSync/Editor/FormPreview.cs b/trunk/LipSync/LipSync/Editor/FormPreview.cs index 12fc37a..4b43c11 100644 --- a/trunk/LipSync/LipSync/Editor/FormPreview.cs +++ b/trunk/LipSync/LipSync/Editor/FormPreview.cs @@ -70,7 +70,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } diff --git a/trunk/LipSync/LipSync/Editor/FormSeriesImage.cs b/trunk/LipSync/LipSync/Editor/FormSeriesImage.cs index 87f302d..4f950d7 100644 --- a/trunk/LipSync/LipSync/Editor/FormSeriesImage.cs +++ b/trunk/LipSync/LipSync/Editor/FormSeriesImage.cs @@ -36,7 +36,7 @@ namespace LipSync { foreach ( PropertyInfo pi in properties ) { if ( pi.PropertyType.Equals( typeof( System.Drawing.Imaging.ImageFormat ) ) ) { System.Drawing.Imaging.ImageFormat ifm = (System.Drawing.Imaging.ImageFormat)pi.GetValue( null, null ); - string ext = Misc.GetExtensionFromImageFormat( ifm ); + string ext = Util.GetExtensionFromImageFormat( ifm ); if ( ext.Length > 0 ) { i++; comboFormat.Items.Add( pi.Name ); @@ -54,14 +54,14 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } public string ParserString { get { if ( chkAutomaticallyAddExtension.Checked ) { - return txtParser.Text + Misc.GetExtensionFromImageFormat( ImageFormat ); + return txtParser.Text + Util.GetExtensionFromImageFormat( ImageFormat ); } else { return txtParser.Text; } @@ -112,7 +112,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public float Start { @@ -194,7 +194,7 @@ namespace LipSync { private void UpdateSampleFileNames() { string ret = _( "Sample File Name" ) + Environment.NewLine; System.Drawing.Imaging.ImageFormat ifm = ImageFormat; - string ext = Misc.GetExtensionFromImageFormat( ifm ); + string ext = Util.GetExtensionFromImageFormat( ifm ); string parser = ParserString; try { ret += string.Format( parser, 0 ) + Environment.NewLine; diff --git a/trunk/LipSync/LipSync/Editor/FormSetFrameRate.cs b/trunk/LipSync/LipSync/Editor/FormSetFrameRate.cs index 32acf77..d606293 100644 --- a/trunk/LipSync/LipSync/Editor/FormSetFrameRate.cs +++ b/trunk/LipSync/LipSync/Editor/FormSetFrameRate.cs @@ -51,12 +51,12 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public void ApplyLanguage() { diff --git a/trunk/LipSync/LipSync/Editor/FormVocalomark.cs b/trunk/LipSync/LipSync/Editor/FormVocalomark.cs index c6ae596..7917447 100644 --- a/trunk/LipSync/LipSync/Editor/FormVocalomark.cs +++ b/trunk/LipSync/LipSync/Editor/FormVocalomark.cs @@ -72,7 +72,7 @@ namespace LipSync { } private static string _( string id ) { - return Messaging.GetMessage( id ); + return Messaging.getMessage( id ); } public void ApplyLanguage() { @@ -90,7 +90,7 @@ namespace LipSync { } public void ApplyFont( Font font ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( this, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( this, font ); } public KeyValuePair[] Assignment { diff --git a/trunk/LipSync/LipSync/Editor/GenerateCharacter.cs b/trunk/LipSync/LipSync/Editor/GenerateCharacter.cs index d618445..247fd02 100644 --- a/trunk/LipSync/LipSync/Editor/GenerateCharacter.cs +++ b/trunk/LipSync/LipSync/Editor/GenerateCharacter.cs @@ -129,12 +129,12 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public TimeTableGroup EditedResult { diff --git a/trunk/LipSync/LipSync/Editor/InputBox.cs b/trunk/LipSync/LipSync/Editor/InputBox.cs index 737a15e..7792d59 100644 --- a/trunk/LipSync/LipSync/Editor/InputBox.cs +++ b/trunk/LipSync/LipSync/Editor/InputBox.cs @@ -28,7 +28,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } diff --git a/trunk/LipSync/LipSync/Editor/PasteModeDialog.cs b/trunk/LipSync/LipSync/Editor/PasteModeDialog.cs index f48e14c..f96a265 100644 --- a/trunk/LipSync/LipSync/Editor/PasteModeDialog.cs +++ b/trunk/LipSync/LipSync/Editor/PasteModeDialog.cs @@ -37,7 +37,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -49,7 +49,7 @@ namespace LipSync { } public static string gettext( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } new public PasteModeDialogResult DialogResult { diff --git a/trunk/LipSync/LipSync/Editor/Previewer.cs b/trunk/LipSync/LipSync/Editor/Previewer.cs index b206a3c..d8bb59e 100644 --- a/trunk/LipSync/LipSync/Editor/Previewer.cs +++ b/trunk/LipSync/LipSync/Editor/Previewer.cs @@ -48,7 +48,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public void ApplyLanguage() { diff --git a/trunk/LipSync/LipSync/Editor/Property.cs b/trunk/LipSync/LipSync/Editor/Property.cs index 0cfa3a8..c361983 100644 --- a/trunk/LipSync/LipSync/Editor/Property.cs +++ b/trunk/LipSync/LipSync/Editor/Property.cs @@ -82,7 +82,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public static Property Instance { diff --git a/trunk/LipSync/LipSync/Editor/RipSync/RsiWriter.cs b/trunk/LipSync/LipSync/Editor/RipSync/RsiWriter.cs index 7fa119c..81cec7d 100644 --- a/trunk/LipSync/LipSync/Editor/RipSync/RsiWriter.cs +++ b/trunk/LipSync/LipSync/Editor/RipSync/RsiWriter.cs @@ -158,7 +158,7 @@ namespace LipSync { #endregion public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } /// diff --git a/trunk/LipSync/LipSync/Editor/RipSync/RspImporter.cs b/trunk/LipSync/LipSync/Editor/RipSync/RspImporter.cs index 53ac631..c3591c7 100644 --- a/trunk/LipSync/LipSync/Editor/RipSync/RspImporter.cs +++ b/trunk/LipSync/LipSync/Editor/RipSync/RspImporter.cs @@ -75,7 +75,7 @@ namespace LipSync { private static string sound_file; public static string gettext( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } diff --git a/trunk/LipSync/LipSync/Editor/SelectCharacter.cs b/trunk/LipSync/LipSync/Editor/SelectCharacter.cs index 55a0be1..756933e 100644 --- a/trunk/LipSync/LipSync/Editor/SelectCharacter.cs +++ b/trunk/LipSync/LipSync/Editor/SelectCharacter.cs @@ -43,7 +43,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -60,7 +60,7 @@ namespace LipSync { } private static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public string Path { diff --git a/trunk/LipSync/LipSync/Editor/SetSize.cs b/trunk/LipSync/LipSync/Editor/SetSize.cs index d8bf04e..c8cd3f4 100644 --- a/trunk/LipSync/LipSync/Editor/SetSize.cs +++ b/trunk/LipSync/LipSync/Editor/SetSize.cs @@ -72,12 +72,12 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public T ResultWidth { diff --git a/trunk/LipSync/LipSync/Editor/Settings.cs b/trunk/LipSync/LipSync/Editor/Settings.cs index 4ca1952..c22b4ca 100644 --- a/trunk/LipSync/LipSync/Editor/Settings.cs +++ b/trunk/LipSync/LipSync/Editor/Settings.cs @@ -80,7 +80,7 @@ namespace LipSync { public int m_command_position = -1; public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public Settings() { diff --git a/trunk/LipSync/LipSync/Editor/SettingsEx.cs b/trunk/LipSync/LipSync/Editor/SettingsEx.cs index edf315e..edd4c84 100644 --- a/trunk/LipSync/LipSync/Editor/SettingsEx.cs +++ b/trunk/LipSync/LipSync/Editor/SettingsEx.cs @@ -57,8 +57,6 @@ namespace LipSync { public uint m_dwScale = 1; [NonSerialized] private float m_fps_buffer = 30f; - [NonSerialized] - public PluginInfo[] m_plugins; [OptionalField] public List m_telop_ex2 = new List(); [OptionalField] @@ -74,7 +72,7 @@ namespace LipSync { public static event CommandExecutedEventHandler CommandExecuted; private static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public void DrawTo( Graphics g, Size mSize, float now, bool is_transparent ) { @@ -182,7 +180,7 @@ namespace LipSync { s += "\n" + draw[i]; } } - m_plugins[target_plugin].Instance.Render( g, mSize, now, s, "" ); + AppManager.plugins[target_plugin].Instance.Render( g, mSize, now, s, "" ); } continue; } @@ -197,7 +195,7 @@ namespace LipSync { #endif tmp = new Bitmap( mSize.Width, mSize.Height ); TimeTableEntry tmptt = m_group_plugin[index][entry]; - m_plugins[index].Instance.Apply( ref tmp, now, tmptt.begin, tmptt.end, ref tmptt.body ); + AppManager.plugins[index].Instance.Apply( ref tmp, now, tmptt.begin, tmptt.end, ref tmptt.body ); m_group_plugin[index][entry] = tmptt; size = mSize; position = new PointF( 0f, 0f ); @@ -957,7 +955,7 @@ namespace LipSync { if ( command.group >= 0 ) { m_groups_character[command.group].Character.PluginConfig.Config = command.str; } - m_plugins[command.track].Instance.Config = command.str; + AppManager.plugins[command.track].Instance.Config = command.str; break; case CommandType.changeFps: ret = Command.GCommandChangeFps( m_dwRate, m_dwScale ); diff --git a/trunk/LipSync/LipSync/Editor/Telop.cs b/trunk/LipSync/LipSync/Editor/Telop.cs index eeadd0d..53e1252 100644 --- a/trunk/LipSync/LipSync/Editor/Telop.cs +++ b/trunk/LipSync/LipSync/Editor/Telop.cs @@ -116,7 +116,7 @@ namespace LipSync { int count = 0; for ( int j = 0; j < i; j++ ) { if ( list[j].Lane == index ){ - if ( Boare.Lib.AppUtil.Misc.IsOverwrapped( list[i].Start, list[i].End, list[j].Start, list[j].End ) ) { + if ( Boare.Lib.AppUtil.Util.IsOverwrapped( list[i].Start, list[i].End, list[j].Start, list[j].End ) ) { count++; break; } @@ -193,7 +193,7 @@ namespace LipSync { mc_scale.Color = Common.CURVE_SCALE; mc_alpha.Color = Common.CURVE_ALPHA; if ( m_font != null ) { - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font ); + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font ); } } @@ -211,7 +211,7 @@ namespace LipSync { m_default_font = new Font( "MS UI Gothic", 18 ); m_font = (Font)m_default_font.Clone(); } - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font ); + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font ); m_id = id; m_fore_color = m_telop_default_color; } @@ -357,7 +357,7 @@ namespace LipSync { set { m_text = value; if ( m_font != null ) { - m_size = Boare.Lib.AppUtil.Misc.MeasureString( this.m_text, this.m_font ); + m_size = Boare.Lib.AppUtil.Util.measureString( this.m_text, this.m_font ); } else { m_size = new Size(); } @@ -400,7 +400,7 @@ namespace LipSync { m_font = value; m_default_font = (Font)m_font.Clone(); if ( m_font != null ) { - m_size = Boare.Lib.AppUtil.Misc.MeasureString( m_text, m_font ); + m_size = Boare.Lib.AppUtil.Util.measureString( m_text, m_font ); } else { m_size = new Size(); } diff --git a/trunk/LipSync/LipSync/Editor/TrackSelecter.cs b/trunk/LipSync/LipSync/Editor/TrackSelecter.cs index bc9d231..4540d83 100644 --- a/trunk/LipSync/LipSync/Editor/TrackSelecter.cs +++ b/trunk/LipSync/LipSync/Editor/TrackSelecter.cs @@ -38,7 +38,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -50,7 +50,7 @@ namespace LipSync { } public string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public bool ImportTempoAndTimesig { diff --git a/trunk/LipSync/LipSync/Editor/VersionBox.cs b/trunk/LipSync/LipSync/Editor/VersionBox.cs index efd30a6..c6016f1 100644 --- a/trunk/LipSync/LipSync/Editor/VersionBox.cs +++ b/trunk/LipSync/LipSync/Editor/VersionBox.cs @@ -29,7 +29,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } diff --git a/trunk/LipSync/LipSync/Editor/Winker.cs b/trunk/LipSync/LipSync/Editor/Winker.cs index 0ac0c46..911986c 100644 --- a/trunk/LipSync/LipSync/Editor/Winker.cs +++ b/trunk/LipSync/LipSync/Editor/Winker.cs @@ -52,7 +52,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -71,7 +71,7 @@ namespace LipSync { } private static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public float WinkInterval { diff --git a/trunk/LipSync/LipSync/Editor/ZOrder.cs b/trunk/LipSync/LipSync/Editor/ZOrder.cs index b812b31..6363d88 100644 --- a/trunk/LipSync/LipSync/Editor/ZOrder.cs +++ b/trunk/LipSync/LipSync/Editor/ZOrder.cs @@ -34,7 +34,7 @@ namespace LipSync { public void ApplyFont( Font font ) { this.Font = font; foreach ( Control c in this.Controls ) { - Boare.Lib.AppUtil.Misc.ApplyFontRecurse( c, font ); + Boare.Lib.AppUtil.Util.applyFontRecurse( c, font ); } } @@ -48,7 +48,7 @@ namespace LipSync { } public static string _( string s ) { - return Messaging.GetMessage( s ); + return Messaging.getMessage( s ); } public void itemAdd( ZorderItem item ) { diff --git a/trunk/LipSync/OverlayImpeller/OverlayImpeller.cs b/trunk/LipSync/OverlayImpeller/OverlayImpeller.cs index 2cce77d..30c0675 100644 --- a/trunk/LipSync/OverlayImpeller/OverlayImpeller.cs +++ b/trunk/LipSync/OverlayImpeller/OverlayImpeller.cs @@ -15,10 +15,10 @@ public class OverlayImpeller : IPlugin { /// エントリの終了時刻 /// エントリの設定値 public void Apply( ref Bitmap frame, float time, float e_begin, float e_end, ref string e_body ) { - double rpm = 11.5821; - int centerx = 135; - int centery = 135; - int impeller_diameter = 153; + double rpm = 12.4; + int centerx = 144; + int centery = 144; + int impeller_diameter = 163; int impeller_height_half = 12; double theta0 = 0.0; diff --git a/trunk/LipSync/lang2po/Program.cs b/trunk/LipSync/lang2po/Program.cs index 2563939..fdcfcde 100644 --- a/trunk/LipSync/lang2po/Program.cs +++ b/trunk/LipSync/lang2po/Program.cs @@ -16,8 +16,8 @@ namespace Boare { Console.WriteLine( "error; file \"" + result + "\" already exists." ); return; } - Messaging.AppendFromFile( "template.po" ); - Messaging.Language = "template"; + Messaging.appendFromFile( "template.po" ); + Messaging.setLanguage( "template" ); Dictionary dict = new Dictionary(); using ( StreamReader sr = new StreamReader( name ) ) { string line; @@ -61,9 +61,9 @@ namespace Boare { sw.WriteLine( "\"X-Poedit-SearchPath-0: Editor\\n\"" ); sw.WriteLine( "\"X-Poedit-SearchPath-1: Common\\n\"" ); sw.WriteLine( "\"X-Poedit-SearchPath-2: AviFile\\n\"" ); - string[] keys = Messaging.GetKeys( "template" ); + string[] keys = Messaging.getKeys( "template" ); foreach ( string key in keys ) { - string oldid = Messaging.GetMessage( key ); + string oldid = Messaging.getMessage( key ); if ( dict.ContainsKey( oldid ) ) { string item = dict[oldid]; item = item.Replace( "\"", "\\\"" );