def buttonAddWorkspace_Click(self):
        if (not self.CheckInputValues()):
            return
        index = AirCraftOperation.g_projectList.GetIndexOfWsOrProcedure(
            enumProjectType.ptWorkspace,
            self.comboProjectWorkspace.SelectedItem,
            self.comboSubProjectWorkspace.SelectedItem,
            self.textNameWorkspace.Text)
        if (index != None):
            QMessageBox.warning(self, "Warning", "The same name exist!")
            return
        pi = ProjectInfo()
        pi.Pt = enumProjectType.ptWorkspace
        pi.Name = self.textNameWorkspace.Text
        pi.Path = self.textPathWorkspace.Text
        pi.ProjName = self.comboProjectWorkspace.SelectedItem
        pi.SubProjName = self.comboSubProjectWorkspace.SelectedItem
        pi.WorkspaceName = self.textNameWorkspace.Text
        pi.FullName = self.textFullName.Text
        pi.UserName = AirCraftOperation.g_loginedUser.Name

        AirCraftOperation.g_projectList.Add(pi)

        nIndex = self.listBoxWorkspace.Add(pi.Name)
        self.listBoxWorkspace.SelectedIndex = nIndex
        self.buttonSaveWorkspace.setEnabled(True)
    def buttonModifyProject_Click(self):
        try:
            if (self.listBoxProject.SelectedIndex < 0):
                raise ("Please select project in the projects list!")
            if (not self.CheckInputValues()):
                return
            pi = ProjectInfo()
            pi.Pt = enumProjectType.ptProject
            pi.Name = self.textNameProject.Value
            pi.ProjName = self.textNameProject.Value
            pi.Path = self.textPathProject.Value
            pi.UserName = AirCraftOperation.g_loginedUser.Name
            pi.FullName = self.textNameProject.Value

            AirCraftOperation.g_projectList.Remove(
                self.listBoxProject.SelectedIndex)

            AirCraftOperation.g_projectList.Insert(
                self.listBoxProject.SelectedIndex, pi)
            self.listBoxProject.Clear()
            for pi in AirCraftOperation.g_projectList.ProjectsList:
                if (pi.Pt == enumProjectType.ptProject):
                    self.listBoxProject.Add(pi.Name)
            self.buttonSaveProject.setEnabled(True)
        except:
            # MessageBox.Show(ex.Message)
            pass
    def buttonAddProject_Click(self):
        try:
            if (not self.CheckInputValues()):
                return

            if (AirCraftOperation.g_projectList.Find(
                    self.textNameProject.Value) != None):
                QMessageBox.warning(self, "Warning", "The same project exist!")
                return
            pi = ProjectInfo()
            pi.Pt = enumProjectType.ptProject
            pi.Name = self.textNameProject.Value
            pi.ProjName = self.textNameProject.Value
            pi.Path = self.textPathProject.Value
            pi.UserName = AirCraftOperation.g_loginedUser.Name
            pi.FullName = self.textNameProject.Value

            AirCraftOperation.g_projectList.Add(pi)

            nIndex = self.listBoxProject.Add(pi.Name)
            self.listBoxProject.SelectedIndex = nIndex
            self.buttonSaveProject.setEnabled(True)
        except:  #(System.Exception ex)
            # MessageBox.Show(ex.Message)
            pass
    def buttonAddSubproject_Click(self):
        if (not self.CheckInputValues()):
            return

        if (AirCraftOperation.g_projectList.Find(self.textFullName.Text) != None):
            QMessageBox.warning(self, "Warning", "The same sub-project exist!")
            return
        pi = ProjectInfo()
        pi.Pt = enumProjectType.ptSubProject
        pi.Name = self.textNameSubproject.Text
        pi.SubProjName = self.textNameSubproject.Text
        pi.Path = self.textPathSubproject.Text
        pi.ProjName = self.comboProjectSubproject.SelectedItem
        pi.UserName = AirCraftOperation.g_loginedUser.Name
        pi.FullName = self.textFullName.Value

        AirCraftOperation.g_projectList.Add(pi)

        nIndex = self.listBoxSubproject.Add(pi.Name)
        self.listBoxSubproject.SelectedIndex = nIndex
        self.buttonSaveSubproject.setEnabled(True)
Example #5
0
    def buttonAddProcedure_Click(self):
        if (not self.CheckInputValues()):
            return

        if (AirCraftOperation.g_projectList.Find(self.textNameProcedure.Text)
                != None):
            QMessageBox.warning(self, "Warning", "The same name exist!")
            return
        pi = ProjectInfo()
        pi.Pt = enumProjectType.ptFile
        pi.Name = self.textNameProcedure.Text
        pi.Path = self.textPathProcedure.Text
        pi.ProjName = self.comboProjectProcedure.SelectedItem
        pi.SubProjName = self.comboSubProjectProcedure.SelectedItem
        pi.WorkspaceName = self.comboWorkspaceProcedure.SelectedItem
        pi.UserName = AirCraftOperation.g_loginedUser.Name

        AirCraftOperation.g_projectList.Add(pi)

        nIndex = self.listBoxProcedure.Add(pi.Name)
        self.listBoxProcedure.SelectedIndex = nIndex
        self.buttonSaveProcedure.setEnabled(True)
Example #6
0
    def buttonAddProject_Click(self):
        if (not self.CheckInputValues()):
            return

        if (AirCraftOperation.g_projectList.FindByName(self.textNameAIPChart.Text, enumProjectType.ptAipChart) != None):
            QMessageBox.warning(self, "Warning", "The same project exist!")
        pi = ProjectInfo()
        pi.Pt = enumProjectType.ptAipChart
        pi.Name = self.textNameAIPChart.Text
        pi.Path = self.textPathAIPChart.Text
        pi.UserName = AirCraftOperation.g_loginedUser.Name

        AirCraftOperation.g_projectList.Add(pi)

        nIndex = self.listBoxAIPChart.Add(pi.Name)
        self.listBoxAIPChart.SelectedIndex = nIndex
        self.buttonSaveAIPChart.setEnabled(True)