public void CreateFieldsManager()
 {
     fieldsManager     = new FieldsManager(new FieldsRepository(DBContext));
     tablesManager     = new TablesManager(new TablesRepository(DBContext));
     schemasManager    = new SchemasManager(new SchemasRepository(DBContext));
     databasesManager  = new PostgresDatabasesManager(new PostgresDatabasesRepository(DBContext));
     datastoresManager = new DatastoresManager(new DatastoresRepository(DBContext));
 }
Example #2
0
    public TaskSolution Solve(DiffMethod method, double a, double b, int n)
    {
        TablesManager manager = new TablesManager();

        t0Table    = manager.T0Table;
        mTable     = manager.MTable;
        nTable     = manager.NTable;
        sigmaTable = manager.SigmaTable;

        DiffEquationSys deSys = null;

        switch (method)
        {
        case DiffMethod.RungeKutta:
            deSys = new RungeKuttaDiffEquationSys(new DiffEquationSys.SeveralArgFun[]
            {
                (x, y) => ((y[1] - (Rk + Rp(y[0])) * y[0]) / Lk),
                (x, y) => (-y[0] / Ck)
            });
            break;

        case DiffMethod.ImplTrap:
            deSys = new ImplTrapDiffEquationSys(new DiffEquationSys.SeveralArgFun[]
            {
                (x, y) => ((y[1] - (Rk + Rp(y[0])) * y[0]) / Lk),
                (x, y) => (-y[0] / Ck)
            });
            break;
        }

        DiffEquationSolution[] sysSolution = deSys.FindSolution(a, b, new double[] { I0, Uc0 }, n);
        DiffEquationSolution   rpSolution  = new DiffEquationSolution(a, b, n);

        for (int i = 0; i <= n; i++)
        {
            rpSolution.Y[i] = Rp(sysSolution[0].Y[i]);
        }
        DiffEquationSolution ucpSolution = new DiffEquationSolution(a, b, n);

        for (int i = 0; i <= n; i++)
        {
            ucpSolution.Y[i] = rpSolution.Y[i] * sysSolution[0].Y[i];
        }

        TaskSolution taskSolution;

        taskSolution.I   = sysSolution[0];
        taskSolution.Uc  = sysSolution[1];
        taskSolution.Rp  = rpSolution;
        taskSolution.Ucp = ucpSolution;

        return(taskSolution);
    }
Example #3
0
        void UnregisterHandlers()
        {
            TablesManager tablesManager = Program.TablesManager;

            tablesManager.BeginTableProcessing -= BeginTableProcessing_Handler;
            tablesManager.EndTableProcessing -= EndTableProcessing_Handler;
            tablesManager.GetDataProvider(TablesID.COUNTRY).SourceCleared -= Countries_SourceCleared;
            tablesManager.GetDataProvider(TablesID.INCOTERM).SourceCleared -= Incoterms_SourceCleared;
            tablesManager.GetDataProvider(TablesID.PRODUCT).SourceCleared -= Products_SourceCleared;

            AutoUpdater.BeginTableUpdate -= BeginTableProcessing_Handler;
            AutoUpdater.EndTableUpdate -= EndTableProcessing_Handler;            
        }
Example #4
0
        private static void Main(string[] args)
        {
            const string conn        = @"Data Source=.;Initial Catalog=CommonMasterData;Integrated Security=True;MultipleActiveResultSets=True";
            const string contentFile = @"P:\SVN\TUEVSUED\src\Tools\CodeGeneration\Data\FE Stammdaten.xlsx";


            //var migration = new DataMigration(@"P:\SVN\TUEVSUED\src\MasterDataModule.Generation\MasterDataModule\Generation\MasterDataModule.Generation\Declarations\Original");
            //migration.Migrate();

            var timer = Stopwatch.StartNew();

            #region Legacy
            //var stamdattenTableNames = DataSheetManager.Read(contentFile, TableDescriptor.GetRead("Tables{T}", 2)).Tables[0].Rows.Cast<DataRow>().Select(row => row[1].ToString()).ToArray();

            //var loader = MSSQLLoadManager<TableContent, ColumnContent>.Instance.GetDatabaseLoader(Connection);
            //var tables = loader.Load(tableFilter: table => !table.IsView && table.Schema == "DATA" && stamdattenTableNames.Contains(table.Name));

            //var contentLoader = MSSQLLoadManager<TableContent, ColumnContent>.Instance.GetContentLoader(tables);
            //contentLoader.Load(contentFile);

            //var entityLoader = MSSQLManager<TableContent, ColumnContent>.Instance.GetEntityLoader(
            //    new EntityExtractor());

            //var entities = entityLoader.Load(tables);

            //NOTE: Create template
            //contentLoader.CreateDefaultTemplate(@"p:\cool.xlsx", ContentLoadType.Column);
            #endregion
            var tablesManager = TablesManager.LoadFromDatabase(conn);
            var tables        = tablesManager.Load(contentFile);

            var entityManager = EntitiesManager.Create();
            var entities      = entityManager.Load(tables);



            timer.Stop();
        }
Example #5
0
        static void Main()
        {
            bool created;

            m_mtx = new Mutex(true, @"Global\HUB_BoumekouezKhaled", out created);

            if (!created)
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            try
            {
                using (m_runOnceManager = new RunOnce.RunOnceManager())
                    using (m_settings = new SettingsManager())
                    {
                        var ssEngin = new Jobs.SplashScreenEngin();
                        ssEngin.Start();

                        if (!Directory.Exists(SettingsManager.AppDataFolder))
                        {
                            Directory.CreateDirectory(SettingsManager.AppDataFolder);
                        }

                        if (!Directory.Exists(SettingsManager.UserDataFolder))
                        {
                            Directory.CreateDirectory(SettingsManager.UserDataFolder);
                        }

                        if (!Directory.Exists(SettingsManager.TablesFolder))
                        {
                            Directory.CreateDirectory(SettingsManager.TablesFolder);
                        }

                        if (!Directory.Exists(SettingsManager.DialogFolder))
                        {
                            Directory.CreateDirectory(SettingsManager.DialogFolder);
                        }

                        if (Settings.AutoDetectProxy)
                        {
                            ssEngin.FeedbackText = "Détection des paramètres du serveur proxy...";

                            IProxy proxy = Proxy.DetectProxy();

                            if ((Settings.EnableProxy = proxy != null))
                            {
                                Settings.ProxyHost = proxy.Host;
                                Settings.ProxyPort = proxy.Port;
                            }

                            ssEngin.FeedbackText = "Détection des paramètres du serveur proxy terminée.";
                        }

                        ssEngin.FeedbackText = "Exécution de tâches RunOnce...";
                        m_runOnceManager.Run();
                        ssEngin.FeedbackText = "Exécution de tâches RunOnce terminée.";

                        ssEngin.FeedbackText = "Démarrage en cours...";
                        using (m_tblManager = new TablesManager())
                            using (m_dlgManager = new DLG.DialogManager())
                            {
                                m_mainWindow         = new MainWindow();
                                ssEngin.FeedbackText = "Merci d'utiliser le HUB de la valeur en douanes.";
                                Thread.Sleep(2000);

                                m_mainWindow.Shown += delegate { ssEngin.Dispose(); };

                                Application.Run(m_mainWindow);
                                m_mainWindow = null;
                            }

                        Log.LogEngin.Dispose();
                    }
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Une erreur fatale c’est produite:\n{ex.Message}\nCliquez sur OK pour fermer l'apliaction.",
                                null,
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                if (m_mtx != null)
                {
                    m_mtx.ReleaseMutex();
                    m_mtx.Dispose();
                }
            }

            if (m_restarting)
            {
                Application.Restart();
            }
        }
Example #6
0
        public LightStartForm(LoginForm tLoginForm)
        {
            InitializeComponent();

            LoginForm = tLoginForm;

            TM = new TablesManager();

            MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            //CurrentTimeLabel.Text = DateTime.Now.ToString("HH:mm");
            //CurrentDayOfWeekLabel.Text = DateTime.Now.ToString("dddd");
            //CurrentDayMonthLabel.Text = DateTime.Now.ToString("dd MMMM");

            AnimateTimer.Enabled = true;

            UserLabel.Text = Security.CurrentUserRName;

            //UpdatesPanel.Width = UserPanel.Left - UpdatesPanel.Left - 5;

            PhotoBox.Image = UserProfile.GetUserPhoto();

            InfiniumStart = new Infinium.InfiniumStart();
            InfiniumTilesContainer.ItemsDataTable = InfiniumStart.ModulesDataTable;
            InfiniumTilesContainer.MenuItemID     = 0;
            InfiniumTilesContainer.InitializeItems();

            ActiveNotifySystem = new Infinium.ActiveNotifySystem();
            InfiniumNotifyList.ModulesDataTable = InfiniumStart.FullModulesDataTable;

            InfiniumStartMenu.ItemsDataTable = InfiniumStart.MenuItemsDataTable;
            InfiniumStartMenu.InitializeItems();
            InfiniumStartMenu.Selected = 0;

            InfiniumMinimizeList.ModulesDataTable = InfiniumStart.FullModulesDataTable;

            if (InfiniumStart.ModulesDataTable.Select("MenuItemID = 0").Count() == 0)
            {
                InfiniumStartMenu.Selected = 1;
            }

            TopForm = null;
            if (TopForm != null)
            {
                OnLineControl.IamOnline(ActiveNotifySystem.GetModuleIDByForm(TopForm.Name), true);
            }
            else
            {
                OnLineControl.IamOnline(0, true);
            }

            OnLineControl.SetOffline();

            NotifyRefreshT = new NotifyRefresh(FuckingNotify);
            OnlineFuck     = new OnlineFuckingDelegate(GetTopMostAndModuleName);

            NotifyThread = new Thread(delegate() { NotifyCheck(); });
            NotifyThread.Start();

            while (!SplashForm.bCreated)
            {
                ;
            }
        }