• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FOS_System类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FOS_System的典型用法代码示例。如果您正苦于以下问题:C# FOS_System类的具体用法?C# FOS_System怎么用?C# FOS_System使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FOS_System类属于命名空间,在下文中一共展示了FOS_System类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateProcess

        public static Process CreateProcess(ThreadStartMethod MainMethod, FOS_System.String Name, bool UserMode, bool CreateHeap)
        {
#if PROCESSMANAGER_TRACE
            BasicConsole.WriteLine("Creating process object...");
#endif
            return new Process(MainMethod, ProcessIdGenerator++, Name, UserMode, CreateHeap);
        }
开发者ID:sramos30,项目名称:FlingOS,代码行数:7,代码来源:ProcessManager.cs


示例2: Find

        /// <summary>
        /// Attempts to find the specified directory within any file system.
        /// </summary>
        /// <param name="directoryName">The full path and name of the directory to find.</param>
        /// <returns>The directory or null if it isn't found.</returns>
        public static Directory Find(FOS_System.String directoryName)
        {
            FileSystemMapping theMapping = FileSystemManager.GetMapping(directoryName);
            if (theMapping == null)
            {
                return null;
            }

            directoryName = theMapping.RemoveMappingPrefix(directoryName);
            
            directoryName = directoryName.ToUpper();
            
            Base baseListing = theMapping.TheFileSystem.GetListing(directoryName);
            if (baseListing == null)
            {
                return null;
            }
            else
            {
                if (baseListing is Directory)
                {
                    return (Directory)baseListing;
                }
                else
                {
                    return null;
                }
            }
        }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:34,代码来源:Directory.cs


示例3: Open

        /// <summary>
        /// Opens the specified file.
        /// </summary>
        /// <param name="fileName">The full path to the file to open.</param>
        /// <returns>The file listing or null if not found.</returns>
        public static File Open(FOS_System.String fileName)
        {
            FileSystemMapping theMapping = FileSystemManager.GetMapping(fileName);
            if(theMapping == null)
            {
                return null;
            }

            fileName = theMapping.RemoveMappingPrefix(fileName);

            fileName = fileName.ToUpper();

            Base baseListing = theMapping.TheFileSystem.GetListing(fileName);
            if (baseListing == null)
            {
                return null;
            }
            else
            {
                if (baseListing is File)
                {
                    return (File)baseListing;
                }
                else
                {
                    return null;
                }
            }
        }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:34,代码来源:File.cs


示例4: Base

 /// <summary>
 /// Initializes a new base listing.
 /// </summary>
 /// <param name="aFileSystem">The file system to which the listing belongs.</param>
 /// <param name="parent">The parent directory of the listing.</param>
 /// <param name="aName">The name of the listing.</param>
 /// <param name="isDirectory">Whether the listing is a directory or not.</param>
 protected Base(FileSystem aFileSystem, Directory parent, FOS_System.String aName, bool isDirectory)
 {
     TheFileSystem = aFileSystem;
     Name = aName;
     IsDirectory = isDirectory;
     Parent = parent;
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:14,代码来源:Base.cs


示例5: AddDeviceAddedListener

 public static void AddDeviceAddedListener(DeviceAddedHandler aHandler, FOS_System.Object aState)
 {
     DeviceAddedListeners.Add(new DeviceAddedListener()
     {
         handler = aHandler,
         state = aState
     });
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:8,代码来源:DeviceManager.cs


示例6: GetASCIIBytes

 public static byte[] GetASCIIBytes(FOS_System.String asciiString)
 {
     byte[] result = new byte[asciiString.length];
     for(int i = 0; i < asciiString.length; i++)
     {
         result[i] = (byte)asciiString[i];
     }
     return result;
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:9,代码来源:ByteConverter.cs


示例7: Parse_DecimalSigned

 /// <summary>
 /// Parses a string as an signed decimal integer.
 /// </summary>
 /// <param name="str">The string to parse.</param>
 /// <returns>The parsed int.</returns>
 public static int Parse_DecimalSigned(FOS_System.String str)
 {
     bool neg = str.StartsWith("-");
     int result = (int)Parse_DecimalUnsigned(str, (neg ? 1 : 0));
     if (neg)
     {
         result *= -1;
     }
     return result;
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:15,代码来源:Int32.cs


示例8: Concat

 public static unsafe FOS_System.String Concat(FOS_System.String str1, FOS_System.String str2)
 {
     FOS_System.String newStr = New(str1.length + str2.length);
     for (int i = 0; i < str1.length; i++)
     {
         newStr[i] = str1[i];
     }
     for (int i = 0; i < str2.length; i++)
     {
         newStr[i + str1.length] = str2[i];
     }
     return newStr;
 }
开发者ID:sramos30,项目名称:FlingOS,代码行数:13,代码来源:String.cs


示例9: Process

        public Process(ThreadStartMethod MainMethod, uint AnId, FOS_System.String AName, bool userMode)
        {
#if PROCESS_TRACE
            BasicConsole.WriteLine("Constructing process object...");
#endif
            Id = AnId;
            Name = AName;
            UserMode = userMode;

#if PROCESS_TRACE
            BasicConsole.WriteLine("Creating thread...");
#endif
            CreateThread(MainMethod);
        }
开发者ID:kztao,项目名称:FlingOS,代码行数:14,代码来源:Process.cs


示例10: Parse_DecimalUnsigned

 /// <summary>
 /// Parses a string as an unsigned decimal integer.
 /// </summary>
 /// <param name="str">The string to parse.</param>
 /// <param name="offset">The offset into the string at which to start parsing.</param>
 /// <returns>The parsed uint.</returns>
 public static uint Parse_DecimalUnsigned(FOS_System.String str, int offset)
 {
     uint result = 0;
     for(int i = offset; i < str.length; i++)
     {
         char c = str[i];
         if (c < '0' || c > '9')
         {
             break;
         }
         result *= 10;
         result += (uint)(c - '0');
     }
     return result;
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:21,代码来源:Int32.cs


示例11: OutputExceptionInfo

 protected void OutputExceptionInfo(FOS_System.Exception Ex)
 {
     if (Ex != null)
     {
         console.WarningColour();
         console.WriteLine(Ex.Message);
         if (Ex is FOS_System.Exceptions.PageFaultException)
         {
             console.WriteLine(((FOS_System.String)"    - Address: ") + ((FOS_System.Exceptions.PageFaultException)Ex).address);
             console.WriteLine(((FOS_System.String)"    - Error code: ") + ((FOS_System.Exceptions.PageFaultException)Ex).errorCode);
         }
         console.DefaultColour();
     }
     else
     {
         console.WriteLine("No current exception.");
     }
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:18,代码来源:Shell.cs


示例12: Push

        public bool Push(FOS_System.Object obj)
        {
            AccessLock.Enter();

            try
            {
                if (WriteIdx == ReadIdx &&
                    ReadIdx != -1)
                {
                    if (ThrowExceptions)
                    {
                        ExceptionMethods.Throw(new Exceptions.OverflowException("Circular buffer cannot Push because the buffer is full."));
                    }
                    return false;
                }

                WriteIdx++;

                if (WriteIdx == _array.Length)
                {
                    if (ReadIdx == -1)
                    {
                        WriteIdx--;

                        if (ThrowExceptions)
                        {
                            ExceptionMethods.Throw(new Exceptions.OverflowException("Circular buffer cannot Push because the buffer is full."));
                        }
                        return false;
                    }

                    WriteIdx = 0;
                }

                _array[WriteIdx] = obj;

                return true;
            }
            finally
            {
                AccessLock.Exit();
            }
        }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:43,代码来源:CircularBuffer.cs


示例13: Push

        public void Push(FOS_System.Object val)
        {
            if ((BackIdx != 0 && FrontIdx == BackIdx - 1) ||
                (BackIdx == 0 && FrontIdx == InternalArray.Length - 1))
            {
                // Queue full
                if (CanExpand)
                {
                    Expand(InternalArray.Length);
                }
                else
                {
                    return;
                }
            }

            InternalArray[FrontIdx++] = val;

            if (FrontIdx >= InternalArray.Length)
            {
                FrontIdx = 0;
            }
        }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:23,代码来源:Queue.cs


示例14: BasicConsole_SecondaryOutput

 private static void BasicConsole_SecondaryOutput(FOS_System.String str)
 {
     Hardware.IO.Serial.Serial.COM1.Write(str);
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:4,代码来源:Kernel.cs


示例15: Add

 public void Add(FOS_System.Object obj)
 {
     //If the next index to insert an item at is beyond the capacity of
     //  the array, we need to expand the array.
     if (nextIndex >= _array.Length)
     {
         ExpandCapacity(ExpandAmount);
     }
     //Insert the object at the next index in the internal array then increment
     //  next index 
     _array[nextIndex] = obj;
     nextIndex++;
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:13,代码来源:List.cs


示例16: IRQHandler

 private static void IRQHandler(FOS_System.Object state)
 {
     ((PATAPI)state).IRQHandler();
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:4,代码来源:PATAPI.cs


示例17: OverflowException

 /// <summary>
 /// Sets the message to "Overflow exception."
 /// </summary>
 public OverflowException(FOS_System.String message)
     : base("Overflow exception. " + message)
 {
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:7,代码来源:OverflowException.cs


示例18: PathMatchesMapping

 /// <summary>
 /// Determines whether the specified path starts with this
 /// mapping's prefix.
 /// </summary>
 /// <param name="aPath">The path to check.</param>
 /// <returns>
 /// Whether the specified path starts with this
 /// mapping's prefix.
 /// </returns>
 public bool PathMatchesMapping(FOS_System.String aPath)
 {
     return aPath.ToUpper().StartsWith(prefix);
 }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:13,代码来源:FileSystemMapping.cs


示例19: SignalWait

 /// <summary>
 /// The internal wait interrupt handler static wrapper.
 /// </summary>
 /// <param name="state">The PIT object state.</param>
 private static void SignalWait(FOS_System.Object state)
 {
     ((PIT)state).SignalWait();
 }
开发者ID:kztao,项目名称:FlingOS,代码行数:8,代码来源:PIT.cs


示例20: Write

        public static unsafe void Write(FOS_System.String str)
        {
            if (!Initialised) return;
            //If string is null, just don't write anything
            if (str == null)
            {
                //Do not make this throw an exception. The BasicConsole
                //  is largely a debugging tool - it should be reliable,
                //  robust and not throw exceptions.
                return;
            }

            if (PrimaryOutputEnabled)
            {
                int strLength = str.length;
                int maxOffset = rows * cols;

                //This block shifts the video memory up the required number of lines.
                if (offset + strLength > maxOffset)
                {
                    int amountToShift = (offset + strLength) - maxOffset;
                    amountToShift = amountToShift + (80 - (amountToShift % 80));
                    offset -= amountToShift;

                    char* vidMemPtr_Old = vidMemBasePtr;
                    char* vidMemPtr_New = vidMemBasePtr + amountToShift;
                    char* maxVidMemPtr = vidMemBasePtr + (cols * rows);
                    while (vidMemPtr_New < maxVidMemPtr)
                    {
                        vidMemPtr_Old[0] = vidMemPtr_New[0];
                        vidMemPtr_Old++;
                        vidMemPtr_New++;
                    }
                }

                //This block outputs the string in the current foreground / background colours.
                char* vidMemPtr = vidMemBasePtr + offset;
                char* strPtr = str.GetCharPointer();
                while (strLength > 0)
                {
                    vidMemPtr[0] = (char)((*strPtr & 0x00FF) | colour);

                    strLength--;
                    vidMemPtr++;
                    strPtr++;
                    offset++;
                }
            }

            if (SecondaryOutput != null && SecondaryOutputEnabled)
            {
                SecondaryOutput(str);
            }
        }
开发者ID:rmhasan,项目名称:FlingOS,代码行数:54,代码来源:BasicConsole.cs



注:本文中的FOS_System类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FREE_IMAGE_FORMAT类代码示例发布时间:2022-05-24
下一篇:
C# FORMATETC类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap