Example #1
0
        void SetClientInfo(HubClient hubClient)
        {
            if (InvokeRequired)
            {
                Invoke(new Action <HubClient>(SetClientInfo), hubClient);
            }
            else
            {
                var seq = from HubClientEnvironment hce in m_ndxerClientEnv.Source.Enumerate()
                          where hce.ClientID == hubClient.ID
                          orderby hce.CreationTime descending
                          select hce;


                HubClientEnvironment clEnv = seq.First();

                var clStatus = m_ndxerStatus.Get(hubClient.ID) as ClientStatus;

                m_lblContact.Text         = hubClient.ContactName;
                m_lblCreationTime.Text    = GetComprehensiveTime(hubClient.CreationTime);
                m_lblEMail.Text           = hubClient.ContaclEMail;
                m_lblHubArchitecture.Text = AppArchitectures.GetArchitectureName(clEnv.HubArchitecture);
                m_lblHubVersion.Text      = clEnv.HubVersion;
                m_lblLastActivity.Text    = GetComprehensiveTime(clStatus.LastSeen);
                m_lblMachineName.Text     = clEnv.MachineName;
                m_lblOSArchitecture.Text  = clEnv.Is64BitOperatingSystem ? "64 Bits" : "32 Bits";
                m_lblOSVersion.Text       = clEnv.OSVersion;
                m_lblPhone.Text           = hubClient.ContactPhone;
                m_lblStatus.Text          = ClientStatuses.GetStatusName(clStatus.Status);
                m_lblUserName.Text        = clEnv.UserName;
            }
        }
Example #2
0
        protected override string[] GetContent()
        {
            string deployStr = DeployTime == NOT_YET ? "" : (DeployTime == NEVER ? "Ignorée" : DeployTime.ToString());

            return(new[]
            {
                ID.ToString(),
                Version.ToString(),
                AppArchitectures.GetArchitectureName(AppArchitecture),
                CreationTime.ToString(),
                DeployTime == NOT_YET? "" : (DeployTime == NEVER? "Ignorée" : DeployTime.ToString())
            });
        }
Example #3
0
 protected override string[] GetContent()
 {
     return(new[]
     {
         ID.ToString(),
         ClientID.ToString("X"),
         UserName,
         MachineName,
         OSVersion,
         Is64BitOperatingSystem? "64 Bits" : "32 Bits",
         HubVersion,
         AppArchitectures.GetArchitectureName(HubArchitecture)
     });
 }
Example #4
0
        void LoadDataAsync()
        {
            Func <ListViewItem[]> load = () =>
            {
                var items = new List <ListViewItem>();

                items.Add(CreateLVI("ID", m_update.ID.ToString("X")));
                items.Add(CreateLVI("Crée le", m_update.CreationTime.ToString()));
                items.Add(CreateLVI("Version", m_update.Version.ToString()));
                items.Add(CreateLVI("Architecture", AppArchitectures.GetArchitectureName(m_update.AppArchitecture)));
                items.Add(CreateLVI(""));
                items.Add(CreateLVI("Fichiers:"));

                string fileName = m_update.ID.ToString("X");
                string filePath = Path.Combine(AppPaths.AppUpdateFolder, fileName);

                foreach (string item in FilesBag.GetContent(filePath))
                {
                    items.Add(CreateLVI(item));
                }

                return(items.ToArray());
            };

            var waitDlg = new Waits.WaitClue(this);

            Action <Task <ListViewItem[]> > onSuccess = t =>
            {
                m_lvData.Items.AddRange(t.Result);
                m_lvData.AdjustColumnsSize();
                waitDlg.LeaveWaitMode();
            };

            Action <Task> onErr = t =>
            {
                waitDlg.LeaveWaitMode();
                MessageBox.Show(t.Exception.InnerException.Message, null,
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            };

            var task = new Task <ListViewItem[]>(load, TaskCreationOptions.LongRunning);

            task.OnSuccess(onSuccess);
            task.OnError(onErr);
            task.Start();
            waitDlg.EnterWaitMode();
        }
Example #5
0
 public override string ToString() => AppArchitectures.GetArchitectureName(Architecture);