public void Init(RAFManagerClass rafManager) { this.rafManager = rafManager; InitializeComponent(); InitializeLayoutManagement(); InitializeRAFContentViewManagement(); InitializeModEntriesManagement(); this.Load += delegate(object sender, EventArgs e) { lock (consoleLogTB) { Log(""); Log("A simple guide for using RAF Manager can be located at About->Simple Guide."); Log(""); if (File.Exists(".laststate.rmproj")) { Log("Open last state"); OpenProject(".laststate.rmproj"); } } }; // When the form closes, we save our last state so we can load it when we restart this.FormClosing += delegate(object sender, FormClosingEventArgs e){ SaveProject(".laststate.rmproj"); }; if (RAFManagerUpdater.Versioning.CurrentVersion.flags != "") { this.Text = this.Text + " BETA/Non-RC " + RAFManagerUpdater.Versioning.CurrentVersion.GetVersionString() + " [Build Time: " + RAFManagerUpdater.Versioning.CurrentVersion.ApproximateBuildTime + "]"; } //HACK! Fixes scrollbar overlapping content... Timer t = new Timer(); t.Interval = 100; t.Tick += delegate(object sender, EventArgs e){ ManageModEntriesLayout(); }; t.Start(); }
public RAFMount(RM rafManager) { //Console.SetOut(TextWriter.Null); DokanOptions options = new DokanOptions(); options.DebugMode = true; options.MountPoint = "r:\\"; options.ThreadCount = 1; int status = DokanNet.DokanMain(options, new RAFArchiveOperations(rafManager)); switch (status) { case DokanNet.DOKAN_DRIVE_LETTER_ERROR: Console.WriteLine("Drvie letter error"); break; case DokanNet.DOKAN_DRIVER_INSTALL_ERROR: Console.WriteLine("Driver install error"); break; case DokanNet.DOKAN_MOUNT_ERROR: Console.WriteLine("Mount error"); break; case DokanNet.DOKAN_START_ERROR: Console.WriteLine("Start error"); break; case DokanNet.DOKAN_ERROR: Console.WriteLine("Unknown error"); break; case DokanNet.DOKAN_SUCCESS: Console.WriteLine("Success"); break; default: Console.WriteLine("Unknown status: %d", status); break; } }
public static void Main(string[] args) { RM rm = new RM(new NullGUI()); new RAFMount(rm); }
public RAFArchiveOperations(RM rafManager) { this.rafManager = rafManager; }