public bool UnInstallUpdates(UpdateCollection Updates) { if (mInstalationJob != null) { return(false); } if (mInstaller == null) { mInstaller = mUpdateSession.CreateUpdateInstaller() as UpdateInstaller; } mInstaller.Updates = new UpdateCollection(); foreach (IUpdate update in Updates) { if (!update.IsUninstallable) { AppLog.Line(Program.fmt("Update can not be uninstalled: {0}", update.Title)); continue; } mInstaller.Updates.Add(update); } if (mDownloader.Updates.Count == 0) { AppLog.Line(Program.fmt("No updates selected or eligible for uninstallation")); return(false); } mCallback = new UpdateCallback(this); AppLog.Line(Program.fmt("Removing Updates... This may take several minutes.")); mCallback.Install = false; mInstalationJob = mInstaller.BeginUninstall(mCallback, mCallback, null); return(true); }
protected void OnUpdatesDownloaded(IDownloadJob downloadJob, bool Install) { if (downloadJob != mDownloadJob) { return; } mDownloadJob = null; mCallback = null; IDownloadResult DownloadResults = null; try { DownloadResults = mDownloader.EndDownload(downloadJob); } catch (Exception err) { AppLog.Line(Program.fmt("Downloading updates failed, Error: {0}", err.Message)); OnFinished(false); return; } AppLog.Line(Program.fmt("Updates downloaded to %windir%\\SoftwareDistribution\\Download")); if (Install) { InstallUpdates(downloadJob.Updates); } else { OnFinished(true); } }
private bool InstallUpdates(UpdateCollection Updates) { if (mCallback != null) { return(false); } if (mInstaller == null) { mInstaller = mUpdateSession.CreateUpdateInstaller() as UpdateInstaller; } mInstaller.Updates = Updates; if (mDownloader.Updates.Count == 0) { AppLog.Line(Program.fmt("No updates selected or downloaded for instalation")); return(false); } mCallback = new UpdateCallback(this); AppLog.Line(Program.fmt("Installing Updates... This may take several minutes.")); mCallback.Install = true; mInstalationJob = mInstaller.BeginInstall(mCallback, mCallback, null); return(true); }
public bool DownloadUpdates(UpdateCollection Updates, bool Install = false) { if (mCallback != null) { return(false); } if (mDownloader == null) { mDownloader = mUpdateSession.CreateUpdateDownloader(); } mDownloader.Updates = new UpdateCollection(); foreach (IUpdate update in Updates) { if (update.EulaAccepted == false) { update.AcceptEula(); } mDownloader.Updates.Add(update); } if (mDownloader.Updates.Count == 0) { AppLog.Line(Program.fmt("No updates selected for download")); return(false); } mCallback = new UpdateCallback(this); mCallback.Install = Install; AppLog.Line(Program.fmt("Downloading Updates... This may take several minutes.")); mDownloadJob = mDownloader.BeginDownload(mCallback, mCallback, null); return(true); }
public static void UpdateAssetBundle(string name, string path, int ver, UpdateCallback callback) { localFileInfo[name] = path; localFileVer[name] = ver; if (name.CompareTo("AssetBundle") == 0) { manifestAssetBundle.Unload(false); Instance.StartCoroutine(DownloadAsseBundle(path, ver, (AssetBundle asset) => { manifestAssetBundle = asset; manifest = asset.LoadAsset <AssetBundleManifest>("AssetBundleManifest"); if (callback != null) { callback(name); } })); return; } if (loadedInfo.ContainsKey(name)) { callback(name); } else { Instance.StartCoroutine(DownloadAsseBundle(path, ver, (AssetBundle asset) => { if (callback != null) { callback(name); } })); } }
public Animation(Control control, int animMS, bool autoRest) { this.control = control; this.autoRest = autoRest; this.animMS = animMS; updateDet = new UpdateCallback(Update); }
public static void Start(UpdateCallback callback) { if (!DLLAvailable()) { return; } // Make a wrapper to convert from the native enum to SMXUpdateCallbackReason. InternalUpdateCallback NewCallback = delegate(int PadNumber, int reason, IntPtr user) { SMXUpdateCallbackReason ReasonEnum = (SMXUpdateCallbackReason)Enum.ToObject(typeof(SMXUpdateCallbackReason), reason); callback(PadNumber, ReasonEnum); }; if (callback == null) { NewCallback = null; } SMX_Start(NewCallback, IntPtr.Zero); // Keep a reference to the delegate, so it isn't garbage collected. Do this last. Once // we do this the old callback may be collected, so we want to be sure that native code // has already updated the callback. CurrentUpdateCallback = NewCallback; Console.WriteLine("Struct sizes (C#): " + Marshal.SizeOf(typeof(SMXConfig)) + " " + Marshal.SizeOf(typeof(SMXInfo)) + " " + Marshal.SizeOf(typeof(SMXSensorTestModeData))); }
public void RegisterUpdateCallback(UpdateCallback toRegister) { if (!_timerCallbacks.Contains(toRegister)) { _timerCallbacks.Add(toRegister); } }
private void Test_Load(object sender, EventArgs e) { getData(); //arrayEPC[0] = "000000000958"; //arrayEPC[1] = "000000000992"; //arrayEPC[2] = "000000000959"; //arrayEPC[3] = "000000000956"; //arrayEPC[4] = "000000000955"; //arrayEPC[5] = "000000000954"; //arrayEPC[6] = "000000000953"; //arrayEPC[7] = "000000000921"; //arrayEPC[8] = "000000000922"; //arrayEPC[9] = "000000000914"; //arrayEPC[10] = "000000000947"; //arrayEPC[11] = "000000000946"; //arrayEPC[12] = "000000000919"; //arrayEPC[13] = "000000000945"; //arrayEPC[14] = "000000000942"; //arrayEPC[15] = "000000000929"; //arrayEPC[16] = "000000000913"; //arrayEPC[17] = "000000000927"; //arrayEPC[18] = "000000000926"; //arrayEPC[19] = "000000000923"; //arrayEPC[20] = "000000000912"; //arrayEPC[21] = "000000000920"; //arrayEPC[22] = "000000000930"; setTextCallback = new SetTextCallback(UpdataEPC); updateCallback = new UpdateCallback(UpdateListView); MainForm.eventOpen += MainForm_eventOpen; }
public static void SetUpdateCallback(UpdateCallback callback) { if (!DLLAvailable()) { return; } }
/// <summary> /// 每回合调用times次cb,辅助函数 /// </summary> /// <param name="times">调用次数</param> /// <param name="cb">回调函数</param> private void PerRound(int times, UpdateCallback cb) { if (times >= RoundTicks || _tick % (RoundTicks / times) == 0) { cb(); } }
protected void OnUpdatesDownloaded(IDownloadJob downloadJob, List <MsUpdate> Updates) { if (downloadJob != mDownloadJob) { return; } mDownloadJob = null; mCallback = null; IDownloadResult DownloadResults = null; try { DownloadResults = mDownloader.EndDownload(downloadJob); } catch (Exception err) { AppLog.Line("Downloading updates failed"); LogError(err); OnFinished(false); return; } OnUpdatesChanged(); if (mCurOperation == AgentOperation.PreparingUpdates) { InstallUpdates(Updates); } else { AppLog.Line("Updates downloaded to %windir%\\SoftwareDistribution\\Download"); OnFinished(DownloadResults.ResultCode == OperationResultCode.orcSucceeded); } }
/// <summary>Calls a function every frame. If <paramref name="order"/> >= 0, function is called after LateUpdate; otherwise it is called before LateUpdate.</summary> /// <param name="receiver">Function to call</param> /// <param name="order">Determines the execution order of the function. A function with a smaller order is executed before a function with a larger order. /// </param> public static void AddLateUpdateReceiver(UpdateCallback receiver, int order = 0) { if (order < 0) { if (preLateUpdateNode == null) { preLateUpdateNode = FetchUpdateNode(receiver, order, null); preCallbackBroadcaster.OnLateUpdate = OnPreLateUpdateCall; } else { preLateUpdateNode = AddReceiverInternal(receiver, order, preLateUpdateNode); } } else { if (postLateUpdateNode == null) { postLateUpdateNode = FetchUpdateNode(receiver, order, null); postCallbackBroadcaster.OnLateUpdate = OnPostLateUpdateCall; } else { postLateUpdateNode = AddReceiverInternal(receiver, order, postLateUpdateNode); } } }
private void OnMeshDataReceived(object meshDataObject) { Mesh = ((MeshData)meshDataObject).CreateMesh(); HasMesh = true; UpdateCallback?.Invoke(); }
public void Init(int count, UpdateCallback callback) { Clear(); m_UpdateCallback = callback; if ((m_n32Count = count) < 1) { return; } m_targetItem = Mathf.Clamp(m_targetItem, 0, road.Length - 1); for (int i = 0, length = road.Length; i < length; ++i) { GameObject obj = Instantiate(m_objPrefab) as GameObject; obj.transform.parent = road[i]; obj.transform.localPosition = Vector3.zero; obj.transform.localScale = Vector3.one; obj.name = i.ToString("000"); int index = (i - m_targetItem) % count; if (index < 0) { index += count; } m_UpdateCallback(index, obj); m_objRecords.Add(new Item() { m_n32Index = index, m_pobjGameObject = obj }); } }
/// <summary> /// Register a new UpdateCallback that is called one time /// </summary> /// <param name="callback"></param> /// <param name="priority"></param> /// <returns></returns> public CUpdateScope ConnectOneTimeUpdate(UpdateCallback callback, EUpdatePriority priority) { CUpdateScope outScope = new CUpdateScope(callback); m_oneTimeUpdateBucket[(int)priority].Add(outScope); return(outScope); }
private static UpdateNode AddReceiverInternal(UpdateCallback receiver, int order, UpdateNode head) { if (head.order < order) { UpdateNode cachedHead = head; UpdateNode next = head.next; while (next != null && next.order <= order) { head = next; next = head.next; } if (head.order < order) { head.next = FetchUpdateNode(receiver, order, next); } else { head.receivers.Add(receiver); } return(cachedHead); } if (head.order == order) { head.receivers.Add(receiver); return(head); } return(FetchUpdateNode(receiver, order, head)); }
void OnEvaluationDone(string id, ObjectValue val) { if (val == null) { val = ObjectValue.CreateUnknown(null); } UpdateCallback cb = null; lock (asyncCallbacks) { if (asyncCallbacks.TryGetValue(id, out cb)) { try { cb.UpdateValue(val); } catch {} asyncCallbacks.Remove(id); } else { asyncResults [id] = val; } } }
private RetCodes SearchForUpdates() { mCurOperation = AgentOperation.CheckingUpdates; OnProgress(-1, 0, 0, 0); mCallback = new UpdateCallback(this); AppLog.Line("Searching for updates"); //for the above search criteria refer to // http://msdn.microsoft.com/en-us/library/windows/desktop/aa386526(v=VS.85).aspx try { //string query = "(IsInstalled = 0 and IsHidden = 0) or (IsInstalled = 1 and IsHidden = 0) or (IsHidden = 1)"; //string query = "(IsInstalled = 0 and IsHidden = 0) or (IsInstalled = 1 and IsHidden = 0) or (IsHidden = 1) or (IsInstalled = 0 and IsHidden = 0 and DeploymentAction='OptionalInstallation') or (IsInstalled = 1 and IsHidden = 0 and DeploymentAction='OptionalInstallation') or (IsHidden = 1 and DeploymentAction='OptionalInstallation')"; string query; if (MiscFunc.IsWindows7OrLower) { query = "(IsInstalled = 0 and IsHidden = 0) or (IsInstalled = 1 and IsHidden = 0) or (IsHidden = 1)"; } else { query = "(IsInstalled = 0 and IsHidden = 0 and DeploymentAction=*) or (IsInstalled = 1 and IsHidden = 0 and DeploymentAction=*) or (IsHidden = 1 and DeploymentAction=*)"; } mSearchJob = mUpdateSearcher.BeginSearch(query, mCallback, null); } catch (Exception err) { return(OnWuError(err)); } return(RetCodes.InProgress); }
private void PerRound(int times, UpdateCallback cb) { if (_tick % (Round / times) == 0) { cb(); } }
public UpdateThunk(TangleKey key, ref T value, DecisionUpdateCallback <T> callback) { Key = key; Value = value; Callback = null; DecisionCallback = callback; }
public State(string name) { this.onEnter = (State state, Event ev) => {}; this.onExit = (State state, Event ev) => {}; this.onUpdate = (State State) => {}; this.name = name; }
/// <summary> /// Register a new late update function at the specified level (executed low to high). /// </summary> static public void AddLateUpdate(int level, Component mb, UpdateCallback callback) { if (Application.isPlaying) { CreateInstance(); AddUpdate(mInstance.mLate, level, mb, callback); } }
public ScAnimation(ScLayer layer, bool autoRest) { this.layer = layer; this.autoRest = autoRest; updateDet = new UpdateCallback(Update); layer.AppendAnimation(this); }
/// <summary> /// Register a new update function at the specified level (executed low to high). /// </summary> public static void AddUpdate(int level, Component mb, UpdateCallback callback) { if (Application.isPlaying) { CreateInstance(); AddUpdate(mInstance.mUpdate, level, mb, callback); } }
/// <summary> /// Register a new late update function at the specified level (executed low to high). /// </summary> public static void AddLateUpdate(int level, MonoBehaviour mb, UpdateCallback callback) { if (Application.isPlaying) { CreateInstance(); AddUpdate(mInstance.mLate, level, mb, callback); } }
public BatchItem(TangleKey key, ref T value, DecisionUpdateCallback <T> callback) { Key = key; Value = value; AllowReplacement = false; Callback = null; DecisionCallback = callback; }
public BatchItem(TangleKey key, ref T value, bool allowReplacement) { Key = key; Value = value; AllowReplacement = allowReplacement; Callback = null; DecisionCallback = null; }
/// <summary> /// Register a new update function at the specified level (executed low to high). /// </summary> static public void AddUpdate(int level, MonoBehaviour mb, UpdateCallback callback) { if (Application.isPlaying) { CreateInstance(); AddUpdate(mInstance.mUpdate, level, mb, callback); } }
public void AddOrUpdate(TangleKey key, ref T value, UpdateCallback <T> updateCallback) { if (_Count >= Capacity) { throw new IndexOutOfRangeException(); } Buffer[_Count++] = new BatchItem <T>(key, ref value, updateCallback); }
public void Populate(int order, UpdateCallback receiver, UpdateNode next) { this.order = order; receivers = new List <UpdateCallback>(); receivers.Add(receiver); this.next = next; }
public Updater(ExchangeLink l, UpdateCallback cb, int interval) { _link = l; _callback = cb; _timer = new Timer(); _timer.Interval = interval; _timer.Elapsed += new ElapsedEventHandler(DoUpdate); _timer.Enabled = false; }
/// <summary> /// Register a new UpdateCallback that is called every frame until disconnected /// </summary> /// <param name="callback"></param> /// <param name="priority"></param> /// <returns></returns> public CUpdateScope Connect(UpdateCallback callback, EUpdatePriority priority) { CUpdateScope outScope = new CUpdateScope(callback); // Add the scope to the priority bucket m_priorityUpdateBuckets[(int)priority].Add(outScope); return(outScope); }
public DisplayControl() { ChartDirector.Chart.setLicenseCode("DIST-0000-0536-4cc1-aec1"); configDisplayPanelList = new List<StackPanel>(); measureUpdateCallBack = new UpdateCallback(this.UpdateMeasures); InitializeComponent(); ReloadConfigDisplays(); }
/// <summary> /// Helper function that checks to see if an entry already exists before adding it. /// </summary> static void AddUpdate(List<Entry> list, int level, Component mb, UpdateCallback cb) { // Try to find an existing entry foreach (Entry e in list) { if (e.mb == mb && e.callback == cb) { e.level = level; return; } } // Add a new entry Entry ent = new Entry(); ent.level = level; ent.mb = mb; ent.callback = cb; list.Add(ent); list.Sort(Comparer); }
public void submitSequence(TraceSequence sequence, UpdateCallback callback) { _service.submitSequence(sequence, callback, _caller); }
public void submitScript(string script, UpdateCallback callback) { _service.submitScript(script, callback, _caller); }
private void bootstrap(ContainerRoot model, UpdateCallback callback) { var emptyModel = initialModel(); Core.getFactory().root(emptyModel); var compare = Core.getFactory().createModelCompare(); compare.merge(emptyModel, model).applyOn(emptyModel); Core.update(new ContainerRootMarshalled(emptyModel), callback, "/"); }
public void set_callback(UpdateCallback callback) { registerValueCallback(callback); }
public FeeUpdater(ExchangeLink l, UpdateCallback cb, int interval) : base(l, cb, interval) { }
/// <summary> /// Updates : settings tab and profiles tab /// </summary> public void updategui() { try { if (InvokeRequired) { UpdateCallback d = new UpdateCallback(updategui); Invoke(d, new object[] { }); //BeginInvoke(d, new object[] { }); } else { /* // Update Monitoring list Contextual menu ResultListContextMenu = new ContextMenuStrip(); // define a sub menu (csm1) ToolStripMenuItem csm1 = new ToolStripMenuItem("Apply a quality profile"); // define 1 sub item per quality profile in this sub menu //foreach (string name in qaClass.profManager.List) { //csm1.DropDownItems.Add(name, null,new EventHandler(ForceNewProfile)); } // test //ResultListContextMenu.Items.Add(csm1); // link the updated context menu strip to the monitoring list view. //ResultListView.ContextMenuStrip = MonitoringListContextMenu; */ // settings tab //NbThreadsNumeric.Value = qaClass.settings.nbThreads; // ProcessorsLabel.Text = qaClass.jobManager.ProcessorsString; //Melek - No more processor label on the UI // CacheDirSizeBox.Value = qaClass.settings.CacheLimit; //Melek - cache was disabled // ZipResBox.Checked = qaClass.settings.ZipRes; //Melek - no more zip functionality // profiles tab //string op = "updategui"; refreshProfilesTab("updategui");//Melek - updategui parameter added } } catch (Exception ex) { Global.log("Problem while updating quality settings on GUI\n" + ex); } }
private void LoadKevScript(string defaultKevScript, UpdateCallback callback) { var emptyModel = initialModel(); Core.getFactory().root(emptyModel); Core.getLogger().Debug(defaultKevScript); try { _kevScriptEngine.execute(defaultKevScript, emptyModel); } catch (java.lang.Exception e) { throw new Exception(e.getMessage()); } Core.update(new ContainerRootMarshalled(emptyModel), callback, "/"); }
/** * パラメータに変化があった場合に呼び出されるメソッドを登録する */ public void SetUpdateCallback(UpdateCallback callback) { playInfoUpdater += callback; NoticeUpdate(); }
public TabState(UpdateCallback initMethod) { InitializeTab = initMethod; }
/// <summary> /// Makes an update request asynchronously to the remote endpoint /// </summary> /// <param name="sparqlUpdate">SPARQL Update</param> /// <param name="callback">Callback to invoke when the update completes</param> /// <param name="state">State to pass to the callback</param> public void Update(String sparqlUpdate, UpdateCallback callback, Object state) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.Uri); request.Method = "POST"; request.ContentType = MimeTypesHelper.WWWFormURLEncoded; request.Accept = MimeTypesHelper.Any; #if DEBUG if (Options.HttpDebugging) { Tools.HttpDebugRequest(request); } #endif request.BeginGetRequestStream(result => { Stream stream = request.EndGetRequestStream(result); using (StreamWriter writer = new StreamWriter(stream)) { writer.Write("update="); writer.Write(HttpUtility.UrlEncode(sparqlUpdate)); writer.Close(); } request.BeginGetResponse(innerResult => { using (HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(innerResult)) { #if DEBUG if (Options.HttpDebugging) { Tools.HttpDebugResponse(response); } #endif response.Close(); callback(state); } }, null); }, null); }
private void RefreshOrders() { if (this.InvokeRequired) { UpdateCallback callback = new UpdateCallback(RefreshOrders); this.Invoke(callback, null); } else { buyOrdersView.DataSource = _buyOrders; sellOrdersView.DataSource = _sellOrders; List<SortInfo> sortData = new List<SortInfo>(); sortData.Add(new SortInfo(BuyOrderDateTimeColumn.Index, BuyOrderDateTimeColumn.DataPropertyName)); buyOrdersView.GridSortInfo = sortData; List<SortInfo> sortData2 = new List<SortInfo>(); sortData2.Add(new SortInfo(SellOrderDateColumn.Index, SellOrderDateColumn.DataPropertyName)); sellOrdersView.GridSortInfo = sortData2; } }
public void update(IContainerRootMarshalled model, UpdateCallback callback) { _service.update(model, callback, _caller); }
/// <summary> /// Updates the datagridview in settings tab with streams folders / properties /// </summary> public void UpdateFoldersGui() { try { if (StreamFoldersBox.InvokeRequired) { UpdateCallback d = new UpdateCallback(UpdateFoldersGui); Invoke(d, new object[] { }); //BeginInvoke(d, new object[] { }); } else { // Update profile column data ProfileC.Items.Clear(); foreach (string name in qaClass.profManager.List) { ProfileC.Items.Add(name); } StreamFoldersBox.Rows.Clear(); DataGridViewRow GridViewRow; foreach (WatchedFolder wf in FoldersManager.WstreamFolders) { GridViewRow = new DataGridViewRow(); GridViewRow.CreateCells(StreamFoldersBox); if (wf.watcher == null) GridViewRow.Cells[0].Value = false; else GridViewRow.Cells[0].Value = wf.watcher.isFolderAvailable; GridViewRow.Cells[1].Value = wf.folder.path; GridViewRow.Cells[2].Value = wf.folder.hot; GridViewRow.Cells[3].Value = wf.folder.priority.ToString(); if (qaClass.profManager.ProfileExists(wf.folder.qualityProfile)) { GridViewRow.Cells[4].Value = wf.folder.qualityProfile; } else { GridViewRow.Cells[4].Value = "default"; } GridViewRow.Cells[5].Value = wf.folder.priorityname.ToString(); StreamFoldersBox.Rows.Add(GridViewRow); } } ResDirTextBox.Text = qaClass.settings.ResFolder.path; //XMLdirTextBox.Text = qaClass.settings.XMLjobFolder.path; //Melek -disabled // XMLupdateDir.Text = qaClass.settings.XMLupdateFolder.path; //Melek -disabled LocalCopyCheckedBox.Checked = qaClass.settings.Keeplocalcopy; // Update summary update condition if (qaClass.settings.UpdateSummary == 1) { UpdateSummaryFiles.Checked = true; UpdateMonitoredStreamsOnlyBox.Enabled = true; } else { UpdateSummaryFiles.Checked = false; UpdateMonitoredStreamsOnlyBox.Enabled = false; } if (qaClass.settings.UpdateMonitoredStreamsOnly == 1) UpdateMonitoredStreamsOnlyBox.Checked = true; else UpdateMonitoredStreamsOnlyBox.Checked = false; if (qaClass.settings.StreamFolders.Count != 0)//Mel - Delete btn synch { DeleteStreamFolderBox.Enabled = true; //ApplyFolderSettingsBox.Enabled = true; } else { DeleteStreamFolderBox.Enabled = false; //ApplyFolderSettingsBox.Enabled = false; } if (qaClass.settings.StreamFolders.Count >= 1)//demostick { AddStreamFolderBox.Enabled = false; } else { AddStreamFolderBox.Enabled = true; } if (qaClass.settings.ReportsFolder!= "") //Melek { RepDirTextBox.Text = qaClass.settings.ReportsFolder; } } catch (Exception ex) { Global.log("Problem while updating the folders preferences.\n" + ex); } }
public TmTreeView() { UpdateDelegate = new UpdateCallback(UpdateNode); }
public static void session_set_update_callback(uint clientId, uint sessionId, UpdateCallback update) { cycles_session_set_update_callback(clientId, sessionId, update); }
public RenderObject(Scene scene, string name, string src) : base(scene, name, src) { textures = new List<Texture>(); pos = new Vector3(0, 0, 0); rot = new Quaternion(0, 0, 0, 1.0f); scale = new Vector3(1.0f, 1.0f, 1.0f); worldMatrix = new Matrix4(); try { XmlDocument roXML = new XmlDocument(); roXML.Load(src); foreach( XmlAttribute attrib in roXML.DocumentElement.Attributes ) { if( attrib.Name == "pos") { string[] values = attrib.Value.Split(','); pos = new Vector3(Convert.ToSingle(values[0]), Convert.ToSingle(values[1]), Convert.ToSingle(values[2])); } else if( attrib.Name == "rot") { string[] values = attrib.Value.Split(','); rot = new Quaternion(Convert.ToSingle(values[0]), Convert.ToSingle(values[1]), Convert.ToSingle(values[2]), Convert.ToSingle(values[3])); } else if( attrib.Name == "scale" ) { string[] values = attrib.Value.Split(','); scale = new Vector3(Convert.ToSingle(values[0]), Convert.ToSingle(values[1]), Convert.ToSingle(values[2])); } else if( attrib.Name == "update" ) { updateCallback = Program.TheForm.FindUpdateFunction(attrib.Value); } } foreach( XmlNode child in roXML.DocumentElement.ChildNodes ) { if( child.NodeType == XmlNodeType.Element ) { string nodeName = child.Attributes.GetNamedItem("name").Value; string nodeSrc = child.Attributes.GetNamedItem("src").Value; if (child.Name == "mesh") { mesh = scene.GetMesh(nodeName, nodeSrc); } else if (child.Name == "shader") { shader = scene.GetShader(nodeName, nodeSrc); } else if (child.Name == "texture") { Texture tex = null; if( nodeSrc == "frameBuffer" ) { var depthTexture = false; XmlAttribute dtAttr = (XmlAttribute)child.Attributes.GetNamedItem("depthTexture"); if( dtAttr != null ) depthTexture = (dtAttr.Value == "true"); FrameBuffer fb = scene.GetFrameBuffer(nodeName, null); if( fb != null ) { if( depthTexture ) tex = fb.depthTexture; else tex = fb.colorTexture; } } else { // Normal texture tex = scene.GetTexture(nodeName, nodeSrc); } if( tex != null ) { var texIndex = 0; XmlAttribute index = (XmlAttribute)child.Attributes.GetNamedItem("texIndex"); if( index != null) texIndex = Convert.ToInt32(index.Value); while (textures.Count <= texIndex) textures.Add(null); textures[texIndex] = tex; } } else if (child.Name == "shadowCamera") { shadowCamera = scene.GetCamera(nodeName, nodeSrc); } } } } catch(Exception e) { System.Windows.Forms.MessageBox.Show("Failed to load render object: " + src + "\r\n" + e.Message); } UpdateWorldMatrix(); }
public abstract void Commit(string[] paths, string message, UpdateCallback callback);
public abstract void Update(string path, bool recurse, UpdateCallback callback);
/** * <summary> * Registers the callback function that is invoked on every change of advertised value. * <para> * The callback is invoked only during the execution of <c>ySleep</c> or <c>yHandleEvents</c>. * This provides control over the time when the callback is triggered. For good responsiveness, remember to call * one of these two functions periodically. To unregister a callback, pass a null pointer as argument. * </para> * <para> * </para> * </summary> * <param name="callback"> * the callback function to call, or a null pointer. The callback function should take two * arguments: the function object of which the value has changed, and the character string describing * the new advertised value. * @noreturn * </param> */ public void registerValueCallback(UpdateCallback callback) { if (callback != null) { _registerFuncCallback(this); } else { _unregisterFuncCallback(this); } _callback = new UpdateCallback(callback); }
public void compareAndSwap(IContainerRootMarshalled model, Guid uuid, UpdateCallback callback) { _service.compareAndSwap(model, uuid, callback, _caller); }
public void RegisterUpdateCallback(UpdateCallback func) { updateCallback += func; }
private void RefreshGUI() { if (this.InvokeRequired) { UpdateCallback callback = new UpdateCallback(RefreshGUI); this.Invoke(callback, null); } else { lblSellOrders.Visible = _ordersDataVisible; sellOrdersView.Visible = _ordersDataVisible; lblBuyOrders.Visible = _ordersDataVisible; buyOrdersView.Visible = _ordersDataVisible; lblBuildingOrdersData.Visible = !_ordersDataVisible; lblBuildingOrdersData.Text = _ordersGettingData ? "Building data view..." : "Set the filters and click retrieve to display data"; //grpTransactionsSummary.Visible = _transactionsDataVisible; if (!_transactionsDataVisible) { lblTransactionsRetrieved.Text = "0 transactions retrieved"; } transactionsView.Visible = _transactionsDataVisible; lblBuildingTransactionsData.Visible = !_transactionsDataVisible; lblBuildingTransactionsData.Text = _transactionsGettingData ? "Building data view..." : "Set the filters and click retrieve to display data"; //grpInventorySummary.Visible = _inventoryDataVisible; inventoryView.Visible = _inventoryDataVisible; lblBuildingInventoryData.Visible = !_inventoryDataVisible; lblBuildingInventoryData.Text = _inventoryGettingData ? "Building data view..." : "Set the filters and click retrieve to display data"; //tabControl1.Enabled = _ordersDataVisible || _transactionsDataVisible || _inventoryDataVisible; bool gettingData = _inventoryGettingData || _transactionsGettingData || _ordersGettingData; chkItems.Enabled = !gettingData; chkOwners.Enabled = !gettingData; chkWallets.Enabled = !gettingData; btnToggleAllItems.Enabled = !gettingData; btnToggleAllOwners.Enabled = !gettingData; btnRetrieve.Text = gettingData ? "Stop" : "Retrieve"; } }
/// <summary> /// Thread safe callback to update the treeview control. /// </summary> /// <param name="agent">Agent node to update</param> /// <param name="node">Child node to update</param> /// <param name="text">Text string to display in the node</param> protected void Update(Agent agent, string node, string text) { if (agent.TreeView.InvokeRequired) { UpdateCallback d = new UpdateCallback(Update); agent.TreeView.Invoke(d, new object[] { agent, node, text }); } else { agent.Nodes[node].Text = text; } }
private static extern void cycles_session_set_update_callback(uint clientId, uint sessionId, UpdateCallback update);