コード例 #1
0
ファイル: Dummy.cs プロジェクト: HydroReaper666/3DSCPlus
            public void Import(FileStream fs)
            {
                byte[] buf = new byte[System.Runtime.InteropServices.Marshal.SizeOf(typeof(Dummy.Keybinding.Event))];

                edown.Clear();
                eup.Clear();
                eheld.Clear();

                byte cnt = (byte)fs.ReadByte();

                for (int i = 0; i != cnt; i++)
                {
                    fs.Read(buf, 0, buf.Length);
                    edown.Add(NativeInput.byte2struct <Dummy.Keybinding.Event>(buf));
                }

                cnt = (byte)fs.ReadByte();
                for (int i = 0; i != cnt; i++)
                {
                    fs.Read(buf, 0, buf.Length);
                    eup.Add(NativeInput.byte2struct <Dummy.Keybinding.Event>(buf));
                }

                cnt = (byte)fs.ReadByte();
                for (int i = 0; i != cnt; i++)
                {
                    fs.Read(buf, 0, buf.Length);
                    eheld.Add(NativeInput.byte2struct <Dummy.Keybinding.Event>(buf));
                }
            }
コード例 #2
0
ファイル: Dummy.cs プロジェクト: HydroReaper666/3DSCPlus
 public void Import(FileStream fs)
 {
     byte[] buf = new byte[System.Runtime.InteropServices.Marshal.SizeOf(typeof(Rectangle))];
     fs.Read(buf, 0, buf.Length);
     rekt = NativeInput.byte2struct <Rectangle>(buf);
     kb   = new Keybinding();
     kb.Import(fs);
 }