private void mnuPopup_Copy_Click(object sender, System.EventArgs e)
        {
            if (tlcServer.SelectedNode != null)
            {
                NodeData ndp = tlcProfile.SelectedNode.Tag as NodeData;
                NodeData nds = tlcServer.SelectedNode.Tag as NodeData;

                // update startdate
                tlcServer.SelectedNode.SubItems[2].Caption = clsMain.Instance.CurrentConnection.Connection.LocalNow.ToString();
                tlcServer.SelectedNode.SubItems[1].Caption = "False";

                // start servercopy
                JobQueueCheck.RefreshProfileCopy(ndp.Type, nds.Data1, ndp.Data2, tlcServer.SelectedNode.SubItems[0].Caption);

                // refresh JobQueueState
                _InitializeJobQueueThread();
            }
        }
예제 #2
0
        private void mnuPopup_CL2FDS_Click(object sender, System.EventArgs e)
        {
            if (tlcProfile.SelectedNode != null)
            {
                NodeData ndp = tlcProfile.SelectedNode.Tag as NodeData;
                NodeData nds = m_tlnServer.Tag as NodeData;

                // update startdate
                tlcProfile.SelectedNode.SubItems[3].Caption = clsMain.Instance.CurrentConnection.Connection.LocalNow.ToString();
                tlcProfile.SelectedNode.SubItems[2].Caption = "False";

                // start copy from CL
                JobQueueCheck.RefreshProfileCL2FDS(ndp.Type, ndp.Data1, nds.Data1, nds.Data2, m_dbCentralLibrary);

                // refresh JobQueueState
                _InitializeJobQueueThread();
            }
        }
        private void _CheckForNodes(TreeListNodeCollection colItems)
        {
            bool bExistsJobs;

            foreach (TreeListNode tlnServer in colItems)
            {
                NodeData ndp = m_tlnProfile.Tag as NodeData;
                NodeData nds = tlnServer.Tag as NodeData;

                bExistsJobs = JobQueueCheck.ExistsCopyJobs(ndp.Type, nds.Data1, ndp.Data2);

                tlnServer.SubItems[4].Caption = bExistsJobs.ToString();

                tlnServer.ImageIndex = _GetPictureIndex(tlnServer);

                // call recursiv
                _CheckForNodes(tlnServer.Nodes);
            }

            tlcServer.Invalidate();
        }
예제 #4
0
        private void _ThreadFunction()
        {
            bool bExistsJobs;

            try
            {
                List <TreeListNode> lNodes = new List <TreeListNode> (tlcProfile.Nodes.Count);

                lock (tlcProfile.Nodes.SyncRoot)
                {
                    foreach (TreeListNode tlnProfile in tlcProfile.Nodes)
                    {
                        lNodes.Add(tlnProfile);
                    }
                }

                foreach (TreeListNode tlnProfile in lNodes)
                {
                    NodeData nds = m_tlnServer.Tag as NodeData;
                    NodeData ndp = tlnProfile.Tag as NodeData;

                    bExistsJobs = JobQueueCheck.ExistsCopyJobs(ndp.Type, nds.Data1, ndp.Data1);

                    tlnProfile.SubItems[5].Caption = bExistsJobs.ToString();

                    tlnProfile.ImageIndex = _GetPictureIndex(tlnProfile);
                }

                tlcProfile.Invalidate();
            }
            catch (Exception ex)
            {
                // do nothing because its our stupid thread
                Debug.WriteLine(ViException.ErrorString(ex));
            }
        }