private async Task UpdateInfoAsync()
        {
            try
            {
                await _updateSemaphore.WaitAsync();

                InfoCollection.Clear();
                string nl   = Environment.NewLine;
                var    cred = DevicePortalUtil.GetCredential();
                if (cred != null)
                {
                    var ring = await DevicePortalUtil.GetFlightRingAsync(cred.UserName, cred.Password);

                    if (ring != null)
                    {
                        CurrentFlightRing = ring;
                    }
                    var telemetryLevelOutput = await DevicePortalUtil.GetTelemetryLevelAsync(cred.UserName, cred.Password);

                    if (telemetryLevelOutput != DevicePortalUtil.InvalidTelemetryValue)
                    {
                        InfoCollection.Add(new InfoDisplayData(Common.GetLocalizedText("TelemetryLevelText") + ": ",
                                                               DevicePortalUtil.TelemetryLevelToFriendlyName(telemetryLevelOutput)));
                    }
                }
                else
                {
                    App.LogService.Write("Credential is null", Windows.Foundation.Diagnostics.LoggingLevel.Warning);
                }
            }
            finally
            {
                _updateSemaphore.Release();
            }
        }
 public void GetAllKeyInfoCollection()
 {
     foreach (var item in KeyList)
     {
         InfoCollection.Add(GetKeyInfo(item));
     }
 }
Beispiel #3
0
        protected override void RegisterAvailableViewsCore(InfoCollection collection)
        {
            base.RegisterAvailableViewsCore(collection);

            //Sürükle bırak yaptığımızda oluşucak gridin varsayılan yerine bizim oluşturduğumuz grid den meydana gelmesi için yazıldı.
            collection.Add(new MyGridInfoRegistrator());
        }
Beispiel #4
0
 /// <summary>
 ///  向容器中注册所有的控件
 /// </summary>
 /// <param name="collection"></param>
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new CustomGridInfoRegistrator());//表格 自定义
     //collection.Add(new CustomBandedGridInfoRegistrator());//带表头
     //collection.Add(new CardInfoRegistrator());//卡片
     //collection.Add(new AdvBandedGridInfoRegistrator());//高级表头
 }
Beispiel #5
0
 protected virtual void Add(StreamType type, int index, EntryKey entry, string value, string unit)
 {
     if (string.IsNullOrEmpty(value))
     {
         return;
     }
     infos.Add(new InfoEntry(new StreamTypeEntryPair(type, index, entry), value.Trim(), unit, this));
 }
Beispiel #6
0
        protected override void RegisterAvailableViewsCore(InfoCollection collection)
        {
            base.RegisterAvailableViewsCore(collection);
            collection.Add(new MyGridViewInfoRegistrator());

            this.KeyDown += (s, e) =>
            {
                try
                {
                    var gc = this;

                    if (gc != null)
                    {
                        ControlNavigator cn = (ControlNavigator)gc.EmbeddedNavigator;
                        switch (e.KeyCode)
                        {
                        case Keys.F6:
                            if (e.Shift)
                            {
                                if (cn.Buttons.Remove.Enabled && cn.Buttons.Remove.Visible)
                                {
                                    cn.Buttons.DoClick(cn.Buttons.Remove);
                                }
                            }
                            else
                            {
                                if (cn.Buttons.Append.Enabled && cn.Buttons.Append.Visible)
                                {
                                    cn.Buttons.DoClick(cn.Buttons.Append);
                                }
                            }

                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show(ex.GetFullExceptionErrMessage());
                }
            };
        }
Beispiel #7
0
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new CustomGridInfoRegistrator());
 }
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new BasicGridViewInfoRegistratorReadOnly());
 }
Beispiel #9
0
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new MyGridViewInfoRegistrator());
     collection.Add(new MyBandedGridViewInfoRegistrator());
 }
Beispiel #10
0
 ///<summary>Registers the views usable by the grid.</summary>
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(SmartGridView.CreateRegistrator());
 }
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new CustomGridInfoRegistrator());
 }
Beispiel #12
0
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new LibraryGridViewRegistrator());
 }
Beispiel #13
0
 ///<summary>Registers the views usable by the grid.</summary>
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(SmartGridView.CreateRegistrator());
 }
 protected override void RegisterAvailableViewsCore(InfoCollection collection)
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new GridViewInfoRegistratorDescendant());
 }
Beispiel #15
0
 protected override void RegisterAvailableViewsCore(InfoCollection collection)   // Kendi oluşturduğumuz GridView i kullanmak için ekledik
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new MyGridInfoRegistrator());
 }
Beispiel #16
0
 protected override void RegisterAvailableViewsCore(InfoCollection collection)//grid sectıgımızde ozellıklerını olutrudugumuz gelsın dıye ovverıde ettık
 {
     base.RegisterAvailableViewsCore(collection);
     collection.Add(new MyGridInfoRegistrator());
 }