private void bw_DoWork(object sender, DoWorkEventArgs e) { QueryExpression qe; if (!string.IsNullOrEmpty(query)) { qe = ((FetchXmlToQueryExpressionResponse)service.Execute(new FetchXmlToQueryExpressionRequest { FetchXml = query })).Query; } else { var searchTerm = e.Argument.ToString(); qe = new QueryExpression("systemuser"); qe.ColumnSet = new ColumnSet(new[] { "systemuserid", "fullname", "businessunitid" }); qe.Criteria = new FilterExpression(LogicalOperator.And) { Filters = { new FilterExpression(LogicalOperator.Or) { Conditions = { new ConditionExpression("fullname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("domainname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("firstname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("lastname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")) } }, new FilterExpression { Conditions ={ new ConditionExpression("isdisabled", ConditionOperator.Equal, false) } } } }; } qe.PageInfo = new PagingInfo { Count = 250, PageNumber = 1, ReturnTotalRecordCount = true }; EntityCollection result; var results = new List <Entity>(); InformationPanel.ChangeInformationPanelMessage(loadingPanel, "Retrieving users..."); do { result = service.RetrieveMultiple(qe); results.AddRange(result.Entities); qe.PageInfo.PageNumber++; } while (result.MoreRecords); e.Result = results; }
void FillGoalList() { foreach (var goal in _currentTierData.goals) { // adjust or add foreach to tip for general tips panel and goals for tier goals GameObject gameObjectTierGoalPanel = Instantiate(tierGoalPanel) as GameObject; GoalPanel goalPanel = gameObjectTierGoalPanel.GetComponent <GoalPanel>(); goalPanel.goalDescription.text = goal.description; gameObjectTierGoalPanel.transform.SetParent(goalSpacer, false); } foreach (var tip in _currentTierData.tips) { GameObject gameObjectTierInfoPanel = Instantiate(tierInfoPanel) as GameObject; InformationPanel InfoPanel = gameObjectTierInfoPanel.GetComponent <InformationPanel>(); InfoPanel.infoDescription.text = tip.description; InfoPanel.infoNumber.text = (_currentTierData.tips.IndexOf(tip) + 1).ToString(); gameObjectTierInfoPanel.transform.SetParent(infoSpacer, false); } }
public void LoadSystemViews(List <Entity> users = null, string returnedTypeExpected = null) { if (!DisplaySystemView && !DisplayRulesTemplate && !DisplaySystemRules && !lvViews.Columns.ContainsKey("User")) { lvViews.Columns.Add(new ColumnHeader { Text = "User", Name = "User", Width = 150 }); lvViews.Columns.Add(new ColumnHeader { Text = "State", Name = "State", Width = 75 }); } if (DisplayRulesTemplate && !lvViews.Columns.ContainsKey("IsDefault")) { lvViews.Columns.Add(new ColumnHeader { Text = "Is Default", Name = "IsDefault", Width = 75 }); } if (DisplaySystemView || DisplayRulesTemplate) { lvViews.ShowGroups = true; } List <Entity> solutions = new List <Entity>(); if (returnedTypeExpected == null) { var sp = new SolutionPicker(service); if (sp.ShowDialog(this) != DialogResult.OK) { return; } solutions = sp.SelectedSolutions; } lvViews.Items.Clear(); loadingPanel = InformationPanel.GetInformationPanel(this, "Retrieving items...", 340, 120); var bw = new BackgroundWorker { WorkerReportsProgress = true }; bw.DoWork += bw_DoWork; bw.ProgressChanged += bw_ProgressChanged; bw.RunWorkerCompleted += bw_RunWorkerCompleted; bw.RunWorkerAsync(new object[] { users, returnedTypeExpected, solutions }); }
public AttributeEditor() { InitializeComponent(); // Setup ViewModel _vm = new AttributeEditorViewModel(new TestableMetadataHelper()); _vm.OnRequestConnection += (sender, args) => { var arg = new RequestConnectionEventArgs { ActionName = "Load", Control = this }; RaiseRequestConnectionEvent(arg); }; _vm.OnEntitiesListChanged += (sender, args) => { cmbEntities.Items.Clear(); cmbEntities.DisplayMember = "DisplayName"; cmbEntities.ValueMember = "SchemaName"; cmbEntities.Items.AddRange(_vm.Entities.ToArray()); }; _vm.OnWorkingStateChanged += (sender, args) => { ManageWorkingState(_vm.WorkingState); }; _vm.OnGetInformationPanel += (sender, args) => { args.Panel = InformationPanel.GetInformationPanel(this, args.Message, args.Width, args.Height); }; _vm.OnShowMessageBox += (sender, args) => { MessageBox.Show(this, args.Message, args.Caption, args.Buttons, args.Icon); }; }
public override void SetUp (InformationPanel information) { base.SetUp (information); SetList (); newsPin.text = AppManager.Instance.NewAuctions.Count.ToString (); tabLabel.text = information.tabsLabels[0]; }
public void RenameView() { if (lvViews.SelectedItems.Count == 1) { var item = lvViews.SelectedItems[0]; var entity = (Entity)item.Tag; var rDialog = new ViewPropertiesDialog { ViewName = entity.GetAttributeValue <string>("name"), ViewDescription = entity.GetAttributeValue <string>("description") }; if (rDialog.ShowDialog(ParentForm) == DialogResult.OK) { entity["name"] = rDialog.ViewName; entity["description"] = rDialog.ViewDescription; loadingPanel = InformationPanel.GetInformationPanel(this, "Updating properties...", 340, 120); var bwUpdateView = new BackgroundWorker { WorkerReportsProgress = true }; bwUpdateView.DoWork += bwUpdateView_DoWork; bwUpdateView.ProgressChanged += bwUpdateView_ProgressChanged; bwUpdateView.RunWorkerCompleted += bwUpdateView_RunWorkerCompleted; bwUpdateView.RunWorkerAsync(entity); } } }
internal void UpdateFilterFromView(bool isSystem) { if (lvViews.SelectedItems.Count == 0) { return; } var view = GetSelectedSystemView().FirstOrDefault(); if (view == null) { MessageBox.Show(this, "Please select a view", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } var rsDialog = new RuleSelectionDialog(service, view.GetAttributeValue <string>("returnedtypecode"), isSystem); if (rsDialog.ShowDialog(this) == DialogResult.OK) { var rule = rsDialog.SelectedRule; loadingPanel = InformationPanel.GetInformationPanel(this, "Updating filter...", 340, 120); var bwUpdateRule = new BackgroundWorker { WorkerReportsProgress = true }; bwUpdateRule.DoWork += bwUpdateRule_DoWork; bwUpdateRule.ProgressChanged += bwUpdateRule_ProgressChanged; bwUpdateRule.RunWorkerCompleted += bwUpdateRule_RunWorkerCompleted; bwUpdateRule.RunWorkerAsync(new object[] { rule, view, isSystem }); } }
/// <summary> /// Detect if there is any step /// </summary> /// <returns> /// Return the detected step Height, if not return zero ///</returns> private float StepDetection() { // temp hit information RaycastHit hit; Vector3 tempPostion = this.targetSphereCollider.center; var distance = 0f; // Check if there is any obstacle in front of feet if (Physics.Raycast(this.transform.position, this.transform.forward, out hit, stepSearchDistance, collisionMask)) { // if is ground in front of player // check if the step is bigger than max size // generate the position for the vertical test // position calculated based on detected distance tempPostion += this.transform.forward * Vector3.Distance(this.transform.position, hit.point); InformationPanel.DebugConsoleInput("In front step distance"); // Evaluate if the step is in range for steping up if (Physics.Raycast(tempPostion, Vector3.down, out hit, this.targetSphereCollider.height * 0.5f) && (distance = Vector3.Distance(hit.point, this.transform.position)) <= maxStepSize) {// if the vertical ray hit a objecto based on the distance from the horizontal one // and the distance from the ground pos to the vertical hit is less than step size, return the step position InformationPanel.DebugConsoleInput("valid step height"); Debug.DrawLine(this.transform.position, hit.point, Color.yellow); return(distance); } } // return 0 if not detected return(0f); }
public void InformationOpen(InformationPanel information) { information.SoldierTarget(targetPosition); information.ImageBarrack(); information.SoldierLocation(doorCreated); }
private void PopulateEntities(bool working) { if (!working) { ClearAllListViews(); ManageWorkingState(true); informationPanel = InformationPanel.GetInformationPanel(this, "Loading entities...", 340, 150); using (var bwFill = new BackgroundWorker()) { bwFill.DoWork += (sender, e) => { var serviceParameters = new ServiceParameters(OrganizationService, MetadataService, NotificationService, ExceptionService); var controller = new EntityController(); e.Result = controller.RetrieveSourceEntitiesList(cbShowSystemAttributes.Checked, cachedMetadata, entityAttributes, serviceParameters); }; bwFill.RunWorkerCompleted += (sender, e) => { informationPanel.Dispose(); var controller = new EntityController(); controller.PopulateEntitiesListView(e.Result as List <ListViewItem>, e.Error, this, lvEntities, NotificationService); ManageWorkingState(false); }; bwFill.RunWorkerAsync(); } } }
private void buttonCDSComboRetrieve_Click(object sender, EventArgs e) { // var infoPanel = InformationPanel.GetInformationPanel(this, "CDS Combo Box Retrieve Example", 340, 150); infoPanel.BringToFront(); Refresh(); textBoxCDSComboProgress.Text = ""; cdsDataComboRetrieve.RetrieveMultiple(xmlViewerFetchCDSCombo.Text, (string message) => { textBoxCDSComboProgress.Text += $"{message}{Environment.NewLine}"; InformationPanel.ChangeInformationPanelMessage(infoPanel, message); Refresh(); }, (int itemCount, Entity FirstItem) => { // Thread.Sleep(2000); textBoxCDSComboProgress.Text += $"Count: {itemCount}{Environment.NewLine}"; InformationPanel.ChangeInformationPanelMessage(infoPanel, $"Count: {itemCount}, Entity: {FirstItem?.Attributes.First().ToString()}"); Refresh(); // Thread.Sleep(2000); if (Controls.Contains(infoPanel)) { infoPanel.Dispose(); Controls.Remove(infoPanel); } }); }
private void Start() { instance = this; playerLivesText = playerLivesObject.GetComponent <Text>(); worldText = worldObject.GetComponent <Text>(); gameOverText = gameOverObject.GetComponent <Text>(); }
internal void ReplaceUserFilters() { if (MessageBox.Show(ParentForm, "Are you sure you want to apply the selected user synchronization filters to other users?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } List <Entity> users = null; var usDialog = new UserSelectionDialog(service); if (usDialog.ShowDialog(this) == DialogResult.OK) { users = usDialog.SelectedUsers; } else { return; } loadingPanel = InformationPanel.GetInformationPanel(this, "Initiating...", 340, 120); var bwReplaceFilters = new BackgroundWorker { WorkerReportsProgress = true }; bwReplaceFilters.DoWork += bwReplaceFilters_DoWork; bwReplaceFilters.ProgressChanged += bwReplaceFilters_ProgressChanged; bwReplaceFilters.RunWorkerCompleted += bwReplaceFilters_RunWorkerCompleted; bwReplaceFilters.RunWorkerAsync(new object[] { GetSelectedUsers()[0], users }); }
private void tsbExport_Click(object sender, EventArgs e) { var sfd = new SaveFileDialog { Title = "Select where to save the file", Filter = "Csv file|*.csv" }; if (sfd.ShowDialog(ParentForm) != DialogResult.OK) { return; } infoPanel = InformationPanel.GetInformationPanel(this, "Exporting many to many relationship records...", 340, 150); listLog.Items.Clear(); var settings = new ImportFileSettings { FirstEntity = ((EntityInfo)cbbFirstEntity.SelectedItem).Metadata.LogicalName, FirstAttributeIsGuid = rdbFirstGuid.Checked, FirstAttributeName = ((AttributeInfo)cbbFirstEntityAttribute.SelectedItem).Metadata.LogicalName, Relationship = ((RelationshipInfo)cbbRelationship.SelectedItem).Metadata.IntersectEntityName, SecondEntity = ((EntityInfo)cbbSecondEntity.SelectedItem).Metadata.LogicalName, SecondAttributeIsGuid = rdbSecondGuid.Checked, SecondAttributeName = ((AttributeInfo)cbbSecondEntityAttribute.SelectedItem).Metadata.LogicalName, }; var exportWorker = new BackgroundWorker(); exportWorker.DoWork += exportWorker_DoWork; exportWorker.RunWorkerCompleted += exportWorker_RunWorkerCompleted; exportWorker.RunWorkerAsync(new object[] { settings, sfd.FileName }); }
/// <summary> /// start the copy operation /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void executeButton_Click(object sender, EventArgs e) { //check if source and target are set - this shouldn't be necessary since the button is disabled if they're not both set, but leaving it in anyway if (_service != null && _targetService != null) { //reset the counter to 0 _counter = 0; //display the initializing message _infoPanel = InformationPanel.GetInformationPanel(this, _initializing, 340, 120); //change the cursor Cursor = Cursors.WaitCursor; //set up and call the backgroundworker - all querying and updates are done there var worker = new BackgroundWorker(); worker.DoWork += WorkerDoWork; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerRunWorkerCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); } else { MessageBox.Show(_unselectedError); } }
void Start() { Content.cellSize = new Vector2(UIManager.sizeDelta.x, Content.cellSize.y); GalleryPanel.galleryAR += Instan; OnSearchHat += SearchHat; m_informationPanel = FindObjectOfType <InformationPanel>(); hatData = FindObjectOfType <HatData>(); EventTrigger trigger = m_ScrollRect.gameObject.GetComponent <EventTrigger>(); EventTrigger.Entry entry = new EventTrigger.Entry(); entry.eventID = EventTriggerType.Drag; entry.callback.AddListener((data) => { OnDragDelegate((PointerEventData)data); }); trigger.triggers.Add(entry); m_ListContentHatPanel = new List <GameObject>(); m_ListElementOffsetX = Screen.width; backButton.onClick.AddListener(() => { AppController.OnBackAR(); StartCoroutine(ResetValues()); }); m_HatData = new List <HatDataD>(); HatDataD d1 = new HatDataD(); d1.hatId = "welfleet"; d1.hatName = "Benjamin Paul"; d1.hatBrand = "Fedora"; d1.hatPhoto = hatPhoto; d1.hatColorList = new List <string>(); d1.hatSizeList = new List <string> { "s", "m", "l" }; d1.hatColor = "black"; HatDataD d2 = new HatDataD(); d2.hatId = "county line"; d2.hatName = "County Line"; d2.hatBrand = "Fedora"; d2.hatPhoto = hatPhoto2; d2.hatColorList = new List <string> { "black", "gray" }; d2.hatSizeList = new List <string> { "m", "l" }; d2.hatColor = "black"; m_HatData.Add(d1); m_HatData.Add(d2); // LoadContentGG += GG; }
public BattleResultPanel() { SuspendLayout(); CreateLabels(); _information = new InformationPanel(); Controls.Add(_information); ResumeLayout(); }
// Use this for initialization void Start() { m_InspectorPannel = GameObject.FindGameObjectWithTag("InspectorPannel").GetComponent<InspectorPannel>(); m_InformationPannel = GameObject.FindGameObjectWithTag("InformationPannel").GetComponent<InformationPanel>(); m_RightClickCanvas = GameObject.FindGameObjectWithTag("RightClickCanvas").GetComponent<RightClickCanvas>(); isSelected = false; m_RightClickCanvas.setActive(false); }
// Use this for initialization void Start() { m_InspectorPannel = GameObject.FindGameObjectWithTag("InspectorPannel").GetComponent <InspectorPannel>(); m_InformationPannel = GameObject.FindGameObjectWithTag("InformationPannel").GetComponent <InformationPanel>(); m_RightClickCanvas = GameObject.FindGameObjectWithTag("RightClickCanvas").GetComponent <RightClickCanvas>(); isSelected = false; m_RightClickCanvas.setActive(false); }
private void PopulateEntities() { if (!workingstate) { // Reinit other controls cmbEntities.Items.Clear(); ManageWorkingState(true); informationPanel = InformationPanel.GetInformationPanel(this, "Loading entities...", 340, 150); // Launch treatment var bwFill = new BackgroundWorker(); bwFill.DoWork += (sender, e) => { // Retrieve List <EntityMetadata> sourceList = MetadataHelper.RetrieveEntities(service); // Prepare list of items var sourceEntitiesList = new List <EntityItem>(); foreach (EntityMetadata entity in sourceList) { sourceEntitiesList.Add(new EntityItem(entity)); } e.Result = sourceEntitiesList.OrderBy(i => i.DisplayName).ToArray(); }; bwFill.RunWorkerCompleted += (sender, e) => { informationPanel.Dispose(); if (e.Error != null) { MessageBox.Show(this, "An error occured: " + e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { var items = (EntityItem[])e.Result; if (items.Length == 0) { MessageBox.Show(this, "The system does not contain any entities", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { cmbEntities.DisplayMember = "DisplayName"; cmbEntities.ValueMember = "SchemaName"; cmbEntities.Items.AddRange(items); } } ManageWorkingState(false); }; bwFill.RunWorkerAsync(); } }
protected void SetIcon (InformationPanel information) { if(information.category == Category.Auctions) icon.sprite = images[0]; else if(information.category == Category.Asignations) icon.sprite = images[1]; else icon.sprite = images[2]; }
public override void SetUp (InformationPanel information) { base.SetUp (information); for (int i = 0; i < information.tabsLabels.Count ; i++) tabsLabels[i].text = information.tabsLabels[i]; SetIcon (information); SetCurrentList (); SetList (); }
private void TsbTransfertSolutionClick(object sender, EventArgs e) { if (lstSourceSolutions.SelectedItems.Count == 1 && targetService != null) { importId = Guid.NewGuid(); var item = lstSourceSolutions.SelectedItems[0]; infoPanel = InformationPanel.GetInformationPanel(this, "Initializing...", 340, 120); var requests = new List <OrganizationRequest>(); requests.Add(new ExportSolutionRequest { Managed = chkExportAsManaged.Checked, SolutionName = item.Text, ExportAutoNumberingSettings = chkAutoNumering.Checked, ExportCalendarSettings = chkCalendar.Checked, ExportCustomizationSettings = chkCustomization.Checked, ExportEmailTrackingSettings = chkEmailTracking.Checked, ExportGeneralSettings = chkGeneral.Checked, ExportIsvConfig = chkIsvConfig.Checked, ExportMarketingSettings = chkMarketing.Checked, ExportOutlookSynchronizationSettings = chkOutlookSynchronization.Checked, ExportRelationshipRoles = chkRelationshipRoles.Checked }); requests.Add(new ImportSolutionRequest { ConvertToManaged = chkConvertToManaged.Checked, OverwriteUnmanagedCustomizations = chkOverwriteUnmanagedCustomizations.Checked, PublishWorkflows = chkActivate.Checked, ImportJobId = importId }); if (!chkExportAsManaged.Checked && chkPublish.Checked) { requests.Add(new PublishAllXmlRequest()); } btnDownloadLog.Enabled = false; tsbLoadSolutions.Enabled = false; tsbTransfertSolution.Enabled = false; btnSelectTarget.Enabled = false; Cursor = Cursors.WaitCursor; var worker = new BackgroundWorker(); worker.DoWork += WorkerDoWorkExport; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerRunWorkerCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(requests); } else { MessageBox.Show("You have to select a source solution and a target organization to continue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void LoadEntities() { infoPanel = InformationPanel.GetInformationPanel(ParentForm, "Loading entities...", 340, 150); var worker = new BackgroundWorker(); worker.DoWork += worker_DoWork; worker.RunWorkerCompleted += worker_RunWorkerCompleted; worker.RunWorkerAsync(); }
public void DeleteSelectedRules() { loadingPanel = InformationPanel.GetInformationPanel(this, "Deleting selected records...", 340, 120); var bwDelete = new BackgroundWorker(); bwDelete.DoWork += bwDelete_DoWork; bwDelete.RunWorkerCompleted += bwDelete_RunWorkerCompleted; bwDelete.RunWorkerAsync(lvViews.SelectedItems); }
private void LoadMetadata() { infoPanel = InformationPanel.GetInformationPanel(this, "Loading metadata...", 340, 150); var worker = new BackgroundWorker(); worker.DoWork += worker_DoWork; worker.RunWorkerCompleted += worker_RunWorkerCompleted; worker.RunWorkerAsync(); }
private void buttonSaveAs_Click(object sender, EventArgs e) { Entity newformXml = formXml; string newFormXmlName = ITLec.CRMFormXml.AppCode.Common.ShowDialog("New FormXml Name:", "FormXml Name", txtName.Text + " - COPY"); if (!string.IsNullOrEmpty(newFormXmlName)) { newformXml["name"] = newFormXmlName; newformXml["description"] = txtDescription.Text; // newformXml["datadescription"] = tecDataDescription.Text; newformXml["formxml"] = tecVisualizationDescription.Text; newformXml.Attributes.Remove(newformXml.LogicalName + "id"); /* newformXml.Id = Guid.NewGuid(); * * if (newformXml.Attributes.Contains("savedqueryvisualizationid")) * { * newformXml["savedqueryvisualizationid"] = newformXml.Id; * } * else * { * newformXml["userqueryvisualizationid"] = newformXml.Id; * }*/ infoPanel = InformationPanel.GetInformationPanel(this, "Save As formXml...", 350, 150); var worker = new BackgroundWorker { WorkerReportsProgress = true }; worker.DoWork += (w, evt) => { service.Create((Entity)evt.Argument); }; worker.ProgressChanged += (w, evt) => { InformationPanel.ChangeInformationPanelMessage(infoPanel, evt.UserState.ToString()); }; worker.RunWorkerCompleted += (w, evt) => { if (evt.Error != null) { MessageBox.Show(this, evt.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { HasUpdatedContent = true; } Controls.Remove(infoPanel); infoPanel.Dispose(); this.Close(); }; worker.RunWorkerAsync(newformXml); } }
private void BtnCreateWebResourcesClick(object sender, EventArgs e) { if (lvFiles.Items.Count > 0) { infoPanel = InformationPanel.GetInformationPanel(this, "Creating web resource(s)...", 340, 150); var bWorker = new BackgroundWorker(); bWorker.RunWorkerCompleted += BWorkerRunWorkerCompleted; bWorker.DoWork += BWorkerDoWork; bWorker.RunWorkerAsync(); } }
private void ProcessWhoAmI() { infoPanel = InformationPanel.GetInformationPanel(this, "Retrieving your user id...", 340, 100); var worker = new BackgroundWorker(); worker.DoWork += WorkerDoWork; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerRunWorkerCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); }
///<Summary> /// Init Singleton instance ///</Summary> public void InitSingleton() { // Set as enable this.IsEnable = true; // calculate the canvas proportion this.inputCanvasRect = this.GetComponent <RectTransform>(); this.SafeZoneFixedToCanvas = AplicationFuncs.SafeToSafeCanvas(canvasRect: inputCanvasRect.rect); Debug.Log(SafeZoneFixedToCanvas); // calculate the area for joyDetection JoyDetectionArea = new Rect(SafeZoneFixedToCanvas.xMin, SafeZoneFixedToCanvas.yMin, SafeZoneFixedToCanvas.width * ScreenPercentDetect, SafeZoneFixedToCanvas.height); // get the joyStick REffs, knowing that has a child that is a joyBack and a child of that been the knob // back part of the joy this.joyBackImg = this.transform.GetChild(0).GetComponent <RawImage>(); this.joyBackRect = this.joyBackImg.GetComponent <RectTransform>(); // knoob part of the joy this.JoyKnobImg = this.joyBackImg.transform.GetChild(0).GetComponent <RawImage>(); this.joyKnobRect = this.JoyKnobImg.GetComponent <RectTransform>(); // Calculate the maximus radius for the joy based on size this.JoyMaxRadius = this.joyBackRect.rect.width * 0.5f - this.joyKnobRect.rect.width * 0.5f; // calculate the default related position, validating the values making joy visivel on safe area all the time this.RelatedDefaultPosition = new Vector2( JoyDetectionArea.position.x + ((JoyDetectionArea.width * positionPercent.x) < (joyBackRect.rect.width / 2f) ? (joyBackRect.rect.width / 2f) : (JoyDetectionArea.width * positionPercent.x)), JoyDetectionArea.position.y + ((JoyDetectionArea.height * positionPercent.y) < (joyBackRect.rect.height / 2f) ? (joyBackRect.rect.height / 2f) : (JoyDetectionArea.height * positionPercent.y))); // get refference to the jump button components this.jumpBtnImg = this.transform.GetChild(1).GetComponent <Image>(); this.jumpBtn = this.jumpBtnImg.GetComponent <Button>(); this.jumpBtnRct = this.jumpBtnImg.GetComponent <RectTransform>(); // calculate the jump button position based on margin and placed in safe area this.jumpBtnRct.anchoredPosition = new Vector2( SafeZoneFixedToCanvas.xMax - (SafeZoneFixedToCanvas.width * JumpPercentMargin.x + jumpBtnRct.rect.width * 0.5f), SafeZoneFixedToCanvas.yMin + SafeZoneFixedToCanvas.height * JumpPercentMargin.y + jumpBtnRct.rect.height * 0.5f); // Set joy to invisible IsJoyStickVisible = false; // Debug thats ready InformationPanel.DebugConsoleInput("Input Manager valid and Online!"); }
private void bw_DoWork(object sender, DoWorkEventArgs e) { var searchTerm = e.Argument.ToString(); var qe = new QueryExpression("systemuser"); qe.ColumnSet = new ColumnSet(new[] { "systemuserid", "fullname", "businessunitid" }); qe.PageInfo = new PagingInfo { Count = 250, PageNumber = 1, ReturnTotalRecordCount = true }; qe.Criteria = new FilterExpression(LogicalOperator.And) { Filters = { new FilterExpression(LogicalOperator.Or) { Conditions = { new ConditionExpression("fullname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("domainname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("firstname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")), new ConditionExpression("lastname", ConditionOperator.BeginsWith, searchTerm.Replace("*", "%")) } }, new FilterExpression { Conditions ={ new ConditionExpression("isdisabled", ConditionOperator.Equal, false) } } } }; EntityCollection result; var results = new List <Entity>(); do { result = service.RetrieveMultiple(qe); results.AddRange(result.Entities); InformationPanel.ChangeInformationPanelMessage(loadingPanel, string.Format("Retrieving users ({0} %)...", qe.PageInfo.PageNumber * qe.PageInfo.Count / result.TotalRecordCount * 100)); qe.PageInfo.PageNumber++; } while (result.MoreRecords); e.Result = results; }
private void LoadUsers() { btnSearch.Enabled = false; lvUsers.Items.Clear(); loadingPanel = InformationPanel.GetInformationPanel(this, "Retrieving users...", 340, 120); var bw = new BackgroundWorker(); bw.DoWork += bw_DoWork; bw.RunWorkerCompleted += bw_RunWorkerCompleted; bw.RunWorkerAsync(txtSearch.Text); }
private void Publish(bool all) { if (lvEntities.SelectedItems.Count == 0) { return; } ManageWorkingState(true); var message = all ? "Publishing all customizations" : "Publishing entity..."; informationPanel = InformationPanel.GetInformationPanel(this, message, 340, 120); var bwPublish = new BackgroundWorker(); bwPublish.DoWork += (sender, e) => { if (string.IsNullOrEmpty(e.Argument.ToString())) { var pubRequest = new PublishAllXmlRequest(); targetService.Execute(pubRequest); } else { var pubRequest = new PublishXmlRequest(); pubRequest.ParameterXml = string.Format(@"<importexportxml> <entities> <entity>{0}</entity> </entities> <nodes/><securityroles/><settings/><workflows/> </importexportxml>", e.Argument.ToString()); targetService.Execute(pubRequest); } }; bwPublish.RunWorkerCompleted += (sender, e) => { ManageWorkingState(false); Controls.Remove(informationPanel); informationPanel.Dispose(); if (e.Error != null) { MessageBox.Show(this, e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }; bwPublish.RunWorkerAsync(all ? "" : ((EntityMetadata)lvEntities.SelectedItems[0].Tag).LogicalName); }
private void btnCloneRecord_Click(object sender, EventArgs e) { var recordToProcess = lstRecordsToProcess.Items; infoPanel = InformationPanel.GetInformationPanel(this, "Initializing...", 540, 220); ToggleWaitMode(true); using (var worker = new BackgroundWorker()) { worker.DoWork += WorkerDoWorkCloneRecords; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerRunWorkerCompleted; worker.WorkerReportsProgress = true; worker.RunWorkerAsync(recordToProcess); } }
private void CreatePanels() { quickSearchPanel = new QuickSearchPanel(); informationPanel = new InformationPanel(); outputPanel = new DebugOutputPanel(); callStackPanel = new CallStackPanel(); logMessagePanel = new InformationPanel(); localVariablesPanel = new ObjectsPanel(); argumentsPanel = new ObjectsPanel(); watchPanel = new ObjectsPanel(); autoObjectsPanel = new ObjectsPanel(); breakpointsPanel = new BreakpointsPanel(); threadsPanel = new ThreadsPanel(); modulesPanel = new ModulesPanel(); }
public virtual void SetUp (InformationPanel information) { label.text = information.label; }