private bool LoadEcryptCtrlDataSettings(ref EcryptCtrlMsgStruct ecm) { bool flag = false; XmlDocument document = new XmlDocument(); if (File.Exists(_EncryCtrlRestoredFilePath)) { try { document.Load(_EncryCtrlRestoredFilePath); foreach (XmlNode node in document.SelectNodes("/EncryptionControl/Window")) { string str2; if (((str2 = node.Attributes["name"].Value.ToString()) != null) && (str2 == "frmEncryCtrl")) { EcryptCtrlMsg.LevelChange = Convert.ToInt32(node.Attributes["LevelChange"].Value.ToString()); EcryptCtrlMsg.strDbgLevels = node.Attributes["strDbgLevels"].Value.ToString(); CommonUtilsClass.loadLocation(encryptCtrlFormHandle, node.Attributes["top"].Value.ToString(), node.Attributes["left"].Value.ToString(), node.Attributes["width"].Value.ToString(), node.Attributes["height"].Value.ToString(), node.Attributes["windowState"].Value.ToString()); flag = true; } } } catch (Exception exception) { MessageBox.Show("frmEncryCtrl() + LoadEcryptCtrlDataSettings()\r\r" + exception.ToString()); } } return(flag); }
private void frmCommSettingsOkBtn_Click(object sender, EventArgs e) { CommonUtilsClass class2 = new CommonUtilsClass(); try { if (this.comm != null) { int num = Convert.ToInt32(this.frmCommOpenBufferSizeTxtBox.Text); if (num > 0x1388) { MessageBox.Show("Max lines is 5000", "Information", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); num = 0x1388; } class2.DisplayBuffer = num; } else { clsGlobal.MiscStringUpdate = this.frmCommOpenBufferSizeTxtBox.Text; } } catch (Exception exception) { MessageBox.Show(exception.Message, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Hand); } base.DialogResult = DialogResult.OK; base.Close(); }
public frmCommDisplayBufferSizeUpdate(CommunicationManager parentCommWindow) { this.CUC = new CommonUtilsClass(); this.InitializeComponent(); this.CommWindow = parentCommWindow; this.frmCommOpenBufferSizeTxtBox.Text = this.CUC.DisplayBuffer.ToString(); }
public frmCommDisplayBufferSizeUpdate(string updateString) { this.CUC = new CommonUtilsClass(); this.InitializeComponent(); this.frmCommOpenBufferSizeTxtBox.Text = updateString; }