本文整理汇总了Python中EnvironmentListCtrl.EnvironmentListCtrl类的典型用法代码示例。如果您正苦于以下问题:Python EnvironmentListCtrl类的具体用法?Python EnvironmentListCtrl怎么用?Python EnvironmentListCtrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EnvironmentListCtrl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.ACCEPT_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.ACCEPT_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
costBox = wx.StaticBox(self,-1,'Cost')
costBoxSizer = wx.StaticBoxSizer(costBox,wx.HORIZONTAL)
environmentDimSizer.Add(costBoxSizer,0,wx.EXPAND)
self.costCombo = wx.ComboBox(self,armid.ACCEPT_COMBOCOST_ID,"",choices=['Low','Medium','High'],style=wx.CB_READONLY)
costBoxSizer.Add(self.costCombo,0,wx.EXPAND)
rationaleBox = wx.StaticBox(self,-1,'Rationale')
rationaleBoxSizer = wx.StaticBoxSizer(rationaleBox,wx.HORIZONTAL)
environmentDimSizer.Add(rationaleBoxSizer,1,wx.EXPAND)
self.rationaleCtrl = wx.TextCtrl(self,armid.ACCEPT_TEXTRATIONALE_ID,'',style=wx.TE_MULTILINE)
rationaleBoxSizer.Add(self.rationaleCtrl,1,wx.EXPAND)
self.costCombo.Disable()
self.rationaleCtrl.Disable()
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.OnEnvironmentDeselected)
示例2: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.TRANSFER_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.TRANSFER_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
roleBox = wx.StaticBox(self,-1)
roleBoxSizer = wx.StaticBoxSizer(roleBox,wx.HORIZONTAL)
environmentDimSizer.Add(roleBoxSizer,0,wx.EXPAND)
self.roleList = RoleCostListCtrl(self,armid.TRANSFER_LISTROLES_ID)
roleBoxSizer.Add(self.roleList,1,wx.EXPAND)
rationaleBox = wx.StaticBox(self,-1,'Rationale')
rationaleBoxSizer = wx.StaticBoxSizer(rationaleBox,wx.HORIZONTAL)
environmentDimSizer.Add(rationaleBoxSizer,1,wx.EXPAND)
self.rationaleCtrl = wx.TextCtrl(self,armid.TRANSFER_TEXTRATIONALE_ID,'',style=wx.TE_MULTILINE)
rationaleBoxSizer.Add(self.rationaleCtrl,1,wx.EXPAND)
self.roleList.Disable()
self.rationaleCtrl.Disable()
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.OnEnvironmentDeselected)
示例3: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,ASSET_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theAssetId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,ASSETENVIRONMENT_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
dimBox = wx.StaticBox(self)
environmentDimSizer = wx.StaticBoxSizer(dimBox,wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.HORIZONTAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = AssetEnvironmentNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.propertiesList = self.notebook.FindWindowById(ASSETENVIRONMENT_LISTPROPERTIES_ID)
self.associationCtrl = self.notebook.FindWindowById(ASSET_LISTASSOCIATIONS_ID)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.OnEnvironmentDeselected)
self.propertiesList.Disable()
self.associationCtrl.Disable()
示例4: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.PERSONA_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
self.thePersonaName = ''
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.PERSONA_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.HORIZONTAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = PersonaEnvironmentNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.directCtrl = self.notebook.FindWindowById(armid.PERSONA_CHECKDIRECT_ID)
self.roleList = self.notebook.FindWindowById(armid.PERSONA_LISTROLES_ID)
self.descriptionCtrl = self.notebook.FindWindowById(armid.PERSONA_TEXTNARRATIVE_ID)
self.directCtrl.Disable()
self.descriptionCtrl.Disable()
self.roleList.Disable()
示例5: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,THREAT_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theThreatId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,THREATENVIRONMENT_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
lhoodBox = wx.StaticBox(self)
lhoodSizer = wx.StaticBoxSizer(lhoodBox,wx.HORIZONTAL)
environmentDimSizer.Add(lhoodSizer,0,wx.EXPAND)
lhoodSizer.Add(wx.StaticText(self,-1,'Likelihood'))
lhoodList = ['Incredible','Improbable','Remote','Occasional','Probable','Frequent']
self.lhoodCtrl = wx.ComboBox(self,THREATENVIRONMENT_COMBOLIKELIHOOD_ID,choices=lhoodList,size=wx.DefaultSize,style=wx.CB_READONLY)
lhoodSizer.Add(self.lhoodCtrl,1,wx.EXPAND)
aaSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentDimSizer.Add(aaSizer,1,wx.EXPAND)
self.attackerList = DimensionListCtrl(self,THREATENVIRONMENT_LISTATTACKERS_ID,wx.DefaultSize,'Attacker','attacker',self.dbProxy)
attackerBox = wx.StaticBox(self)
attackerSizer = wx.StaticBoxSizer(attackerBox,wx.HORIZONTAL)
attackerSizer.Add(self.attackerList,1,wx.EXPAND)
aaSizer.Add(attackerSizer,1,wx.EXPAND)
self.assetList = DimensionListCtrl(self,THREATENVIRONMENT_LISTASSETS_ID,wx.DefaultSize,'Asset','asset',self.dbProxy)
assetBox = wx.StaticBox(self)
assetSizer = wx.StaticBoxSizer(assetBox,wx.HORIZONTAL)
assetSizer.Add(self.assetList,1,wx.EXPAND)
aaSizer.Add(assetSizer,1,wx.EXPAND)
propertiesBox = wx.StaticBox(self)
propertiesSizer = wx.StaticBoxSizer(propertiesBox,wx.HORIZONTAL)
environmentDimSizer.Add(propertiesSizer,1,wx.EXPAND)
values = self.dbProxy.getDimensionNames('threat_value')
valueLookup = ValueDictionary(values)
self.propertiesList = PropertiesListCtrl(self,THREATENVIRONMENT_LISTPROPERTIES_ID,valueLookup)
propertiesSizer.Add(self.propertiesList,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
示例6: __init__
def __init__(self,parent,goalDef,goalCat,goalPri,goalFc,goalIssue,goalAssets,defaultEnv):
wx.Panel.__init__(self,parent,armid.GOAL_PANELENVIRONMENT_ID)
b = Borg()
self.dbProxy = b.dbProxy
self.theGoalId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
self.theGoalDefinition = goalDef
self.theGoalCategory = goalCat
self.theGoalPriority = goalPri
self.theGoalFitCriterion = goalFc
self.theGoalIssue = goalIssue
self.theGoalAssets = goalAssets
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.GOAL_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.VERTICAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = ReqToGoalNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.goalAssociationCtrl = self.notebook.FindWindowById(armid.GOAL_LISTGOALREFINEMENTS_ID)
self.subGoalAssociationCtrl = self.notebook.FindWindowById(armid.GOAL_LISTSUBGOALREFINEMENTS_ID)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.goalAssociationCtrl.Disable()
self.subGoalAssociationCtrl.Disable()
self.theEnvironmentDictionary[defaultEnv] = GoalEnvironmentProperties(defaultEnv)
self.environmentList.Select(0)
self.goalAssociationCtrl.setEnvironment(defaultEnv)
self.goalAssociationCtrl.DeleteAllItems()
self.subGoalAssociationCtrl.setEnvironment(defaultEnv)
self.subGoalAssociationCtrl.DeleteAllItems()
self.goalAssociationCtrl.Enable()
self.subGoalAssociationCtrl.Enable()
示例7: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,GOAL_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theGoalId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,GOAL_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.VERTICAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = GoalEnvironmentNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.labelCtrl = self.notebook.FindWindowById(GOAL_TEXTLABEL_ID)
self.definitionCtrl = self.notebook.FindWindowById(GOAL_TEXTDEFINITION_ID)
self.categoryCtrl = self.notebook.FindWindowById(GOAL_COMBOCATEGORY_ID)
self.priorityCtrl = self.notebook.FindWindowById(GOAL_COMBOPRIORITY_ID)
self.fitCriterionCtrl = self.notebook.FindWindowById(GOAL_TEXTFITCRITERION_ID)
self.issueCtrl = self.notebook.FindWindowById(GOAL_TEXTISSUE_ID)
self.goalAssociationCtrl = self.notebook.FindWindowById(GOAL_LISTGOALREFINEMENTS_ID)
self.subGoalAssociationCtrl = self.notebook.FindWindowById(GOAL_LISTSUBGOALREFINEMENTS_ID)
self.cCtrl = self.notebook.FindWindowById(GOAL_LISTCONCERNS_ID)
self.caCtrl = self.notebook.FindWindowById(GOAL_LISTCONCERNASSOCIATIONS_ID)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.definitionCtrl.Disable()
self.categoryCtrl.Disable()
self.priorityCtrl.Disable()
self.fitCriterionCtrl.Disable()
self.issueCtrl.Disable()
self.goalAssociationCtrl.Disable()
self.subGoalAssociationCtrl.Disable()
self.cCtrl.Disable()
self.caCtrl.Disable()
示例8: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,TASK_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theTaskId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,TASK_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbBoxSizer = wx.StaticBoxSizer(nbBox,wx.VERTICAL)
environmentDimSizer.Add(nbBoxSizer,1,wx.EXPAND)
self.notebook = TaskEnvironmentNotebook(self,self.dbProxy)
nbBoxSizer.Add(self.notebook,1,wx.EXPAND)
self.dependenciesCtrl = self.notebook.FindWindowById(TASK_TEXTDEPENDENCIES_ID)
self.personaList = self.notebook.FindWindowById(TASK_LISTPERSONAS_ID)
self.assetList = self.notebook.FindWindowById(TASK_LISTASSETS_ID)
self.caList = self.notebook.FindWindowById(TASK_LISTCONCERNASSOCIATIONS_ID)
self.narrativeCtrl = self.notebook.FindWindowById(TASK_TEXTNARRATIVE_ID)
self.consequencesCtrl = self.notebook.FindWindowById(TASK_TEXTCONSEQUENCES_ID)
self.benefitsCtrl = self.notebook.FindWindowById(TASK_TEXTBENEFITS_ID)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.dependenciesCtrl.Disable()
self.personaList.Disable()
self.assetList.Disable()
self.caList.Disable()
self.narrativeCtrl.Disable()
self.consequencesCtrl.Disable()
self.benefitsCtrl.Disable()
self.theDimMenu = wx.Menu()
self.theDimMenu.Append(DIMLIST_MENUADD_ID,'Add Goal')
self.Bind(wx.EVT_RIGHT_DOWN,self.OnRightDown)
wx.EVT_MENU(self.theDimMenu,DIMLIST_MENUADD_ID,self.onAddGoal)
示例9: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.COUNTERMEASURE_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.COUNTERMEASURE_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
costBox = wx.StaticBox(self,-1,'Cost')
costBoxSizer = wx.StaticBoxSizer(costBox,wx.HORIZONTAL)
environmentDimSizer.Add(costBoxSizer,0,wx.EXPAND)
self.costCombo = wx.ComboBox(self,armid.COUNTERMEASURE_COMBOCOST_ID,"",choices=['Low','Medium','High'],style=wx.CB_READONLY)
costBoxSizer.Add(self.costCombo,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.HORIZONTAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = CountermeasureEnvironmentNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.reqList = self.notebook.FindWindowById(armid.COUNTERMEASURE_LISTREQUIREMENTS_ID)
self.targetList = self.notebook.FindWindowById(armid.COUNTERMEASURE_LISTTARGETS_ID)
self.propertiesList = self.notebook.FindWindowById(armid.COUNTERMEASURE_LISTPROPERTIES_ID)
self.personaList = self.notebook.FindWindowById(armid.COUNTERMEASURE_LISTPERSONAS_ID)
self.roleList = self.notebook.FindWindowById(armid.COUNTERMEASURE_LISTROLES_ID)
self.reqList.Disable()
self.targetList.Disable()
self.propertiesList.Disable()
self.costCombo.Disable()
self.roleList.Disable()
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.OnEnvironmentDeselected)
示例10: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.MITIGATE_PANELENVIRONMENT_ID)
self.theResponsePanel = parent
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.MITIGATE_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
typeBox = wx.StaticBox(self,-1,'Type')
typeBoxSizer = wx.StaticBoxSizer(typeBox,wx.HORIZONTAL)
environmentDimSizer.Add(typeBoxSizer,0,wx.EXPAND)
self.typeCombo = wx.ComboBox(self,armid.MITIGATE_COMBOTYPE_ID,"",choices=['Deter','Prevent','Detect','React'],style=wx.CB_READONLY)
typeBoxSizer.Add(self.typeCombo,1,wx.EXPAND)
pointBox = wx.StaticBox(self,-1,'Detection Point')
pointBoxSizer = wx.StaticBoxSizer(pointBox,wx.HORIZONTAL)
environmentDimSizer.Add(pointBoxSizer,0,wx.EXPAND)
self.pointCombo = wx.ComboBox(self,armid.MITIGATE_COMBODETECTIONPOINT_ID,"",choices=['Before','At','After'],style=wx.CB_READONLY)
pointBoxSizer.Add(self.pointCombo,1,wx.EXPAND)
dmBox = wx.StaticBox(self,-1,)
dmBoxSizer = wx.StaticBoxSizer(dmBox,wx.HORIZONTAL)
environmentDimSizer.Add(dmBoxSizer,1,wx.EXPAND)
self.dmList = DimensionListCtrl(self,armid.MITIGATE_LISTDETMECH_ID,wx.DefaultSize,'Detection Mechanism','detection_mechanism',self.dbProxy,listStyle=wx.LC_REPORT)
dmBoxSizer.Add(self.dmList,1,wx.EXPAND)
self.typeCombo.Disable()
self.pointCombo.Disable()
self.dmList.Disable()
self.SetSizer(mainSizer)
self.typeCombo.Bind(wx.EVT_COMBOBOX,self.onTypeChange)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.OnEnvironmentDeselected)
示例11: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,MISUSECASE_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
self.theSelectedRisk = ''
self.theSelectedThreat = ''
self.theSelectedVulnerability = ''
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,MISUSECASE_LISTENVIRONMENTS_ID,self.dbProxy)
self.environmentList.Unbind(wx.EVT_RIGHT_DOWN)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.VERTICAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = MisuseCaseNotebook(self)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.objectiveCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTOBJECTIVE_ID)
self.attackerList = self.notebook.FindWindowById(MISUSECASE_LISTATTACKERS_ID)
self.assetList = self.notebook.FindWindowById(MISUSECASE_LISTASSETS_ID)
self.threatCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTTHREAT_ID)
self.lhoodCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTLIKELIHOOD_ID)
self.vulCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTVULNERABILITY_ID)
self.sevCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTSEVERITY_ID)
self.ratingCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTSCORE_ID)
self.narrativeCtrl = self.notebook.FindWindowById(MISUSECASE_TEXTNARRATIVE_ID)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.narrativeCtrl.Disable()
示例12: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,OBSTACLE_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theObstacleId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,OBSTACLE_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
nbBox = wx.StaticBox(self,-1)
nbSizer = wx.StaticBoxSizer(nbBox,wx.VERTICAL)
environmentDimSizer.Add(nbSizer,1,wx.EXPAND)
self.notebook = ObstacleEnvironmentNotebook(self,self.dbProxy)
nbSizer.Add(self.notebook,1,wx.EXPAND)
self.labelCtrl = self.notebook.FindWindowById(OBSTACLE_TEXTLABEL_ID)
self.probCtrl = self.notebook.FindWindowById(OBSTACLE_TEXTPROBABILITY_ID)
self.categoryCtrl = self.notebook.FindWindowById(OBSTACLE_COMBOCATEGORY_ID)
self.definitionCtrl = self.notebook.FindWindowById(OBSTACLE_TEXTDEFINITION_ID)
self.goalAssociationCtrl = self.notebook.FindWindowById(OBSTACLE_LISTGOALS_ID)
self.subGoalAssociationCtrl = self.notebook.FindWindowById(OBSTACLE_LISTSUBGOALS_ID)
self.concernsCtrl = self.notebook.FindWindowById(OBSTACLE_LISTCONCERNS_ID)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
self.categoryCtrl.Disable()
self.definitionCtrl.Disable()
self.goalAssociationCtrl.Disable()
self.subGoalAssociationCtrl.Disable()
self.concernsCtrl.Disable()
示例13: __init__
def __init__(self, parent):
wx.Panel.__init__(self, parent, USECASE_PANELENVIRONMENT_ID)
b = Borg()
self.dbProxy = b.dbProxy
self.theUseCaseId = None
self.theUseCaseName = ""
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox, wx.HORIZONTAL)
mainSizer.Add(environmentListSizer, 0, wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self, USECASE_LISTENVIRONMENTS_ID, self.dbProxy)
environmentListSizer.Add(self.environmentList, 1, wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer, 1, wx.EXPAND)
nbBox = wx.StaticBox(self, -1)
nbBoxSizer = wx.StaticBoxSizer(nbBox, wx.VERTICAL)
environmentDimSizer.Add(nbBoxSizer, 1, wx.EXPAND)
self.notebook = UseCaseEnvironmentNotebook(self, self.dbProxy)
nbBoxSizer.Add(self.notebook, 1, wx.EXPAND)
self.preCondCtrl = self.notebook.FindWindowById(USECASE_TEXTPRECONDITION_ID)
self.postCondCtrl = self.notebook.FindWindowById(USECASE_TEXTPOSTCONDITION_ID)
self.stepsCtrl = self.notebook.FindWindowById(USECASE_PANELFLOW_ID)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM, self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM, self.OnDeleteEnvironment)
self.preCondCtrl.Disable()
self.stepsCtrl.Disable()
self.postCondCtrl.Disable()
self.environmentList.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnEnvironmentSelected)
self.environmentList.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnEnvironmentDeselected)
示例14: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.ATTACKER_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theAttackerId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.ATTACKERENVIRONMENT_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
rmSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentDimSizer.Add(rmSizer,1,wx.EXPAND)
self.roleList = DimensionListCtrl(self,armid.ATTACKERENVIRONMENT_LISTROLES_ID,wx.DefaultSize,'Role','role',self.dbProxy)
roleBox = wx.StaticBox(self)
roleSizer = wx.StaticBoxSizer(roleBox,wx.HORIZONTAL)
roleSizer.Add(self.roleList,1,wx.EXPAND)
rmSizer.Add(roleSizer,1,wx.EXPAND)
self.motiveList = DimensionListCtrl(self,armid.ATTACKERENVIRONMENT_LISTMOTIVES_ID,wx.DefaultSize,'Motive','motivation',self.dbProxy)
motiveBox = wx.StaticBox(self)
motiveSizer = wx.StaticBoxSizer(motiveBox,wx.HORIZONTAL)
motiveSizer.Add(self.motiveList,1,wx.EXPAND)
rmSizer.Add(motiveSizer,1,wx.EXPAND)
capBox = wx.StaticBox(self)
capSizer = wx.StaticBoxSizer(capBox,wx.HORIZONTAL)
environmentDimSizer.Add(capSizer,1,wx.EXPAND)
self.capabilitiesList = CapabilitiesListCtrl(self,armid.ATTACKERENVIRONMENT_LISTCAPABILITIES_ID,self.dbProxy)
capSizer.Add(self.capabilitiesList,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)
示例15: __init__
def __init__(self,parent,dp):
wx.Panel.__init__(self,parent,armid.VULNERABILITY_PANELENVIRONMENT_ID)
self.dbProxy = dp
self.theVulId = None
self.theEnvironmentDictionary = {}
self.theSelectedIdx = -1
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentBox = wx.StaticBox(self)
environmentListSizer = wx.StaticBoxSizer(environmentBox,wx.HORIZONTAL)
mainSizer.Add(environmentListSizer,0,wx.EXPAND)
self.environmentList = EnvironmentListCtrl(self,armid.VULNERABILITYENVIRONMENT_LISTENVIRONMENTS_ID,self.dbProxy)
environmentListSizer.Add(self.environmentList,1,wx.EXPAND)
environmentDimSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(environmentDimSizer,1,wx.EXPAND)
sevBox = wx.StaticBox(self)
sevSizer = wx.StaticBoxSizer(sevBox,wx.HORIZONTAL)
environmentDimSizer.Add(sevSizer,0,wx.EXPAND)
sevSizer.Add(wx.StaticText(self,-1,'Severity'))
sevList = ['Negligible','Marginal','Critical','Catastrophic']
self.sevCtrl = wx.ComboBox(self,armid.VULNERABILITYENVIRONMENT_COMBOSEVERITY_ID,choices=sevList,size=wx.DefaultSize,style=wx.CB_READONLY)
sevSizer.Add(self.sevCtrl,1,wx.EXPAND)
aSizer = wx.BoxSizer(wx.HORIZONTAL)
environmentDimSizer.Add(aSizer,1,wx.EXPAND)
self.assetList = DimensionListCtrl(self,armid.VULNERABILITYENVIRONMENT_LISTASSETS_ID,wx.DefaultSize,'Asset','asset',self.dbProxy)
assetBox = wx.StaticBox(self)
assetSizer = wx.StaticBoxSizer(assetBox,wx.HORIZONTAL)
assetSizer.Add(self.assetList,1,wx.EXPAND)
aSizer.Add(assetSizer,1,wx.EXPAND)
self.SetSizer(mainSizer)
self.environmentList.Bind(wx.EVT_LIST_INSERT_ITEM,self.OnAddEnvironment)
self.environmentList.Bind(wx.EVT_LIST_DELETE_ITEM,self.OnDeleteEnvironment)