align="justify"> налаштування сістемиreadonly UniversalSettingsINI settings; DataService _dataservice; int _usermod; int _accaunt;
# endregionAppContext ()
{ SectionsKeylist=new List ();. Add (new SectionKey («Connection», «Main»));. Add (new SectionKey («Connection», «Reserv»));=new UniversalSettingsINI ( );. SectionKeys=SectionsKeylist;. ModuleName=System.IO.Path.GetFullPath («conf.ini»);
/ / отримуємо базові настройки
{. Load ();
}
{
}
_dataservice=new DataService ();
_container=new UnityContainer (); (_container);
_dataservice.MainConnectionString=settings.Getbykey («Main»);
_dataservice.BackConnectionString=settings.Getbykey («Reserv»);
} void InitAll ()
{
} void ConfigureContainer (IUnityContainer container)
{
{
_dataservice.ConfigureContainer(container);.RegisterInstance<IUniversalSettings>(settings);.RegisterInstance<IAppContext>(this, new ExternallyControlledLifetimeManager ());. RegisterType (new ContainerControlledLifetimeManager ());
} (Exception ex)
{
}
}
# region IAppContext MembersIUnityContainer Container
{{return _container; }
} IsysMsg SysMsg
{{return _container.Resolve (); }
} DataService DataService
{{return _container.Resolve (); }
} IUniversalSettings Settings
{{return _container.Resolve (); }
{. Clear ();
_container.RegisterInstance (value);
}
} int UserMode
{{return _usermod; } {_usermod=Value; }
} int AccountID
{{return _accaunt; } {_accaunt=Value; }
}
# endregion
# region IDisposable Membersvoid Dispose ()
{new NotImplementedException ();
}
# endregion
}
}
{Модуль плагіна груп машин} Avto.PluginHandbook
{class Brand_machineControlPlugin: IHandbookPlugins
{IAppContext _Appcontext; string Name
{{return «Brand_machineControl»; }
} System.Windows.Controls.UserControl CreateControl (IAppContext Appcontext)
{
_Appcontext=Appcontext; new Brand_machineControl (_Appcontext);
} IAppContext Appcontext
{
{_Appcontext;
}
{
_Appcontext=valu...