Beispiel #1
0
 void OnNewProject()
 {
     m_project = new project();
     ProjectToForm(m_project);
 }
Beispiel #2
0
        private void FormToProject(project prj)
        {
            // set the network name for this computer
            prj.SetComputerName(GetComputerName());

            // set files to use
            string [] sFiles = new string[listBoxFont.Items.Count];
            for (int i=0; i<listBoxFont.Items.Count; i++)
            {
                sFiles[i] = listBoxFont.Items[i].ToString();
            }
            prj.SetFilesToTest(sFiles);

            // set which tests to perform
            for (int i=0; i<checkedListBoxTests.Items.Count; i++)
            {
                string sTable = checkedListBoxTests.Items[i].ToString();
                bool bPerform = checkedListBoxTests.GetItemChecked(i);
                prj.SetTableTest(sTable, bPerform);
            }
        }
Beispiel #3
0
        private void ProjectToForm(project prj)
        {
            // compare the project's computername with the network name for this computer
            if (prj.GetComputerName() != GetComputerName())
            {
                String sMsg = "Warning!  This project was created on a different computer named" +
                    "'" + prj.GetComputerName() + "'.  Some files may not be accessible.";
                MessageBox.Show(this, sMsg);
            }

            // load the files
            listBoxFont.Items.Clear();
            string [] sFiles = prj.GetFilesToTest();
            if (sFiles != null)
            {
                for (int i=0; i<sFiles.Length; i++)
                {
                    listBoxFont.Items.Add(sFiles[i]);
                }
            }

            // load the tests
            for (int i=0; i<checkedListBoxTests.Items.Count; i++)
            {
                string sTable = checkedListBoxTests.Items[i].ToString();
                bool bPerform = prj.GetTableTest(sTable);
                checkedListBoxTests.SetItemChecked(i, bPerform);
            }
        }
Beispiel #4
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            m_Validator = new Validator();

            string [] sTableTypes = TableManager.GetKnownOTTableTypes();
            for (int i=0; i<sTableTypes.Length; i++)
            {
                checkedListBoxTests.Items.Add(sTableTypes[i], System.Windows.Forms.CheckState.Checked);
            }

            groupBoxCTFlags.Enabled = checkBoxClearType.Checked;

            m_project = new project();
            m_RastTestTransform = new RastTestTransform();

            m_PersistedData = new PersistedData();
        }