Example #1
0
 public ScreenshotsController(ILogger <ScreenshotsController> logger, ILoadData loadData, IOptions <ImageConfigModel> imageConfig, IExecute executeTask)
 {
     _Logger      = logger;
     _LoadData    = loadData;
     _ImageConfig = imageConfig;
     _ExecuteTask = executeTask;
 }
Example #2
0
        private void LoadData(ILoadData data)
        {
            MonitorLogic = new MarketLogic(data, new BollingerBands());
            MonitorLogic.OnReceiveCandle += OnCandleReceived;

            StartNewChart();
        }
Example #3
0
        private static void LoadDataForAppropriateClass(Window win)
        {
            ILoadData loaddata = null;

            switch (win.Caption)
            {
            case Constants.LOGIN:
                loaddata = win.Object as Login;
                break;

            case Constants.DB4OBROWSER:
                loaddata = win.Object as ObjectBrowser;
                break;

            case Constants.QUERYBUILDER:
                loaddata = win.Object as QueryBuilder;
                break;

            default:
                break;
            }
            if (loaddata != null)
            {
                loaddata.LoadAppropriatedata();
            }
        }
Example #4
0
 public MarketLogic(ILoadData dataInfo, IIndicator indicator)
 {
     Candles = dataInfo.Candles();
     indicator.Calculator(Candles);
     BBMiddle = indicator.BBMiddle;
     BBUpper  = indicator.BBUpper;
     BBLower  = indicator.BBLower;
 }
 public CalculatedMatches(ILoadData data, string path)
 {
     _data    = data;
     _results = _data.FromTextFile(path) ?? throw new FileNotFoundException(path);
     _matches = _results.Split(",");
     RegisterTeams();
     CalculateScore();
 }
        public AppConfiguration(string filename, ILoadData loadData)
        {
            var jsonString = loadData.ReadData(filename);

            Config = JsonSerializer.Deserialize <Config>(jsonString, new JsonSerializerOptions
            {
                IgnoreNullValues = false
            });
        }
 public SimpleEngine(ILogger <SimpleEngine> logger, ILinkShortener shortener, IYouTubeDescriptionGenerator youTubeDescriptionGenerator, IWeeklySummaryGenerator summeryGenerator, ILoadData data, IEpisodeNumberHelper episodeNumberHelper)
 {
     this.logger    = logger;
     this.shortener = shortener;
     this.youTubeDescriptionGenerator = youTubeDescriptionGenerator;
     this.summeryGenerator            = summeryGenerator;
     this.data = data;
     this.episodeNumberHelper = episodeNumberHelper;
 }
Example #8
0
        public Form1(IGenericRepository <Product> productRepo, IGenericRepository <ProductSales> productSalesRepo,
                     IAddData addData, ILoadData loadData, IClearData clearData, IProcessData processData)
        {
            _productRepo      = productRepo;
            _productSalesRepo = productSalesRepo;
            _addData          = addData;
            _loadData         = loadData;
            _clearData        = clearData;
            _processData      = processData;

            InitializeComponent();
        }
Example #9
0
        /// <summary>
        /// Load PIN data from a physical file/DataBase /......
        /// </summary>
        /// <param name="FileName">filename which include fullpath/DataBase connection /......</param>
        /// <returns>Operation is sucessful,return true otherwise false</returns>
        public bool Load(string FileName)
        {
            lock (Lockobject)
            {
                LoadObject = ObjectBuildFactory <ILoadData> .Instance(SystemConfiguration.LoadDataClassName);

                if (LoadObject != null)
                {
                    LoadObject.SetLoadObject(RBTree);
                }
            }
            if (LoadObject != null)
            {
                return(LoadObject.Load(FileName));
            }
            else
            {
                return(false);
            }
        }
Example #10
0
 public Tests(ILoadData loadData)
 {
     this.loadData = loadData;
 }
Example #11
0
 public FindCheckController(ILoadData loadData)
 {
     _loadData = loadData;
 }
Example #12
0
 public Member(string p_ConsumptionsId, ILoadData p_LoadData)
     : this(p_ConsumptionsId)
 {
     m_ILoadData = p_LoadData;
 }
Example #13
0
 public Agency(ILoadData loadData)
 {
     _ILoadData = loadData;
     Employees  = Task.Run(async() => await _ILoadData.LoadEmployeeData()).Result;
     Hotels     = Task.Run(async() => await _ILoadData.LoadHotelData()).Result;
 }
 public StockDataParser(ILoadData dataloader)
 {
     _dataLoader = dataloader;
 }
Example #15
0
 public Member(string p_ConsumptionsId, ILoadData p_LoadData)
     : this(p_ConsumptionsId)
 {
     m_ILoadData = p_LoadData;
 }
Example #16
0
 public void SetDataLoader(ILoadData data)
 {
     _dataLoader = data;
 }
        public BaseForm ActiveForm(Form parentForm, Panel parentPanel, string formKey, GridConfig gridConfig, UFXBLLManager bLLManager)
        {
            Forms.BaseForm form     = null;
            Type           formType = null;
            bool           hasGrid  = false;
            bool           needBLL  = false;
            string         json     = string.Empty;

            if (_childFormMap.ContainsKey(formKey))
            {
                form = _childFormMap[formKey];
            }
            else
            {
                switch (formKey)
                {
                case "cmdtrading":
                {
                    formType = typeof(StrategyTradingForm);
                    hasGrid  = true;
                }
                break;

                case "open":
                {
                    formType = typeof(OpenPositionForm);
                    hasGrid  = true;
                }
                break;

                case "close":
                {
                    formType = typeof(ClosePositionForm);
                    hasGrid  = true;
                }
                break;

                case "commandmanager":
                {
                    formType = typeof(CommandManagementForm);
                    hasGrid  = true;
                }
                break;

                case "monitorunit":
                {
                    formType = typeof(MonitorUnitForm);
                    hasGrid  = true;
                }
                break;

                case "portfoliomaintain":
                {
                    formType = typeof(PortfolioForm);
                    hasGrid  = true;
                    needBLL  = true;
                }
                break;

                case "fundmanagement":
                {
                    formType = typeof(ProductForm);
                    hasGrid  = true;
                    needBLL  = true;
                }
                break;

                case "assetunitmanagement":
                {
                    formType = typeof(AssetUnitForm);
                    hasGrid  = true;
                    needBLL  = true;
                }
                break;

                case "spottemplate":
                {
                    formType = typeof(SpotTemplateForm);
                    hasGrid  = true;
                }
                break;

                //case "currenttemplate":
                //    {
                //        formType = typeof(StockTemplateForm);
                //        hasGrid = true;
                //        //StockTemplateDAO _dbdao = new StockTemplateDAO();
                //        //var items = _dbdao.GetTemplate(-1);
                //        //json = JsonUtil.SerializeObject(items);
                //    }
                //    break;
                case "historicaltemplate":
                {
                    formType = typeof(HistSpotTemplateForm);
                    hasGrid  = true;
                }
                break;

                case "instancemanagement":
                {
                    formType = typeof(InstanceManagementForm);
                    hasGrid  = true;
                }
                break;

                case "holdingtransfer":
                {
                    formType = typeof(HoldingTransferedForm);
                    hasGrid  = true;
                    needBLL  = true;
                }
                break;

                default:
                    break;
                }
            }

            if (formType != null && form == null)
            {
                if (needBLL && hasGrid)
                {
                    form = LoadForm(parentForm, formType, new object[] { gridConfig, bLLManager }, json);
                }
                else if (hasGrid)
                {
                    form = LoadForm(parentForm, formType, new object[] { gridConfig }, json);
                }
                else
                {
                    form = LoadForm(parentForm, formType, null, json);
                }

                _childFormMap[formKey] = form;
            }

            if (form != null)
            {
                ILoadData loadData = form as ILoadData;
                if (loadData != null)
                {
                    loadData.OnLoadData(form, null);
                }

                IFormActived formActived = form as IFormActived;
                if (formActived != null)
                {
                    //TODO: add the step to load data and refresh the child form
                    formActived.OnFormActived("");
                }

                form.MdiParent = parentForm;
                form.Parent    = parentPanel;
                form.Dock      = DockStyle.Fill;
                form.BringToFront();
                form.Show();
            }
            else
            {
                //default form
                throw new NotSupportedException("The type is not support!");
            }

            return(form);
        }
 protected AbstractParser()
 {
     LoadData=new LoadData.LoadData();
 }