コード例 #1
0
ファイル: SparqlView.cs プロジェクト: xiaoxiongnpu/dotnetrdf
        /// <summary>
        /// Creates a new SPARQL View.
        /// </summary>
        /// <param name="sparqlQuery">SPARQL Query.</param>
        /// <param name="store">Triple Store to query.</param>
        protected BaseSparqlView(SparqlQuery sparqlQuery, ITripleStore store)
        {
            _q     = sparqlQuery;
            _store = store;

            _async = new UpdateViewDelegate(UpdateViewInternal);
            Initialise();
        }
コード例 #2
0
ファイル: SparqlView.cs プロジェクト: yuryk53/dotnetrdf
        /// <summary>
        /// Creates a new SPARQL View
        /// </summary>
        /// <param name="sparqlQuery">SPARQL Query</param>
        /// <param name="store">Triple Store to query</param>
        protected BaseSparqlView(SparqlQuery sparqlQuery, ITripleStore store)
        {
            this._q     = sparqlQuery;
            this._store = store;

            this._async = new UpdateViewDelegate(this.UpdateViewInternal);
            this.Initialise();
        }
コード例 #3
0
ファイル: SparqlView.cs プロジェクト: jbunzel/MvcRQ_git
        /// <summary>
        /// Creates a new SPARQL View
        /// </summary>
        /// <param name="sparqlQuery">SPARQL Query</param>
        /// <param name="store">Triple Store to query</param>
        public BaseSparqlView(String sparqlQuery, ITripleStore store)
        {
            SparqlQueryParser parser = new SparqlQueryParser();
            this._q = parser.ParseFromString(sparqlQuery);
            this._store = store;

            this._async = new UpdateViewDelegate(this.UpdateViewInternal);
            this.Initialise();
        }
コード例 #4
0
ファイル: SparqlView.cs プロジェクト: yuryk53/dotnetrdf
        /// <summary>
        /// Creates a new SPARQL View
        /// </summary>
        /// <param name="sparqlQuery">SPARQL Query</param>
        /// <param name="store">Triple Store to query</param>
        protected BaseSparqlView(String sparqlQuery, ITripleStore store)
        {
            SparqlQueryParser parser = new SparqlQueryParser();

            this._q     = parser.ParseFromString(sparqlQuery);
            this._store = store;

            this._async = new UpdateViewDelegate(this.UpdateViewInternal);
            this.Initialise();
        }
コード例 #5
0
        public void UpdateAsync()
        {
            if (!Ready)
            {
                return;
            }
            UpdateViewDelegate d = this.UpdateView;

            Invoke(d);
        }
コード例 #6
0
        public frmLogList()
        {
            InitializeComponent();

            lviewTaskList.Columns.Add("Time", -2, HorizontalAlignment.Left);
            lviewTaskList.Columns.Add("Severity", -2, HorizontalAlignment.Left);
            lviewTaskList.Columns.Add("Source", -2, HorizontalAlignment.Left);
            lviewTaskList.Columns.Add("Info", -2, HorizontalAlignment.Left);

            _updateView = new UpdateViewDelegate(_UpdateView);
            Log.getInstance().EvtLogChanged += new Log.LogChanged(OnLogChanged);
        }
コード例 #7
0
        public frmTagList()
        {
            InitializeComponent();

            tvClassView.ImageList          = Resource.ClassViewImgList;
            tvClassView.TreeViewNodeSorter = new ClassNodeSorter();
            _updateClassView       = new UpdateClassViewDelegate(_TagCache_CacheUpdated);
            TagCache.CacheUpdated += new CacheUpdated(TagCache_CacheUpdated);
            _DGupdateView          = new UpdateViewDelegate(_UpdateView);
            Main.getInstance().EvtFileBufferChanged += new Main.FileBufferChanged(OnLogChanged);
            // When the window is initialized, all tags are loaded from the content.
            //Changes to the label after the event callback to modify
            _LoadClassView();
        }
コード例 #8
0
ファイル: Form1.cs プロジェクト: JuntaoWu/moa-client-robot
        private void UpdateView()
        {
            if (this.availableRoomsListBox.InvokeRequired)
            {
                UpdateViewDelegate d = new UpdateViewDelegate(this.UpdateView);
                this.Invoke(d);
            }
            else
            {
                if (RobotClientStarter.Instance.Client.AppId.Equals("<your appid>"))
                {
                    Console.Out.WriteLine("The appId is not set. Customize your appId in RobotClient.cs. Find help in readme.txt");
                    this.Text = "Error: default appId in use. Customize your appId in RobotClient.cs.";
                }

                this.showGame = RobotClientStarter.Instance.Client.State == ClientState.Joined;

                this.lobbyPanel.Visible = !this.showGame;
                this.gamePanel.Visible  = this.showGame;

                this.availableRoomsListBox.Items.Clear();
                foreach (var v in RobotClientStarter.Instance.Client.RoomInfoList.Values)
                {
                    this.availableRoomsListBox.Items.Add(v);
                }
                this.roomCountLabel.Text = RobotClientStarter.Instance.Client.RoomInfoList.Values.Count.ToString();

                this.playerListBox.Items.Clear();

                // display the room's properties first
                if (RobotClientStarter.Instance.Client != null && RobotClientStarter.Instance.Client.CurrentRoom != null)
                {
                    // display room's name, player count, event count (something this demo's RobotClient does) and properties
                    this.roomNameLabel.Text        = RobotClientStarter.Instance.Client.CurrentRoom.Name;
                    this.roomPlayerCountLabel.Text = RobotClientStarter.Instance.Client.CurrentRoom.PlayerCount.ToString();

                    this.roomPropsLabel.Text   = SupportClass.DictionaryToString(RobotClientStarter.Instance.Client.CurrentRoom.CustomProperties);
                    this.eventsCountLabel.Text = RobotClientStarter.Instance.Client.ReceivedCountMeEvents.ToString();

                    // list all players (by keys, which are most likely sorted)
                    foreach (int playerId in RobotClientStarter.Instance.Client.CurrentRoom.Players.Keys)
                    {
                        this.playerListBox.Items.Add(RobotClientStarter.Instance.Client.CurrentRoom.Players[playerId]);
                    }
                }
            }
        }
コード例 #9
0
 protected void UpdateView()
 {
     if (!this.IsDisposed)
     {
         // Cross-thread calling safety
         if (this.InvokeRequired)
         {
             UpdateViewDelegate d = new UpdateViewDelegate(UpdateView);
             this.Invoke(d, new object[] {});
         }
         else
         {
             this.SetHeadingText(actions.Count);
             this.listViewActions.VirtualListSize = actions.Count;
             this.listViewActions.Invalidate();
         }
     }
 }
コード例 #10
0
ファイル: ViewControllers.cs プロジェクト: htadwilliams/Glue
 private void UpdateListView()
 {
     if (!this.IsDisposed)
     {
         // Cross-thread calling safety
         if (this.InvokeRequired)
         {
             UpdateViewDelegate d = new UpdateViewDelegate(UpdateListView);
             this.Invoke(d, new object[] {});
         }
         else
         {
             if (null != connectedDeviceInfos && this.listViewControllers.VirtualListSize != connectedDeviceInfos.Count)
             {
                 this.listViewControllers.VirtualListSize = connectedDeviceInfos.Count;
                 this.listViewControllers.Invalidate();
             }
         }
     }
 }
コード例 #11
0
ファイル: SparqlView.cs プロジェクト: jbunzel/MvcRQ_git
        /// <summary>
        /// Creates a new SPARQL View
        /// </summary>
        /// <param name="sparqlQuery">SPARQL Query</param>
        /// <param name="store">Triple Store to query</param>
        public BaseSparqlView(SparqlQuery sparqlQuery, ITripleStore store)
        {
            this._q = sparqlQuery;
            this._store = store;

            this._async = new UpdateViewDelegate(this.UpdateViewInternal);
            this.Initialise();
        }
コード例 #12
0
ファイル: taskLog.cs プロジェクト: kkobashi/UICrossThread
        public void Update(TaskLogItem item)
        {
            if (dgv.InvokeRequired)
            {
                // invoke (0) if we are on different threads
                object[] args = new object[] { item };
                UpdateViewDelegate updateViewDelegate = new UpdateViewDelegate(Update);
                dgv.Invoke(updateViewDelegate, args);
            }
            else
            {
                // Add a new row of data (0)
                DataGridViewRow row;
                dgv.Rows.Add();
                row = dgv.Rows[dgv.RowCount - 1];
                row.Cells[0].Value = item.LogDate;
                row.Cells[1].Value = item.LogMsg;

                // make last row be scrolled into view
                dgv.FirstDisplayedScrollingRowIndex = dgv.Rows.Count - 1;
            }
        }
コード例 #13
0
ファイル: DeviceView.cs プロジェクト: adresyazilim/Kolt
        private void UpdateViewFromModel()
        {
            if (this.InvokeRequired)
            {
                var d = new UpdateViewDelegate(this.UpdateViewFromModel);
                this.Invoke(d);
            }
            else
            {
                var model = (KdmDeviceModel)this.deviceProxy.Model;

                this.lblMeasuredLuminance.Text = model.MeasuredLuminance.ToString();
                this.lblCommandedLuminance.Text = model.CommandedLuminance.ToString();
                if (model.BpsMode == BpsMode.Ready)
                {
                    this.lblBpsStatus.Text = @"Ready";
                    this.lblBacklightMode.Text = model.BackLightMode + @" Mode";
                    this.lblBacklightState.Text = model.BacklightState.ToString();
                }
                else
                {
                    this.lblBpsStatus.Text = @"In startup mode";
                    this.lblBacklightMode.Text = @"-";
                    this.lblBacklightState.Text = @"-";
                }
                this.lblBacklightTemperature.Text = model.BacklightTemperature.ToString();

                this.lblAmLcdHeaterState.Text = model.AmLcdHeaterState.ToString();
                this.lblAmLcdHeaterMode.Text = model.AmLcdHeaterMode.ToString();
                this.lblAmLcdTemperature.Text = model.AmLcdTemperature.ToString();

                this.lblFanMode.Text = model.FanMode.ToString();
                this.lblFanState.Text = model.FanState.ToString();

                this.lblPowerSupplyTemperature.Text = model.PowerSupplyTemperature.ToString();

                this.lblSoftwareVersion.Text = model.SoftwareVersion.ToString();
                this.lblSoftwareFamily.Text = model.SoftwareFamily.ToString();

                this.lblDriveStatus.Text = model.DriveStatus.ToString();
                this.lblLedStatus.Text = model.LedStatus.ToString();
                this.lbl28BpsStatus.Text = model.BpsStatus.ToString();
                this.lblTempSensorStatus.Text = model.TemperatureSensorStatus.ToString();
                this.lblProcessorStatus.Text = model.ProcessorStatus.ToString();
                this.lblLedEolStatus.Text = model.LedEolStatus.ToString();
                this.lblAmLcdVccStatus.Text = model.AmLcdVccStatus.ToString();
                this.lblLedDriveStatus.Text = model.LedDriveStatus.ToString();
                this.lblBlueLedChannelStatus.Text = model.BlueLedChannelStatus.ToString();
                this.lblGreenLedChannelStatus.Text = model.GreenLedChannelStatus.ToString();
                this.lblRedLedChannelStatus.Text = model.RedLedChannelStatus.ToString();
            }
        }