Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 abstract public void SetTransactionLog(TrionicTransactionLog transactionLog);
Esempio n. 3
0
 public override void SetTransactionLog(TrionicTransactionLog transactionLog)
 {
     m_transactionLog = transactionLog;
 }
Esempio n. 4
0
 private bool OpenProject(string projectname)
 {
     //TODO: Are there pending changes in the optionally currently opened binary file / project?
     // open a selected project
     bool retval = false;
     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
         retval = LoadBinaryForProject(projectname);
         if (retval)
         {
             LoadAFRMapsForProject(projectname);
             if (m_trionicFile != null)
             {
                 // 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 the number of transactions is > 2000 offer the user to purge the transaction log
                     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;
                 btnProjectNote.Enabled = true;
                 btnEditProject.Enabled = true;
                 btnShowProjectLogbook.Enabled = true;
                 btnProduceBinaryFromProject.Enabled = true;
                 btnRecreateFile.Enabled = true;
                 CreateProjectBackupFile();
                 UpdateRollbackForwardControls();
                 m_appSettings.Lastprojectname = m_CurrentWorkingProject;
                 this.Text = "T5Suite Professional 2.0 [Project: " + projectname + "]";
             }
         }
     }
     return retval;
 }
Esempio n. 5
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;
 }
Esempio n. 6
0
 public abstract void SetTransactionLog(TrionicTransactionLog transactionLog);