public static void OnRegisterError(ERRORS error, Label labelError) { if (labelError == null) { return; } labelError.Visible = true; labelError.ForeColor = Color.Red; switch (error) { case ERRORS.DATE: labelError.Text = "User under 18. Can't register account."; break; case ERRORS.EMAIL: labelError.Text = "Email already registered."; break; case ERRORS.PASSWORD: labelError.Text = "Password too short and/or has special characters."; break; } }
public string get_error_status() { string serr = ""; for (int i = 0; i < 32; i++) { if (((1 << i) & status_vars.error_status) != 0) { ERRORS err = (ERRORS)i; serr = serr + err.ToString() + " "; } } return(serr); }
void INotifyAgent.OnPrimaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { try { SecsHelper.RecordSecsMessage(t.Primary); if (t.Primary.Stream == 1) { switch (t.Primary.Function) { case 1: t.Secondary.Root.Item("L").Item("MDLN").Value = ""; t.Secondary.Root.Item("L").Item("SOFTREV").Value = ""; t.Reply(); break; case 13: t.Secondary.Root.Item("COMMACK").Value = 0; t.Secondary.Root.Item("MDLN").Delete(); t.Secondary.Root.Item("SOFTREV").Delete(); t.Reply(); break; } } else if (t.Primary.Stream == 5) { if (t.Primary.Function == 1) { t.Secondary.Root.Item("ACKC5").Value = 0; t.Reply(); } } else if (t.Primary.Stream == 6) { if (t.Primary.Function == 11) { t.Secondary.Root.Item("ACKC6").Value = 0; t.Reply(); } } } catch (Exception ex) { Console.WriteLine("Host Primary In message Error:" + ex.Message); } }
public void OnPrimaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { try { SecsHelper.RecordSecsMessage(t.Primary); if (t.Primary.Stream == 1) { switch (t.Primary.Function) { case 1: //SECSItem mdln = t.Secondary.Root.AddNew("L").AddNew("MDLN"); //mdln.Format = SECS_FORMAT.ASCII; //mdln.Value = ""; //SECSItem softver = mdln.Duplicate(); //softver.Format = SECS_FORMAT.ASCII; //softver.Value = ""; t.Secondary.Root.Item("L").Item("MDLN").Value = ""; t.Secondary.Root.Item("L").Item("SOFTREV").Value = ""; t.Reply(); break; case 13: t.Secondary.Root.Item("COMMACK").Value = 0; t.Secondary.Root.Item("MDLN").Delete(); t.Secondary.Root.Item("SOFTREV").Delete(); t.Reply(); break; } } else if (t.Primary.Stream == 6) { if (t.Primary.Function == 11) { t.Secondary.Root.Item("ACKC6").Value = 0; t.Reply(); } } } catch (Exception ex) { Console.WriteLine("Host Primary In message Error:" + ex.Message); } }
//Madan 09/29/03 - This method will be used to write the Error Logs to a XML file on disk public static void AddWebErrors(string AppName, string ComponentName, string MethodName, string ErrDesc) { DataSet dsXML = new ERRORS(); string dstPath = ""; dstPath = Utilities.getDrivePathByLetter("ERRORLOG:"); dstPath += "\\WebErrorLog.xml"; try { // Create a file permission set indicating all of this method's intentions. FileIOPermission fp = new FileIOPermission(FileIOPermissionAccess.AllAccess, Path.GetFullPath(dstPath)); fp.AddPathList(FileIOPermissionAccess.Write | FileIOPermissionAccess.Append, Path.GetFullPath(dstPath)); // Verify that we can be granted all the permissions we'll need. fp.Demand(); // Assert the desired permissions here. fp.Assert(); if (System.IO.File.Exists(dstPath)) { dsXML.ReadXml(dstPath); } DataRow Row = dsXML.Tables["ErrorHistory"].NewRow(); object[] myRowArray = new object[6]; myRowArray[0] = System.Environment.MachineName; myRowArray[1] = AppName.Trim(); myRowArray[2] = MethodName.Trim(); myRowArray[3] = ComponentName.Trim(); myRowArray[4] = ErrDesc.Trim(); myRowArray[5] = System.DateTime.Now; Row.ItemArray = myRowArray; dsXML.Tables["ErrorHistory"].Rows.Add(Row); dsXML.AcceptChanges(); dsXML.WriteXml(dstPath); } catch (System.Exception Excp) { Console.Write(Excp.Message); } finally { dsXML.Dispose(); } }
public void OnSecondaryIn(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { SecsHelper.RecordSecsMessage(t.Secondary); if (t.Secondary.Stream == 1 && t.Secondary.Function == 4) { if (t.Tag == "QryHardBinQty") { QueryHardBinQty(t); } } if (t.Secondary.Stream == 2 && t.Secondary.Function == 16) { RMDHandler(t); } if (t.Secondary.Stream == 2 && t.Secondary.Function == 42) { RMDHandler(t); } }
//Madan Saini 09/26/2006 - This Method will be used for Logging the successful Logins from Notes Login Screen. //Starting with - PegOiReview. public static void RecordLogin(string Username, string Email, string IPAddress, string WebsiteName) { DataSet dsXML = new ERRORS(); string dstPath = ""; dstPath = Utilities.getDrivePathByLetter("ERRORLOG:"); dstPath += "\\UserHistory.xml"; try { // Create a file permission set indicating all of this method's intentions. FileIOPermission fp = new FileIOPermission(FileIOPermissionAccess.AllAccess, Path.GetFullPath(dstPath)); fp.AddPathList(FileIOPermissionAccess.Write | FileIOPermissionAccess.Append, Path.GetFullPath(dstPath)); // Verify that we can be granted all the permissions we'll need. fp.Demand(); // Assert the desired permissions here. fp.Assert(); //Now add the record to xml table for History if (System.IO.File.Exists(dstPath)) { dsXML.ReadXml(dstPath); DataRow Row = dsXML.Tables["UserLogins"].NewRow(); object[] myRowArray = new object[5]; myRowArray[0] = Username.Trim().ToUpper(); myRowArray[1] = Email.Trim().ToLower(); myRowArray[2] = IPAddress.Trim(); myRowArray[3] = System.DateTime.Now; myRowArray[4] = WebsiteName.Trim(); Row.ItemArray = myRowArray; dsXML.Tables["UserLogins"].Rows.Add(Row); dsXML.AcceptChanges(); dsXML.WriteXml(dstPath); } } catch (System.Exception ex) { GSA.R7BD.Utility.EventLog.WriteEntry("EventLog.cs", "GSA.R7BD.POIRBiz", "RecordLogin", "Error Occurred in RecordLogin procedure for User :"******" email: " + Email + ". The exception is: " + ex.Source + ex.Message, GSA.R7BD.Utility.EventLog.LogType.XMLFile); } }//end of this method
public void OnPrimaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { SecsHelper.RecordSecsMessage(t.Primary); }
void INotifyAgent.OnWarning(ERRORS ErrorCode, string ErrorText) { //throw new NotImplementedException(); }
void INotifyAgent.OnSecondaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { SecsHelper.RecordSecsMessage(t.Secondary); }
//printErrors static void printErrors(ERRORS error) { int errorNum = (int)error; Console.WriteLine("Error {0}:{1}", errorNum, ERRORS_COLLECTION[errorNum]); }
void INotifyAgent.OnDisconnect(ERRORS ErrorCode, string ErrorText) { ConnectStatusChange(this); }
/// <summary> /// permet de mettre en pause la lecture d une piste Deezer /// </summary> /// <returns></returns> public override async Task Pause() { await Task.Run(() => { ERRORS errors = m_player.Pause(); }); }
public exceptionOpenERP(ERRORS numError, string more) { _numError = numError; _more = more; }
public void OnError(ERRORS ErrorCode, string ErrorText) { //throw new NotImplementedException(); }
public void OnDisconnect(ERRORS ErrorCode, string ErrorText) { //throw new NotImplementedException(); StatusChangeEvent(this); }
public void OnSecondaryOut(SECSTransaction t, ERRORS ErrorCode, string ErrorText) { //throw new NotImplementedException(); SecsHelper.RecordSecsMessage(t.Secondary); }
public readonly uint Checksum; //Superblock checksum. #endregion Properties #region Constructors private Superblock(byte[] bytes) { InodeCount = BitConverter.ToUInt32(bytes, 0x00); BlockCount = (uint)1024 << BitConverter.ToInt32(bytes, 0x04); //BitConverter.ToUInt32(bytes, 0x150) << 32 | BitConverter.ToUInt32(bytes, 0x04); RootBlockCount = BitConverter.ToUInt32(bytes, 0x154) << 32 | BitConverter.ToUInt32(bytes, 0x08); FreeBlockCount = BitConverter.ToUInt32(bytes, 0x158) << 32 | BitConverter.ToUInt32(bytes, 0x0C); FreeInodeCount = BitConverter.ToUInt32(bytes, 0x10); FirstDataBlock = BitConverter.ToUInt32(bytes, 0x14); BlockSize = (uint)Math.Pow(2, (10 + BitConverter.ToUInt32(bytes, 0x18))); ClusterSize = (uint)Math.Pow(2, BitConverter.ToUInt32(bytes, 0x1C)); BlocksPerGroup = BitConverter.ToUInt32(bytes, 0x20); ClustersPerGroup = BitConverter.ToUInt32(bytes, 0x24); InodesPerGroup = BitConverter.ToUInt32(bytes, 0x28); MountTime = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x2C)); WriteTime = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x30)); MountCount = BitConverter.ToUInt16(bytes, 0x34); MaxMountCount = BitConverter.ToUInt16(bytes, 0x36); Magic = BitConverter.ToUInt16(bytes, 0x38); State = (STATE)BitConverter.ToUInt16(bytes, 0x3A); Errors = (ERRORS)BitConverter.ToUInt16(bytes, 0x3C); MinorRevisionLevel = BitConverter.ToUInt16(bytes, 0x3E); LastCheck = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x40)); CheckInterval = BitConverter.ToUInt32(bytes, 0x44); CreatorOs = (CREATOR_OS)BitConverter.ToUInt32(bytes, 0x48); RevisionLevel = (REVISION_LEVEL)BitConverter.ToUInt32(bytes, 0x4C); DefaultUserId = BitConverter.ToUInt16(bytes, 0x50); DefaultGroupId = BitConverter.ToUInt16(bytes, 0x52); FirstInode = BitConverter.ToUInt32(bytes, 0x54); InodeSize = BitConverter.ToUInt16(bytes, 0x58); BlockGroupNumber = BitConverter.ToUInt16(bytes, 0x5A); FeatureCompat = (FEATURE_COMPAT)BitConverter.ToUInt32(bytes, 0x5C); FeatureIncompat = (FEATURE_INCOMPAT)BitConverter.ToUInt32(bytes, 0x60); FeatureRoCompat = (FEATURE_RO_COMPAT)BitConverter.ToUInt32(bytes, 0x64); Uuid = new Guid(Helper.GetSubArray(bytes, 0x68, 0x10)); VolumeName = Encoding.ASCII.GetString(bytes, 0x78, 0x10).TrimEnd('\0'); LastMountedDirectory = Encoding.ASCII.GetString(bytes, 0x88, 0x40).TrimEnd('\0'); AlgorithmUsageBitmap = BitConverter.ToUInt32(bytes, 0xC8); PreallocatedBlocks = bytes[0xCC]; PreallocatedDirectoryBlocks = bytes[0xCD]; ReservedGdtBlocks = BitConverter.ToUInt16(bytes, 0xCE); JournalUuid = new Guid(Helper.GetSubArray(bytes, 0xD0, 0x10)); JournalInode = BitConverter.ToUInt32(bytes, 0xE0); JournalDevice = BitConverter.ToUInt32(bytes, 0xE4); LastOrphanedList = BitConverter.ToUInt32(bytes, 0xE8); HashSeed = BitConverter.ToUInt32(bytes, 0xEC); DefaultHashVersion = (DEFAULT_HASH_VERSION)bytes[0xFC]; JournalBackupType = bytes[0xFD]; GroupDescriptorSize = BitConverter.ToUInt16(bytes, 0xFE); DefaultMountOptions = (DEFAULT_MOUNT_OPTIONS)BitConverter.ToUInt32(bytes, 0x100); FirstMetablockBlockGroup = BitConverter.ToUInt32(bytes, 0x104); MkfsTime = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x108)); JournalBlocks = BitConverter.ToUInt32(bytes, 0x10C); MinimumExtraInodeSize = BitConverter.ToUInt16(bytes, 0x15C); DesiredInodeSize = BitConverter.ToUInt16(bytes, 0x15E); Flags = (FLAGS)BitConverter.ToUInt32(bytes, 0x160); RaidStride = BitConverter.ToUInt16(bytes, 0x164); MmpInterval = BitConverter.ToUInt16(bytes, 0x166); MmpBlock = BitConverter.ToUInt64(bytes, 0x168); RaidStipeWidth = BitConverter.ToUInt32(bytes, 0x170); FlexibleBlockGroupSize = (uint)Math.Pow(2, bytes[0x174]); ChecksumType = (CHECKSUM_TYPE)bytes[0x175]; KBytesWritten = BitConverter.ToUInt64(bytes, 0x178); SnapshotInode = BitConverter.ToUInt32(bytes, 0x180); SnapshotId = BitConverter.ToUInt32(bytes, 0x184); ReservedSnapshotBlockCount = BitConverter.ToUInt64(bytes, 0x188); SnapshotListInode = BitConverter.ToUInt32(bytes, 0x190); ErrorCount = BitConverter.ToUInt32(bytes, 0x194); FirstErrorTime = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x198)); FirstErrorInode = BitConverter.ToUInt32(bytes, 0x19C); FirstErrorBlock = BitConverter.ToUInt64(bytes, 0x1A0); FirstErrorFunction = Encoding.ASCII.GetString(bytes, 0x1A8, 0x20).TrimEnd('\0'); FirstErrorLine = BitConverter.ToUInt32(bytes, 0x1C8); LastErrorTime = Helper.FromUnixTime(BitConverter.ToUInt32(bytes, 0x1CC)); LastErrorInode = BitConverter.ToUInt32(bytes, 0x1D0); LastErrorLine = BitConverter.ToUInt32(bytes, 0x1D4); LastErrorBlock = BitConverter.ToUInt64(bytes, 0x1D8); LastErrorFunction = Encoding.ASCII.GetString(bytes, 0x1E0, 0x20).TrimEnd('\0'); MountOptions = Encoding.ASCII.GetString(bytes, 0x200, 0x40).TrimEnd('\0'); UserQuotaInode = BitConverter.ToUInt32(bytes, 0x240); GroupQuotaInode = BitConverter.ToUInt32(bytes, 0x244); OverheadBlocks = BitConverter.ToUInt32(bytes, 0x248); SuperblockBackupBlockGroup = BitConverter.ToUInt32(bytes, 0x24C); EncryptionAlgorithms = (ENCRYPTION_ALGORITHMS)BitConverter.ToUInt32(bytes, 0x254); EncryptPasswordSalt = bytes[0x258]; LostAndFoundInode = BitConverter.ToUInt32(bytes, 0x268); ProjectQuotaInode = BitConverter.ToUInt32(bytes, 0x26C); ChecksumSeed = BitConverter.ToUInt32(bytes, 0x270); Checksum = BitConverter.ToUInt32(bytes, 0x3FC); }
public exceptionOpenERP(ERRORS numError) { _numError = numError; }