public void SetTransactionLog(TrionicTransactionLog log)
        {
            gridControl1.DataSource = log.TransCollection; // should be based on symbolname
            // select the last entry and scroll to it
            gridView1.BestFitColumns();
            //gridControl1.RefreshDataSource();
            //gridView1.FocusedRowHandle = gridView1.RowCount - 1;
            /*gridView1.SelectRow(gridView1.RowCount - 1);
            if (gridView1.IsRowVisible(gridView1.RowCount - 1) != DevExpress.XtraGrid.Views.Grid.RowVisibleState.Visible)
            {
                gridView1.MakeRowVisible(gridView1.RowCount - 1, true);
            }*/

            UpdateButtons();
        }
        public void SetTransactionLog(TrionicTransactionLog log)
        {
            gridControl1.DataSource = log.TransCollection; // should be based on symbolname
            // select the last entry and scroll to it
            gridView1.BestFitColumns();
            //gridControl1.RefreshDataSource();
            //gridView1.FocusedRowHandle = gridView1.RowCount - 1;

            /*gridView1.SelectRow(gridView1.RowCount - 1);
             * if (gridView1.IsRowVisible(gridView1.RowCount - 1) != DevExpress.XtraGrid.Views.Grid.RowVisibleState.Visible)
             * {
             *  gridView1.MakeRowVisible(gridView1.RowCount - 1, true);
             * }*/



            UpdateButtons();
        }
Beispiel #3
0
 private int GetNumberOfTransactions(string project)
 {
     int retval = 0;
     string filename = m_appSettings.ProjectFolder + "\\" + project + "\\TransActionLogV2.ttl";
     if (File.Exists(filename))
     {
         TrionicTransactionLog translog = new TrionicTransactionLog();
         translog.OpenTransActionLog(m_appSettings.ProjectFolder, project);
         translog.ReadTransactionFile();
         retval = translog.TransCollection.Count;
     }
     return retval;
 }
Beispiel #4
0
        private void OpenProject(string projectname)
        {
            //TODO: Are there pending changes in the optionally currently opened binary file / project?

            //TODO: open a selected project
            //frmInfoBox info = new frmInfoBox("Opening project: " + projectname);
            if (Directory.Exists(m_appSettings.ProjectFolder + "\\" + projectname))
            {
                m_appSettings.LastOpenedType = 1;
                m_CurrentWorkingProject = projectname;
                m_ProjectLog.OpenProjectLog(m_appSettings.ProjectFolder + "\\" + projectname);
                //Load the binary file that comes with this project
                LoadBinaryForProject(projectname);
                //LoadAFRMapsForProject(projectname); // <GS-27072010> TODO: nog bekijken voor T7
                if (m_currentfile != string.Empty)
                {
                    // transaction log <GS-15032010>
                    m_ProjectTransactionLog = new TrionicTransactionLog();
                    if (m_ProjectTransactionLog.OpenTransActionLog(m_appSettings.ProjectFolder, projectname))
                    {
                        m_ProjectTransactionLog.ReadTransactionFile();
                        //m_trionicFile.SetTransactionLog(m_ProjectTransactionLog);
                        if (m_ProjectTransactionLog.TransCollection.Count > 2000)
                        {
                            frmProjectTransactionPurge frmPurge = new frmProjectTransactionPurge();
                            frmPurge.SetNumberOfTransactions(m_ProjectTransactionLog.TransCollection.Count);
                            if (frmPurge.ShowDialog() == DialogResult.OK)
                            {
                                m_ProjectTransactionLog.Purge();
                            }
                        }
                    }
                    // transaction log <GS-15032010>
                    btnCloseProject.Enabled = true;
                    btnAddNoteToProject.Enabled = true;
                    btnEditProject.Enabled = true;
                    btnShowProjectLogbook.Enabled = true;
                    btnProduceLatestBinary.Enabled = true;
                    //btncreateb
                    btnRebuildFile.Enabled = true;
                    CreateProjectBackupFile();
                    UpdateRollbackForwardControls();
                    m_appSettings.Lastprojectname = m_CurrentWorkingProject;
                    this.Text = "T7SuitePro [Project: " + projectname + "]";
                }
            }
        }