static void Body( ) { #region Initialize Program Log.Init( ); InitDirectories( ); var setting = new INIParser("Globals.ini"); var AuthData = "Authenticate"; string consumerKey = setting.GetValue(AuthData, "ConsumerKey"); string consumerSecret = setting.GetValue(AuthData, "CconsumerSecret"); string accessToken = setting.GetValue(AuthData, "AccessToken"); string accessSecret = setting.GetValue(AuthData, "AccessSecret"); if ( string.IsNullOrEmpty(consumerKey) || string.IsNullOrEmpty(consumerSecret) || string.IsNullOrEmpty(accessToken) || string.IsNullOrEmpty(accessSecret)) { Log.Error(LogHeader, "유저 인증 정보를 찾을 수 없습니다. 토큰 발급 창으로 이동합니다."); var frm = new Display.Authenticate(); frm.ShowDialog( ); if (frm.Result == true) { } else { Log.Error(LogHeader, "유저 인증에 실패했습니다. 프로그램을 종료합니다."); Exit( ); return; } } else { //TODO: User가 null일 경우의 대처 Globals.Instance.Initialize(consumerKey, consumerSecret, accessToken, accessSecret); } #endregion SetDebugParams( ); Globals.Instance.OwnerID = long.Parse(setting.GetValue("AppInfo", "OwnerID")); StringSetsManager.LoadStringsets("Stringsets"); ModuleManager.Initialize( ); ModuleManager.LoadAllModules("Modules"); new Display.AppConsole( ).ShowDialog( ); foreach (var module in ModuleManager.Modules) { var parser = new INIParser(Path.Combine("Modules", module.Name + ".ini")); module.SaveSettings(parser); parser.Save( ); } Exit( ); }
private void button_stringset_reload_click(object sender, EventArgs e) { StringSetsManager.ClearStringSets( ); StringSetsManager.LoadStringsets( ); }