Exemplo n.º 1
0
 public Explor(DataManager datamanager, DataReceiver datareceiver, string name)
 {
     InitializeComponent();
     m_DataManager = datamanager;
     m_DataReceiver = datareceiver;
     m_Name = name;
     TreeNodeFromString = new Dictionary<string, TreeNode>();
 }
Exemplo n.º 2
0
 public SearchFileList(DataManager datamanager)
 {
     InitializeComponent();
     this.m_DataManager = datamanager;
     Selected = new List<string>();
     this.fileListView.VirtualListSize = m_DataManager.VersionInfoFromChangeFile.Keys.Count;
     Files = new string[m_DataManager.VersionInfoFromChangeFile.Keys.Count];
     m_DataManager.VersionInfoFromChangeFile.Keys.CopyTo(Files, 0);
 }
 public VersionRelationShipTress(DataManager datamanager)
 {
     InitializeComponent();
     mana = new VersionBoxManager();
     VersionLeafFromString = new Dictionary<String, VersionLeaf>();
     m_DataManager = datamanager;
     addVersion(m_DataManager.VersionList);
     //    Functions.SerializeToFile<VersionBoxManager>("versionBoxMan",mana);
     VersionL = new List<String>();
 }
Exemplo n.º 4
0
 public SearchDataTable(DataManager datamanager, DataGridView datagridview)
 {
     Columns.Add("Date");
     Columns.Add("Version");
     Columns.Add("Notes");
     m_DataGridView = datagridview;
     m_DataGridView.RowsAdded += new DataGridViewRowsAddedEventHandler(m_DataGridView_RowsAdded);
     m_DataManager = datamanager;
     VersionInfoFromDataRow = new Dictionary<VersionInfo, DataRow>();
 }
Exemplo n.º 5
0
        public Search(DataManager datamanager)
        {
            InitializeComponent();
            m_DataManager = datamanager;

            SeachData = new List<VersionInfo>();
            VersionInfo versioninfo = new VersionInfo();
            versioninfo.versionName = "Test Version Name";
            versioninfo.date = DateTime.Now;
            versioninfo.FreeText = "Test Free Text";
            versioninfo.UserVersName = new List<string>();
            versioninfo.UserVersName.Add("VersionName1");
            versioninfo.UserVersName.Add("VersionName2");
            SeachData.Add(versioninfo);
              //  this.dataGridView1.Rows.Add();
             //   d this.dataGridView1.Rows[0];
               shearch = new SearchDataTable(datamanager, this.dataGridView1);

            this.dataGridView1.DataSource = shearch;

            Setu();
        }
Exemplo n.º 6
0
        public Cal(DataManager datamanager)
        {
            InitializeComponent();
            m_DataManager = datamanager;
            VersionToShow = new List<VersionInfo>();
            this.CalDataGridView.VirtualMode = true;
            m_CritGui = new CritGui(this);
            ColFromDayOfWeek = new Dictionary<DayOfWeek, int>();
            m_Years = new int [0];
            int [] years = m_DataManager.GetYears();
            int LatestYear = 0;
            foreach(int year in years)
            {
                AddYear(year);
                LatestYear = (LatestYear < year) ? year : LatestYear;
            }

            AddMonths(LatestYear);
            AddDays();
            PopulateCalendar();
            PopulateTime();
            //    m_CritGui.PerformSearch();
             //   this.VersionTableLayoutPanel.Controls.Add(new CalendarPanel(), 0, 0);
        }
Exemplo n.º 7
0
 private void SetNewDataAndCurrent()
 {
     dontMonitor = UNKN;
     Util.DBug2("MainForm", "Enter try to get VersionName");
     m_CurrentVersion = dataReceiver.GetCurrentVersionName(m_currentMonitorGroup);
     Util.DBug2("MainForm", "Enter try to get Manager");
     this.dataManager = dataReceiver.GetDataManagerFromName(m_currentMonitorGroup, pDeleteReturn);
     Util.DBug2("MainForm", "Enter try to get GetDataManagerFromName");
 }
Exemplo n.º 8
0
 public List<VersionInfo> VersionInfoFromCriteria(VersionInfoSearchCriteria criteria, DataManager.Status stat)
 {
     return dataManager.VersionInfoFromCriteria(criteria,stat);
 }
Exemplo n.º 9
0
        private void tSendDataV(object sendO)
        {
            SendDatV send = (SendDatV)sendO;

            List<VersionInfo> data = send.data;
            int idnum = send.idnum;
            string name = send.name;
            bool done = send.done;

            if (idnum == SendToAll && idnum != DONT_KEEP)
            {
                DataManager datam;
                NameIsReady[name] = false;
                if (DataManagerFromName.TryGetValue(name, out datam))
                {
                    datam.AddVersionInfo(data);
                }
                else
                {
                    DataManagerFromName[name] = new DataManager();
                    DataManagerFromName[name].AddVersionInfo(data);
                }

                NameIsReady[name] = done;
            }

            foreach (FolderTrackCallBack flCall in CallList)
            {
                flCall.SendDataV(data, name, idnum, done);
            }
        }
Exemplo n.º 10
0
        private void getMonitorGroupVersionsOfOld(string MonitorGroup)
        {
            Util.DBug2("DataReceiver", "Call FolderTrack.GetFullMonitorGroupVer " + MonitorGroup);
            List<VersionInfo> monitorGroupVersions;
            do
            {
                monitorGroupVersions = pFolderTrack.GetFullMonitorGroupVer(MonitorGroup);
                Util.DBug2("DataReceiver", "Returned FolderTrack.GetFullMonitorGroupVer " + MonitorGroup);
                //     List<VersionInfo> monitorGroupVersions = Functions.DeserializeFromFile<List<VersionInfo>>("monitorGroupVers.dat");
                //    Functions.SerializeToFile<List<VersionInfo>>("monitorGroupVers.dat",monitorGroupVersions);
                if (monitorGroupVersions == null)
                {
                    Thread.Sleep(2000);
                }
            } while (monitorGroupVersions == null);

               DataManagerFromName[MonitorGroup] = new DataManager();
            Util.DBug2("DataReceiver", "Call Create new manager ");
            DataManagerFromName[MonitorGroup].AddVersionInfo(monitorGroupVersions);
            Util.DBug2("DataReceiver", "Call add version");
            Util.DBug2("DataReceiver", "Call Userversions");
            List<string> UserVersions = pFolderTrack.UserVersionList(MonitorGroup);
            Util.DBug2("DataReceiver", "Userversions returned");
            if (UserVersions == null)
            {
                Util.DBug2("DataReceiver", "Userversions is null");
            }
            DataManagerFromName[MonitorGroup].setUserVersions(UserVersions);
            Util.DBug2("DataReceiver", "Set user returned");
            //        m_FolderTrackGui.setVersionsOfMonitorGroup(MonitorGroup,monitorGroupVersions);
        }
Exemplo n.º 11
0
 /// <summary>
 /// Expects ever versioninfo
 /// </summary>
 /// <param name="MonitorGroup"></param>
 /// <param name="vers"></param>
 public void NewVersionInformation(string MonitorGroup, List<VersionInfo> vers)
 {
     DataManager newData;
     if (DataManagerFromName.TryGetValue(MonitorGroup, out newData))
     {
         newData.ClearAll();
         newData.AddVersionInfo(vers);
     }
     else
     {
         DataManagerFromName[MonitorGroup] = new DataManager();
         DataManagerFromName[MonitorGroup].AddVersionInfo(vers);
     }
     foreach (FolderTrackCallBack flCall in CallList)
     {
         try
         {
             flCall.NewVersionInformation(MonitorGroup, vers);
         }
         catch (Exception)
         {
             //Dont care
         }
     }
 }
Exemplo n.º 12
0
        public DataManager GetDataManagerFromName(string MonitorGroupName, FolderTrack.Delete.DeleteRules.DeleteReturn delret)
        {
            DataManager returnDataManager;
            Util.DBug2("DataReceiver", "Enter GetDataManagerFromName");
            bool correctDeleRetu = false;
            FolderTrack.Delete.DeleteRules.DeleteReturn outDelR;
            if (DelereReturnFromName.TryGetValue(MonitorGroupName, out outDelR))
            {
                if (outDelR == delret)
                {
                    correctDeleRetu = true;
                }
            }
            if (DataManagerFromName.TryGetValue(MonitorGroupName, out returnDataManager) &&
                correctDeleRetu)
            {
                Util.DBug2("DataReceiver", "Enter Manager found");
                pSendToAll = DONT_KEEP;
                SendDataV(new List<VersionInfo>(returnDataManager.VersionList.Values), MonitorGroupName, pSendToAll, true);
                return returnDataManager;
            }
            else
            {
                DataManagerFromName[MonitorGroupName] = new DataManager();
                DelereReturnFromName[MonitorGroupName] = delret;

                Util.DBug2("DataReceiver", "Call getMonitorGroupVersionsOf");
                pSendToAll = getMonitorGroupVersionsOf(MonitorGroupName, delret);
                Util.DBug2("DataReceiver", "getMonitorGroupVersionsOf returned");
                return DataManagerFromName[MonitorGroupName];
            }
        }