示例#1
0
        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);
        }