Exemplo n.º 1
0
        private void SetTime(int delta, DateTime t)
        {
            int YYYY = t.Year;
            int MM   = t.Month;
            int DD   = t.Day;
            int hh   = t.Hour;
            int mm   = t.Minute;
            int ss   = t.Second;
            int ms   = t.Millisecond;

            byte[] buf = new byte[17] {
                (byte)((YYYY / 1000) % 10 + 0x30), (byte)((YYYY / 100) % 10 + 0x30),
                (byte)((YYYY / 10) % 10 + 0x30), (byte)((YYYY / 1) % 10 + 0x30),
                (byte)((MM / 10) % 10 + 0x30), (byte)((MM / 1) % 10 + 0x30),
                (byte)((DD / 10) % 10 + 0x30), (byte)((DD / 1) % 10 + 0x30),
                (byte)((hh / 10) % 10 + 0x30), (byte)((hh / 1) % 10 + 0x30),
                (byte)((mm / 10) % 10 + 0x30), (byte)((mm / 1) % 10 + 0x30),
                (byte)((ss / 10) % 10 + 0x30), (byte)((ss / 1) % 10 + 0x30),
                (byte)((ms / 100) % 10 + 0x30), (byte)((ms / 10) % 10 + 0x30),
                0
            };
            UndoRedo.Exec(new BindArray(this, GetPos() + delta, 17, buf));
        }
Exemplo n.º 2
0
        public static bool Close()
        {
            if (View.disktool != null)
            {
                View.disktool.CloseDisk();
            }
            Model.Close();
            Publisher.Unregister("CD:ROOT");
            Publisher.Unregister("CD:PVD");
            RamDisk.Close();
            UndoRedo.Reset();
            pvd  = null;
            root = null;

            foreach (KeyValuePair <string, DirRec> pair in Records)
            {
                Publisher.Unregister(pair.Key);
            }
            Records.Clear();
            Path2Pos.Clear();
            Lba2Path.Clear();
            Logger.SetProgress(100);
            return(Logger.Pass("File closed"));
        }
Exemplo n.º 3
0
 private void OnMenu_EditRedo(object sender, EventArgs e)
 {
     UndoRedo.Redo();
 }