protected AbstractLayoutStoreWorkerContainer(Control window, IList<ILayoutDataStore> stores, ILayoutDataStorePathFactory layoutDataStorePathFactory)
        {
            stores = stores ?? new List<ILayoutDataStore>();

            stores.Add(new WindowLayoutStore(window));
            worker = new LayoutStoreWorker(layoutDataStorePathFactory, window.Name, stores);
            LayoutStoreSupportUtils.Load(worker);
        }
 public override void SetUI4LoadDefault(ILayoutStoreWorker lsworker)
 {
     base.SetUI4LoadDefault(lsworker);
     DataGrid grid = (DataGrid) entity;
     ContextMenu menu = grid.ContextMenu;
     if (menu == null)
         menu = new ContextMenu();
     menu.Items.Add(GetLoadDefaultMenuItem());
     grid.ContextMenu = menu;
     grid.MouseRightButtonDown += grid_MouseRightButtonDown;
 }
 public LayoutStoreWorkerContainer(string name, IList<ILayoutDataStore> stores, ILayoutDataStorePathFactory layoutDataStorePathFactory)
 {
     worker = new LayoutStoreWorker(layoutDataStorePathFactory, name, stores);
     LayoutStoreSupportUtils.Load(worker);
 }
 public static void Close(ILayoutStoreWorker worker)
 {
     if (worker != null) worker.Save();
 }
 public static void Load(ILayoutStoreWorker worker)
 {
     if (worker == null) return;
     worker.Init();
 }
 /// <summary>
 /// set control for User Interface loading layout data by default
 /// </summary>
 /// <param name="lsworker">object with method LoadDefaultLayout or semi method</param>
 public virtual void SetUI4LoadDefault(ILayoutStoreWorker lsworker)
 {
     worker = lsworker;
 }
Exemplo n.º 7
0
 public override void SetUI4LoadDefault(ILayoutStoreWorker lsworker)
 {
     worker = lsworker;
     //http://pietschsoft.com/post/2008/03/Add-System-Menu-Items-to-WPF-Window-using-Win32-API.aspx
     ((Window) entity).Loaded += WindowLayoutStore_Loaded;
 }