static public SimulateVariableUnit Create(string _name, string type = "") { SimulateVariableUnit result = null; SpecialValue svalue = SpecialValueManager.ValueOfName(_name); if (svalue != null) { type = svalue.Type; } if (type.Length == 0) { result = _Create(_name); } else { result = _Create(_name, type); } if (result == null) { return(result); } if (svalue != null) { SimulateSpecialUnit ssunit = new SimulateSpecialUnit( result, svalue.CanRead, svalue.CanWrite); ssunit.Var = svalue.NickName; return(ssunit); } return(result); }
public App() { splashScreen = new SplashScreen(@"Resources\Image\SplashScreen.png"); splashScreen.Show(false, true); InitializeComponent(); SpecialValueManager.Initialize(); ValueCommentManager.Initialize(); ValueAliasManager.Initialize(); SettingManager.Load(); if (GlobalSetting.IsOpenLSetting && GlobalSetting.LanagArea != string.Empty) { Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(GlobalSetting.LanagArea); } Exit += App_Exit; Startup += App_Startup; DispatcherUnhandledException += App_DispatcherUnhandledException; }