/// <summary> /// Is display step button displayed /// </summary> /// <param name="step"></param> public bool IsDisplayStepDisplayed(DisplayStep step) { switch (step) { case DisplayStep.Min: //"Hourly" step return(EnergyDisplayStepMinButton.Exists()); case DisplayStep.Hour: //"Hourly" step return(EnergyDisplayStepHourButton.Exists()); case DisplayStep.Day: //"Daily" step return(EnergyDisplayStepDayButton.Exists()); case DisplayStep.Week: //"Weekly" step return(EnergyDisplayStepWeekButton.Exists()); case DisplayStep.Month: //"Monthly" step return(EnergyDisplayStepMonthButton.Exists()); case DisplayStep.Year: //"Year" step return(EnergyDisplayStepYearButton.Exists()); default: return(true); } }
/// <summary> /// Click display step button /// </summary> /// <param name="step">enum</param> public void ClickDisplayStep(DisplayStep step) { switch (step) { case DisplayStep.Min: //click "Raw" step EnergyDisplayStepMinButton.Click(); break; case DisplayStep.Hour: //click "Hourly" step EnergyDisplayStepHourButton.Click(); break; case DisplayStep.Day: //click "Daily" step EnergyDisplayStepDayButton.Click(); break; case DisplayStep.Week: //click "Weekly" step EnergyDisplayStepWeekButton.Click(); break; case DisplayStep.Month: //click "Monthly" step EnergyDisplayStepMonthButton.Click(); break; case DisplayStep.Year: //click "Year" step EnergyDisplayStepYearButton.Click(); break; default: break; } }
/// <summary> /// Export expected data table to excel file /// </summary> /// <param name="displayStep"></param> public void ExportExpectedDataTableToExcel(string fileName, DisplayStep displayStep, string path) { if (ExecutionConfig.isCreateExpectedDataViewExcelFile) { //display data view JazzFunction.EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); ClickDisplayStep(displayStep); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); //Load data view and get data table DataTable data = GetAllData(); ExcelHelper.CellsValue[] headersSheet = GetHeaderData(); //Export to excel string actualFileName = Path.Combine(path, fileName); JazzFunction.DataViewOperation.MoveExpectedDataViewToExcelWithHeaderSheet(data, actualFileName, JazzFunction.DataViewOperation.sheetNameExpected, headersSheet); } }
/// <summary> /// Judge if supported display step button displayed on window /// </summary> /// <param name="step"></param> public bool IsStepButtonOnWindow(DisplayStep step) { Button stepButton = JazzButton.GetOneButton(JazzControlLocatorKey.ButtonDisplayStepWindow, DisplayStepItem[step]); return(stepButton.Exists()); }
/// <summary> /// Click display step button displayed on window /// </summary> /// <param name="name"></param> public void ClickStepButtonOnWindow(DisplayStep step) { Button stepButton = JazzButton.GetOneButton(JazzControlLocatorKey.ButtonDisplayStepWindow, DisplayStepItem[step]); stepButton.Click(); }
/// <summary> /// Export expected data table to excel file /// </summary> /// <param name="displayStep"></param> public void ExportExpectedDataTableToExcel(string fileName, DisplayStep displayStep) { ExportExpectedDataTableToExcel(fileName, displayStep, CostPath); }
/// <summary> /// Export expected data table to excel file /// </summary> /// <param name="displayStep"></param> public void ExportExpectedDataTableToExcel(string fileName, DisplayStep displayStep) { ExportExpectedDataTableToExcel(fileName, displayStep, UnitIndicatorPath); }