修改界面布局,验证导入出功能
This commit is contained in:
@@ -25,6 +25,7 @@ classdef EDFMAppController < handle
|
||||
obj.setDropDownItems('GWgas_modelDropDown', {'1'}, '1');
|
||||
obj.setDropDownItems('OWoil_modelDropDown', {'1', '2'}, '1');
|
||||
obj.setDropDownItems('MCgas_modelDropDown', {'1'}, '1');
|
||||
obj.configureModelSelectionCallbacks();
|
||||
obj.configureWellTables();
|
||||
obj.configureFracWellControls();
|
||||
obj.applyFixedUIState();
|
||||
@@ -412,6 +413,19 @@ classdef EDFMAppController < handle
|
||||
end
|
||||
|
||||
methods (Access = private)
|
||||
function configureModelSelectionCallbacks(obj)
|
||||
if isprop(obj.App, 'ModelFlowModelDropDown')
|
||||
obj.App.ModelFlowModelDropDown.ValueChangedFcn = @(src, event) obj.onModelSelectionChanged();
|
||||
end
|
||||
if isprop(obj.App, 'ModelGridModelDropDown')
|
||||
obj.App.ModelGridModelDropDown.ValueChangedFcn = @(src, event) obj.onModelSelectionChanged();
|
||||
end
|
||||
end
|
||||
|
||||
function onModelSelectionChanged(obj)
|
||||
obj.syncModelTabs();
|
||||
end
|
||||
|
||||
function addSupportPaths(obj)
|
||||
addpath(fullfile(obj.ProjectRoot, 'gui_support', 'app'));
|
||||
addpath(fullfile(obj.ProjectRoot, 'gui_support', 'config'));
|
||||
@@ -785,6 +799,10 @@ classdef EDFMAppController < handle
|
||||
|
||||
function applyFlowVisibility(obj, flowModel)
|
||||
showGasCommon = flowModel ~= 2;
|
||||
showOilWaterTab = flowModel == 2;
|
||||
showGasWaterTab = flowModel == 1;
|
||||
showMultiComponentTab = flowModel == 3;
|
||||
|
||||
gasCommonProps = { ...
|
||||
'GasLabel', ...
|
||||
'FlowCommonDensityGScEditField', 'DensityGScLabel', ...
|
||||
@@ -797,9 +815,91 @@ classdef EDFMAppController < handle
|
||||
'FlowCommonGasPLEditField', 'GasPLLabel', ...
|
||||
'FlowCommonGasKnEditField', 'GasKnLabel', ...
|
||||
'FlowCommonGasBetaNonDarcyEditField', 'GasBetaNonDarcyLabel'};
|
||||
waterCommonProps = { ...
|
||||
'WaterLabel', ...
|
||||
'FlowCommonDensityWScEditField', 'DensityWScLabel', ...
|
||||
'FlowCommonPrwEditField', 'PrwLabel', ...
|
||||
'FlowCommonBwiEditField', 'BwiLabel', ...
|
||||
'FlowCommonCwEditField', 'CwLabel', ...
|
||||
'FlowCommonVwiEditField', 'VwiLabel', ...
|
||||
'FlowCommonCvwEditField', 'CvwLabel', ...
|
||||
'FlowCommonPGradThresholdEditField', 'PGradThresholdLabel'};
|
||||
|
||||
for i = 1:numel(gasCommonProps)
|
||||
obj.setControlVisible(gasCommonProps{i}, showGasCommon);
|
||||
end
|
||||
for i = 1:numel(waterCommonProps)
|
||||
obj.setControlVisible(waterCommonProps{i}, true);
|
||||
end
|
||||
|
||||
obj.setControlVisible('GasWaterTab', showGasWaterTab);
|
||||
obj.setControlVisible('OilWaterTab', showOilWaterTab);
|
||||
obj.setControlVisible('MultiComponentTab', showMultiComponentTab);
|
||||
obj.setFlowTabControlsVisible('GasWater', showGasWaterTab);
|
||||
obj.setFlowTabControlsVisible('OilWater', showOilWaterTab);
|
||||
obj.setFlowTabControlsVisible('MultiComponent', showMultiComponentTab);
|
||||
|
||||
if isprop(obj.App, 'TabGroup2')
|
||||
switch flowModel
|
||||
case 1
|
||||
if isprop(obj.App, 'GasWaterTab')
|
||||
obj.App.TabGroup2.SelectedTab = obj.App.GasWaterTab;
|
||||
end
|
||||
case 2
|
||||
if isprop(obj.App, 'OilWaterTab')
|
||||
obj.App.TabGroup2.SelectedTab = obj.App.OilWaterTab;
|
||||
end
|
||||
otherwise
|
||||
if isprop(obj.App, 'MultiComponentTab')
|
||||
obj.App.TabGroup2.SelectedTab = obj.App.MultiComponentTab;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function setFlowTabControlsVisible(obj, flowTabName, isVisible)
|
||||
switch flowTabName
|
||||
case 'GasWater'
|
||||
controlNames = { ...
|
||||
'GasWaterTab', ...
|
||||
'GWPRFTextArea', 'PRFTextAreaLabel', ...
|
||||
'GWRPGWTextArea', 'RPGWTextAreaLabel', ...
|
||||
'GWifpcglEditField', 'ifpcglEditFieldLabel'};
|
||||
case 'OilWater'
|
||||
controlNames = { ...
|
||||
'OilWaterTab', ...
|
||||
'OWoil_modelDropDown', 'oil_modelLabel', ...
|
||||
'OWPRFTextArea', 'PRFTextAreaLabel_2', ...
|
||||
'OWPRMTextArea', 'PRMTextAreaLabel', ...
|
||||
'OWifpcowEditField', 'ifpcowEditFieldLabel', ...
|
||||
'OWcvoEditField', 'cvoEditFieldLabel', ...
|
||||
'OWvoiEditField', 'voiEditFieldLabel', ...
|
||||
'OWcoEditField', 'coEditFieldLabel', ...
|
||||
'OWBoiEditField', 'BoiEditFieldLabel', ...
|
||||
'OWproEditField', 'proEditFieldLabel', ...
|
||||
'OWdensity_o_scEditField', 'density_o_scEditFieldLabel'};
|
||||
case 'MultiComponent'
|
||||
controlNames = { ...
|
||||
'MultiComponentTab', ...
|
||||
'MCstress_factor_ref_pressureEditField', 'stress_factor_ref_pressureEditFieldLabel_2', ...
|
||||
'MCstress_factor_matrixEditField', 'stress_factor_matrixEditFieldLabel_2', ...
|
||||
'MCstress_factor_fractureEditField', 'stress_factor_fractureEditFieldLabel_2', ...
|
||||
'MCifpcglEditField', 'ifpcglEditFieldLabel_2', ...
|
||||
'MCPC_fractureTextArea', 'PC_fractureTextAreaLabel', ...
|
||||
'MCkr_surf_fractureTextArea', 'kr_surf_fractureTextAreaLabel', ...
|
||||
'MCkr_nosurf_fractureTextArea', 'kr_nosurf_fractureTextAreaLabel', ...
|
||||
'MCcs_Nc_fractureTextArea', 'cs_Nc_fractureTextAreaLabel', ...
|
||||
'MCPCTextArea', 'PCTextAreaLabel', ...
|
||||
'MCkr_surfTextArea', 'kr_surfTextAreaLabel', ...
|
||||
'MCkr_nosurfTextArea', 'kr_nosurfTextAreaLabel', ...
|
||||
'MCcs_NcTextArea', 'cs_NcTextAreaLabel'};
|
||||
otherwise
|
||||
controlNames = {};
|
||||
end
|
||||
|
||||
for i = 1:numel(controlNames)
|
||||
obj.setControlVisible(controlNames{i}, isVisible);
|
||||
end
|
||||
end
|
||||
|
||||
function commonData = getCommonFlowSource(obj, c)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user