private void DeletePatient(Test_Patient test, string patientOQ) { ThreadUtilities.RunOnUIThread(new Action(() => { test.Activate(); })); UIUtilities.TypeIntoTextbox(test.text_PatientOQ, patientOQ); UIUtilities.ClickOnItem(test.button_DeletePatient); }
private void Start() { cancelButton.onClick.AddListener(() => { this.leaving = true; LeaveQueueMessage.StartLeaveQueueMessage(networkHandler.builder); var message = LeaveQueueMessage.EndLeaveQueueMessage(networkHandler.builder); networkHandler.Send(message); }); UIUtilities.Hide(enteringQueueScreen); }
private void OnFAQButtonClick(object sender, RoutedEventArgs e) { try { System.Diagnostics.Process.Start(@"https://github.com/AnkiUniversal/NLP-Japanese-Dictionary/wiki/Users'-FAQ"); } catch (Exception ex) { UIUtilities.ShowErrorDialog("Open FAQ error: " + ex.Message + "\n" + ex.StackTrace); } }
public override string?GetHeader(Context context) { var filename = debugger.Value.GetCurrentExecutableFilename(); if (!File.Exists(filename)) { return(null); } Debug2.Assert(filename is not null); return(string.Format(dnSpy_Debugger_Resources.DebugProgramX, UIUtilities.EscapeMenuItemHeader(Path.GetFileName(filename)))); }
IEnumerator Start() { _group = UIUtilities.GetCanvasGroup(gameObject); yield return(new WaitForSeconds(SplashActiveTime)); #if UNITY_WEBGL ShareBtn.SetActive(false); ExitBtn.SetActive(false); #endif _group.DOFade(0, 1f).SetEase(Ease.OutQuad).OnComplete(() => { /* if(AlertController.instance.isChallengeReceived||AlertController.instance.isChallengeSent) * { * HomeScreen.SetActive(false); * gameObject.SetActive(false); * WHOTMultiplayerManager.wagerAmount = 1; * WHOTMultiplayerManager.playingWagered = false; * // WHOTMultiplayerManager.instance.Connect(); * ExitFromGameplayObject.SetActive(true); * } * else * {*/ if (PlayerPrefs.GetInt("WHOTRestartOnline") == 1) { PlayerPrefs.SetInt("WHOTRestartOnline", 0); PlayerPrefs.SetInt("WHOTRestart", 0); HomeScreen.SetActive(false); gameObject.SetActive(false); WHOTMultiplayerManager.wagerAmount = 1; WHOTMultiplayerManager.playingWagered = false; //WHOTLultiplayerManager.instance.Connect(); ExitFromGameplayObject.SetActive(true); return; } else if (PlayerPrefs.GetInt("WHOTRestart") == 1) { PlayerPrefs.SetInt("WHOTRestartOnline", 0); PlayerPrefs.SetInt("WHOTRestart", 0); HomeScreen.SetActive(false); gameObject.SetActive(false); WhotManager.instance.OnStart(); return; } else { HomeMenu.SetActive(true); gameObject.SetActive(false); } //} }); }
private async void OnCheckForUpdateButtonClick(object sender, RoutedEventArgs e) { if (await IsNewestVersion()) { UIUtilities.ShowMessageDialog("You're using the latest version."); } else { AskUserForAppUpdate(); } }
private void DeleteHousehold(Test_Patient test, int HouseholdID) { ThreadUtilities.RunOnUIThread(new Action(() => { test.Activate(); })); UIUtilities.TypeIntoTextbox(test.text_HouseholdID, HouseholdID.ToString()); UIUtilities.ClickOnItem(test.button_DeleteHousehold); }
private void OnFAQButtonClick(object sender, RoutedEventArgs e) { try { System.Diagnostics.Process.Start(@"https://nlpjapanesedictionary.wordpress.com/faqs/"); } catch (Exception ex) { UIUtilities.ShowErrorDialog("Open FAQ error: " + ex.Message + "\n" + ex.StackTrace); } }
private static bool CheckImageSize(int PixelWidth, int PixelHeight) { if (PixelWidth > Jocr.Ocr.MAX_IMAGE_WIDTH || PixelHeight > Jocr.Ocr.MAX_IMAGE_HEIGHT) { string message = String.Format("Bitmap dimensions ({0}x{1}) are too big for OCR.", PixelWidth, PixelHeight) + "\nMax image dimension is " + Ocr.MAX_IMAGE_WIDTH + "x" + Ocr.MAX_IMAGE_HEIGHT + "."; UIUtilities.ShowMessageDialog(message); return(false); } return(true); }
public void Enter(MatchInitializedMessage matchInitializedMessage) { clientToken = matchInitializedMessage.ClientToken; clientTokenText.text = Convert.ToString(clientToken); countdown = 55.0f; continueButtonText.text = "Continue\n" + Mathf.CeilToInt(countdown); yourTeamText.text = ""; opponentTeamText.text = ""; UInt8 playerNumber = matchInitializedMessage.PlayerNumber; UInt8 teamSize = Convert.ToByte(matchInitializedMessage.TeamOnePlayersLength); if (playerNumber < teamSize) // player is in team one { UInt8 playerIndexInTeamOne = playerNumber; yourTeamText.text += matchInitializedMessage.TeamOnePlayers(playerIndexInTeamOne) + "\n"; for (UInt8 i = 0; i < matchInitializedMessage.TeamOnePlayersLength; i++) { if (i != playerIndexInTeamOne) { yourTeamText.text += matchInitializedMessage.TeamOnePlayers(i) + "\n"; } } for (UInt8 i = 0; i < matchInitializedMessage.TeamTwoPlayersLength; i++) { opponentTeamText.text += matchInitializedMessage.TeamTwoPlayers(i) + "\n"; } } else // player is in team two { UInt8 playerIndexInTeamTwo = Convert.ToByte(playerNumber % teamSize); yourTeamText.text += matchInitializedMessage.TeamTwoPlayers(playerIndexInTeamTwo) + "\n"; for (UInt8 i = 0; i < matchInitializedMessage.TeamOnePlayersLength; i++) { opponentTeamText.text += matchInitializedMessage.TeamOnePlayers(i) + "\n"; } for (UInt8 i = 0; i < matchInitializedMessage.TeamTwoPlayersLength; i++) { if (i != playerIndexInTeamTwo) { yourTeamText.text += matchInitializedMessage.TeamTwoPlayers(i) + "\n"; } } } UIUtilities.Show(clientTokenScreen); }
private void OpenConfig_Click(object sender, RoutedEventArgs e) { if (File.Exists(Settings.DefaultConfigurationFilePath)) { UIUtilities.OpenExplorer(Path.GetDirectoryName(Settings.DefaultConfigurationFilePath)); } else { this.ShowMessage("Nothing is configured yet.", MessageBoxImage.Information); } }
void listBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (!UIUtilities.IsLeftDoubleClick <ListBoxItem>(listBox, e)) { return; } if (DataContext is ListVM data) { data.EditItem(); } }
/// <summary> /// Executes this CommandBase. /// </summary> /// <seealso cref="M:XamlHelpmeet.Commands.CommandBase.Execute()"/> public override void Execute() { try { GroupInto("<Border>\r\n<StackPanel Orientation=\"Horizontal\">\r\n", "</StackPanel>\r\n</Border>\r\n"); } catch (Exception ex) { UIUtilities.ShowExceptionMessage("Group Into " + Caption, ex.Message, String.Empty, ex.ToString()); } }
// Save a SaveFile at path and reshape/rename linked button private void CreateUserSaveFile() { var path = Application.persistentDataPath; var newSave = new SaveFileTemplate(inputSaveName.text, (int)GameManager.Instance.difficulty, saveButtonId); XMLFilHelper.CreateXmlFile(path + saveButtonId, newSave); UIUtilities.ChangeButtonVisual(saveButton, saveButtonColors); string buttonText = "Name : " + newSave.Name + "\n" + GetDifficultyString(); UIUtilities.RenameButton(saveButton, buttonText, TextAnchor.MiddleCenter, 18); }
protected void btnShowImg_Click(object sender, EventArgs e) { Session["DocFileContent"] = null; Session["DocFileName"] = null; HttpPostedFile postFile = this.Upload1.PostedFile; string strFileName = this.Upload1.FileName; try { if (this.Upload1.PostedFile != null) { //Check the selection of file if (string.IsNullOrEmpty(postFile.FileName)) { lblMessage.Text = "Please select a file to Attach"; } else { //Get binary value of the image file FileData = UIUtilities.ReadFile(postFile.FileName, new string[] { ".doc", ".docx" }); if (FileData == null) { lblMessage.Text = "Word Documents Only Allowed."; } else { //persist the extension of the selected image file //this.Page.RegisterHiddenField("hdnPhoto", Path.GetExtension(postFile.FileName)); if (Session["DocFileName"] == null) { Session.Add("DocFileName", strFileName); } else { Session["DocFileName"] = strFileName; } if (Session["DocFileContent"] == null) { Session.Add("DocFileContent", FileData); } else { Session["DocFileContent"] = FileData; } lblMessage.Text = "File Attached"; } } } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { try { System.Diagnostics.Process.Start(e.Uri.AbsoluteUri); } catch (System.Exception ex) { UIUtilities.ShowWarning(Properties.Resources.HyperlinkRequestUriFailedMessage, e.Uri.AbsoluteUri, ex.Message); } }
/// <summary> /// Executes this GroupIntoBorderWithStackPanelVerticalRoot. /// </summary> public override void Execute() { try { GroupInto("<Border>\r\n<StackPanel>\r\n", "</StackPanel>\r\n</Border>\r\n"); } catch (Exception ex) { UIUtilities.ShowExceptionMessage(String.Format("Group Into {0}", Caption), ex.Message, String.Empty, ex.ToString()); } }
/// <summary> /// Executes this GroupIntoUniformGrid. /// </summary> public override void Execute() { try { GroupInto("<UniformGrid>\r\n", "</UniformGrid>\r\n"); } catch (Exception ex) { UIUtilities.ShowExceptionMessage("Group Into " + Caption, ex.Message, String.Empty, ex.ToString()); } }
public void Enter(string username, RoomEnteredMessage roomEnteredMessage) { Setup(username, RoomUserRole.Invited); OnReceived(roomEnteredMessage); inviteOthersText.gameObject.SetActive(false); roomTokenText.gameObject.SetActive(false); copyToClipboardButton.gameObject.SetActive(false); UIUtilities.Show(roomMenu); }
public void Enter(InitGameMessage initGameMessage) { timeToSendVelocity = 0; gameArea.gameObject.SetActive(true); playerPositionMessageCount = 0; timeToShowPlayerPositionMessageCount = 0; playerPosMsgCountText.gameObject.SetActive(false); username = initGameMessage.Spaceships(initGameMessage.Fix.Value.PlayerNumber).Value.Username; interpolateButton.gameObject.SetActive(false); interpolateButton.GetComponentInChildren <TextMeshProUGUI>().text = "Interpolation ON"; Interpolate.interpolate = true; continueButton.gameObject.SetActive(false); TransitionToWarningState(WarningState.NoWarning); foreach (var usernameText in allUsernameTexts) { usernameText.text = ""; } foreach (var floatingUsernameText in floatingUsernameTexts) { floatingUsernameText.text = ""; } foreach (var disconnectedIcon in allDisconnectedIcons) { disconnectedIcon.gameObject.SetActive(false); } foreach (var connectingIcon in allConnectingIcons) { connectingIcon.gameObject.SetActive(false); } for (int i = 0; i < flashParticles.Length; i++) { GameObject flashParticle = Instantiate(flashParticlesPrefab); flashParticle.transform.parent = gameArea.transform; flashParticle.transform.localScale = new Vector3(0.03f, 0.03f, 0.03f); flashParticles[i] = flashParticle.GetComponent <ParticleSystem>(); } clientState = ClientState.WaitingForOpponent; InitializeGameState(initGameMessage); UIUtilities.Show(inGameCanvas); }
public IEnumerable <CreatedMenuItem> Create(IMenuItemContext context) { var langs = cultureManager.AllLanguages.OrderBy(a => a, LanguageInfoComparer.Instance); foreach (var lang in langs) { var attr = new ExportMenuItemAttribute { Header = UIUtilities.EscapeMenuItemHeader(lang.UIName) }; yield return(new CreatedMenuItem(attr, new SwitchLanguageCommand(cultureManager, lang))); } }
public FileManagerItem(UIUtilities.GPSFileDescription gpsFileDescription) : this() { _iFile = gpsFileDescription.File; labelFilename.Text = gpsFileDescription.FileName; labelGPSFileVersion.Text = gpsFileDescription.FileType; labelDateTimeField.Text = gpsFileDescription.Date.ToShortDateString(); labelDescriptionField.Text = string.Format("Distance: {0}.\n{1}", GetTracksDistance(), gpsFileDescription.Description); }
private void FindPatient(Test_Patient test, string patientOQ) { ThreadUtilities.RunOnUIThread(new Action(() => { test.Activate(); })); UIUtilities.TypeIntoTextbox(test.text_PatientOQ, patientOQ); UIUtilities.ClickOnItem(test.button_GetPatient); GeneralUtilities.WaitUntil(() => (bool)Application.Current.Dispatcher.Invoke(new Func <bool>(() => test.IsActive))); }
protected void btnShowImg_Click(object sender, EventArgs e) { HttpPostedFile postFile = this.Upload1.PostedFile; string strFileName = this.Upload1.FileName; try { if (this.Upload1.PostedFile != null) { //Check the selection of file if (string.IsNullOrEmpty(postFile.FileName)) { lblMessage.Text = "Please select image to view"; } else { //Get binary value of the image file imageData = UIUtilities.ReadImageFile(postFile.FileName, new string[] { ".gif", ".jpg", ".bmp", ".jpeg", ".png", ".dib", ".jpe", ".jfif", ".tif", ".tiff", ".Icon" }); if (imageData == null) { lblMessage.Text = "select gif, jpg, bmp, jpeg, png, dib, jpe, jfif, tif, tiff these types only"; imgMyPhoto.Attributes.Add("Src", ""); } else { //persist the extension of the selected image file //this.Page.RegisterHiddenField("hdnPhoto", Path.GetExtension(postFile.FileName)); if (Session["iconFileName"] == null) { Session.Add("iconFileName", strFileName); } else { Session["iconFileName"] = strFileName; } if (Session["iconcontent"] == null) { Session.Add("iconcontent", imageData); } else { Session["iconcontent"] = imageData; } imgMyPhoto.Attributes.Add("Src", Upload1.PostedFile.FileName); } } } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
private void Start() { enterRoomButton.onClick.AddListener(() => { SendEnterRoom(); }); cancelButton.onClick.AddListener(() => { gameSystem.SelectPlayersMenu(username); }); UIUtilities.Hide(enterRoomMenu); }
private void OnSearchTextBoxPaste(object sender, DataObjectPastingEventArgs e) { try { var text = UIUtilities.GetTextFromClipboard(e); SearchPastedText(text); } catch (Exception ex) { UIUtilities.ShowErrorDialog("Search paste error: " + ex.Message + "\n" + ex.StackTrace); } }
private static void CreateBackButton(GameplaySettingsPanels panel, string submenuName) { if (submenuName == "MainMenu") { return; } if (_backButton == null) { _backButton = UIUtilities.LoadSpriteFromResources("BeatSaberCustomUI.Resources.Back Button.png"); } CreateSubmenuOption(panel, "Back", submenuName, "!PREVIOUSMENU!", String.Empty, _backButton); }
public void Exit() { ingameMusic.Stop(); gameArea.gameObject.SetActive(false); actions.Clear(); clientState = ClientState.WaitingForOpponent; foreach (var spaceshipShasow in spaceshipShadows) { Destroy(spaceshipShasow); } spaceshipShadows.Clear(); foreach (var spaceship in spaceships) { Destroy(spaceship); } spaceships.Clear(); foreach (var respawnPoint in respawnPoints) { Destroy(respawnPoint); } respawnPoints.Clear(); foreach (var projectile in projectiles) { Destroy(projectile); } projectiles.Clear(); foreach (var obstacle in obstacles) { Destroy(obstacle); } obstacles.Clear(); foreach (var controlPoint in controlPoints) { Destroy(controlPoint); } controlPoints.Clear(); foreach (var flashParticle in flashParticles) { Destroy(flashParticle); } UIUtilities.Hide(inGameCanvas); backgroundCamera.GetComponent <Spin>().enabled = true; }
private void ChangeMainWindowReadMode() { UIUtilities.ChangeReadMode(hotkeyPopup, UserPrefs.IsReadNightMode); if (UserPrefs.IsReadNightMode) { readModeButtonSymbol.Style = Application.Current.Resources["SunPathIcon"] as Style; } else { readModeButtonSymbol.Style = Application.Current.Resources["MoonPathIcon"] as Style; } }
protected void btnShowImg_Click(object sender, EventArgs e) { Session["FileContent"] = null; Session["FileName"] = null; HttpPostedFile postFile = this.Upload1.PostedFile; string strFileName = this.Upload1.FileName; try { if (this.Upload1.PostedFile != null) { //Check the selection of file if (string.IsNullOrEmpty(postFile.FileName)) { lblMessage.Text = "Please select a file to Attach"; } else { //Get binary value of the image file FileData = UIUtilities.ReadFile(postFile.FileName, new string[] { ".doc", ".pdf", ".xl", ".xml", ".txt", ".ppt" }); if (FileData == null) { lblMessage.Text = "Allowed File Formats doc, pdf, xl, xml, txt, ppt"; } else { if (Session["FileName"] == null) { Session.Add("FileName", strFileName); } else { Session["FileName"] = strFileName; } if (Session["FileContent"] == null) { Session.Add("FileContent", FileData); } else { Session["FileContent"] = FileData; } lblMessage.Text = "File Attached"; } } } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
protected void btnShowImg_Click(object sender, EventArgs e) { Session["AudioFileContent"] = null; Session["AudioFileName"] = null; HttpPostedFile postFile = this.Upload1.PostedFile; string strFileName = this.Upload1.FileName; try { if (this.Upload1.PostedFile != null) { //Check the selection of file if (string.IsNullOrEmpty(postFile.FileName)) { lblMessage.Text = "Please select a file to Attach"; } else { //Get binary value of the image file FileData = UIUtilities.ReadFile(postFile.FileName, new string[] { ".wma", ".wpl", ".wmv", ".flv", ".mpeg" }); if (FileData == null) { lblMessage.Text = ".wma,.wpl,.wmv,.flv,.mpeg >> Only Allowed."; } else { if (Session["AudioFileName"] == null) { Session.Add("AudioFileName", strFileName); } else { Session["AudioFileName"] = strFileName; } if (Session["AudioFileContent"] == null) { Session.Add("AudioFileContent", FileData); } else { Session["AudioFileContent"] = FileData; } lblMessage.Text = "File Attached"; } } } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
/// <summary> /// Query the names from webservice /// </summary> /// <param name="name">basin</param> private DataTable GetDataForComboBox(string userEnteredValue, string type) { //Commented in DREAM 4.0 for R5K changes /* if (string.Equals(type, BASINLIST)) { return GetBasinFromSPList(userEnteredValue); } else*/ { ArrayList arrListValue = new ArrayList(); objUIUtilities = new UIUtilities(); objReportController = objFactory.GetServiceManager(REPORTSERVICE); XmlDocument xmlDoc = null; //Added in DREAM 4.0 for R5K changes //starts if(string.Equals(type, BASINLIST)) { arrListValue.Add(radCboBasinName); SetListValues(arrListValue, userEnteredValue, BASINNAME); xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, BASINLIST, null, 0); if(xmlDoc != null) return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), BASINLIST).Tables[3]; } //ends else if(string.Equals(type, FIELD)) { arrListValue.Add(radCboFieldName); SetListValues(arrListValue, userEnteredValue,GetRadControlID(radCboFieldName.ID)); xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, FIELD, null, 0); if(xmlDoc != null) return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), FIELD).Tables[3]; } else { arrListValue.Add(radCboOperator); SetListValues(arrListValue, userEnteredValue, GetRadControlID(radCboOperator.ID)); objRequestInfo.Entity.Name = FIELDOPERATOR; xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, FIELDOPERATOR, null, 0); if(xmlDoc != null) return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), FIELDOPERATOR).Tables[3]; } } return null; }
/// <summary> /// Query the names from webservice /// </summary> /// <param name="type">The type.</param> /// <param name="value">The value.</param> /// <returns></returns> private DataTable GetDataSource(string type, string value) { if (string.Equals(type.ToLowerInvariant(), LITHOLOGYMAINLIST.ToLowerInvariant())) { return GetList(type, value); } else if (string.Equals(type.ToLowerInvariant(), LITHOLOGYSECONDARYLIST.ToLowerInvariant())) { return GetList(type, value); } else if (string.Equals(type.ToLowerInvariant(), PRODUCTIONSTATUSLIST.ToLowerInvariant())) { return GetList(type, value); } else { ArrayList arrListValue = new ArrayList(); objUIUtilities = new UIUtilities(); objReportController = objFactory.GetServiceManager(REPORTSERVICE); XmlDocument xmlDoc = new XmlDocument(); if (string.Equals(type.ToLowerInvariant(), LITHOSTRATGROUPLIST.ToLowerInvariant())) { arrListValue.Add(radCboLithostratGroup); SetListValues(arrListValue, value, LITHOSTRATGROUPLIST); xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, LITHOSTRATGROUPLIST, null, 0); return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), LITHOSTRATGROUPLIST).Tables[3]; } else if (string.Equals(type.ToLowerInvariant(), LITHOSTRATFORMATION.ToLowerInvariant())) { arrListValue.Add(radCboLithostratFormation); SetListValues(arrListValue, value, LITHOSTRATFORMATION); xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, LITHOSTRATFORMATION, null, 0); return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), LITHOSTRATFORMATION).Tables[3]; } else if (string.Equals(type.ToLowerInvariant(), LITHOSTRATMEMBER.ToLowerInvariant())) { arrListValue.Add(radCboLithostratMember); SetListValues(arrListValue, value, LITHOSTRATMEMBER); xmlDoc = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, LITHOSTRATMEMBER, null, 0); return GetRadDataSource(xmlDoc, GetXslForRadResponseXml(), LITHOSTRATMEMBER).Tables[3]; } } return null; }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { try { string strControlId = string.Empty; objUIUtilities = new UIUtilities(); objReportController = objFactory.GetServiceManager(REPORTSERVICE); objMossController = objFactory.GetServiceManager(MOSSSERVICE); SetUserPreferences(); if(Request.QueryString[SRPADVPOPUPID] != null) { if(Request.QueryString[SRPADVPOPUPID].Length > 0) { strControlId = Request.QueryString[SRPADVPOPUPID]; } } if(Request.QueryString[SRPADVPOPUPBASIN] != null) { if(string.Equals(Request.QueryString[SRPADVPOPUPBASIN].ToLowerInvariant(), "true")) { lblName.Text = BASINIDENTIFIER; strAttributeName = BASINITEMVAL; strEntityName = BASINITEMVAL; //**R5k changes for Dream 4.0 //Starts // SetDataSource(SRPADVPOPUPBASIN, "Title", "Title"); PopulateListControl(lstFieldNames, GetBasinFromWebService(), BASINXPATH, objUserPreferences.Basin); //Ends } } else if(Request.QueryString[SRPADVPOPUPOPERATOR] != null) { if(string.Equals(Request.QueryString[SRPADVPOPUPOPERATOR].ToLowerInvariant(), "true")) { lblName.Text = SRPADVPOPUPOPERATOR; strAttributeName = SRPADVPOPUPOPERATOR;//.ToLowerInvariant(); strEntityName = FIELDOPERATOR; SetDataSource(SRPADVPOPUPOPERATOR, "Operator", string.Empty); } } cmdClose.Attributes.Add(JAVASCRIPTONCLICK, "CloseWindow();"); StringBuilder strSelectJavaScript = new StringBuilder(); strSelectJavaScript.Append("GetSeletectedItem('"); strSelectJavaScript.Append(lstFieldNames.ClientID); strSelectJavaScript.Append("','"); strSelectJavaScript.Append(strControlId); strSelectJavaScript.Append("','"); strSelectJavaScript.Append(lblName.Text); strSelectJavaScript.Append("');"); cmdSelect.Attributes.Add(JAVASCRIPTONCLICK, strSelectJavaScript.ToString()); } catch(SoapException soapEx) { if(soapEx.Message.Equals(SOAPEXCEPTIONMESSAGE)) { lblMessage.Text = NORECORDFOUNDSEXCEPTIONMESSAGE; lblMessage.Visible = true; } else { lblMessage.Text = UNEXPECTEDEXCEPTIONMESSAGE; lblMessage.Visible = true; } CommonUtility.HandleException(strCurrSiteUrl, soapEx, 1); } catch(WebException webEx) { lblMessage.Text = UNEXPECTEDEXCEPTIONMESSAGE; lblMessage.Visible = true; CommonUtility.HandleException(strCurrSiteUrl, webEx, 1); } catch(Exception ex) { CommonUtility.HandleException(strCurrSiteUrl, ex); } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { //Dream 4.0 lblCountryInfo.Text = " Selecting the \"Country\" will activate the \"State or Province\" and <br/> \"Field Name\" checkboxes."; lblStateInfo.Text = " Selecting one or more \"State or Province\" entries will activate the <br/> \"County\" checkbox."; string strOnChange = string.Format("javascript:FileSearchTypeSelectedIndexChange(this,'{0}|input','{1}|input','{2}|input','{3}|input')", txtUnique_Well_Identifier.ID, txtWell_Name.ID, txtCommon_Name.ID, txtAlias_Name.ID); cboSearchCriteria.Attributes.Add("onchange", strOnChange); cmdSaveSearch.Attributes.Add("onclick", "return ValidateWellboreSaveSearch('" + WELLREPORT + "');"); objUIUtilities = new UIUtilities(); objMossController = objFactory.GetServiceManager(MOSSSERVICE); objReportController = objFactory.GetServiceManager(REPORTSERVICE); SetUserPreferences(); //SetTextboxDefault(txtMaxLatDeg);//DREAM4.0 Auto default to zeros in adv search //SetTextboxDefault(txtMaxLatMin); //SetTextboxDefault(txtMaxLatSec); //SetTextboxDefault(txtMaxLonDeg); //SetTextboxDefault(txtMaxLonMin); //SetTextboxDefault(txtMaxLonSec); //SetTextboxDefault(txtMinLatDeg); //SetTextboxDefault(txtMinLatMin); //SetTextboxDefault(txtMinLatSec); //SetTextboxDefault(txtMinLonDeg); //SetTextboxDefault(txtMinLonMin); //SetTextboxDefault(txtMinLonSec); lblException.Text = string.Empty; lblMessage.Text = string.Empty; lblStateMessage.Visible = false; lblCountyMessage.Visible = false; lblField_Identifier.Visible = false; lblFormation.Visible = false; cmdSearch.Attributes.Add(REDIRECTATTRIBUTE, REDIRECTATTRIBUTEVALUE); cmdReset.Attributes.Add(REDIRECTATTRIBUTE, REDIRECTATTRIBUTEVALUE); cmdTopSearch.Attributes.Add(REDIRECTATTRIBUTE, REDIRECTATTRIBUTEVALUE); cmdTopReset.Attributes.Add(REDIRECTATTRIBUTE, REDIRECTATTRIBUTEVALUE); if(!Page.IsPostBack) { try { //Sets the Well Check refresh session variable. CommonUtility.SetSessionVariable(Page, WELLCHECKREFRESH, DateTime.Now.ToString()); if(Request.QueryString[ASSET] != null) { if(Request.QueryString[ASSET].ToLower().Equals(WELLASSET)) { rdoRbDate.Items[1].Text = "Abandonment"; rdoRbDate.Items[1].Value = "Abandoned"; ((MOSSServiceManager)objMossController).LoadSaveSearch(WELLADVANCEDSEARCH, cboSavedSearch); } else { RenderException("No items to display in this view."); } LoadOtherPageControls(); GetAssetColumns(REPORTSERVICECOLUMNLIST, cboSearchCriteria, Request.QueryString[ASSET].ToString()); } else { RenderException("No items to display in this view."); } } catch(WebException webEx) { RenderException(webEx.Message.ToString()); } catch(Exception ex) { CommonUtility.HandleException(strCurrSiteUrl, ex); } } //DREAM 4.0 added for adv search country dropdown objUtility.RegisterOnLoadClientScript(this.Page, "if(document.getElementById(GetObjectID('chbGeographicalSearch', 'input')).checked == true) {showLatLongTable('TR1','TR2','TR3','TR4','TR5','TR6','TR7','TR8');}"); }