public static void newFileManager(String pathName, int posToInit) { FileManager newSession = new FileManager(); int chosen_file_index = newSession.InitializeThroughPathName(pathName); WinMan.ChangeFileManager(newSession, posToInit); }
public void ChangeFileManager(FileManager NewFileMana, int main_starting_position) { int main_position = PrimaryViewer.CurrentPos; foreach(PictureManager mana in CloneForms) { int distance = mana.CurrentPos - main_position; mana.FileMana = NewFileMana; mana.Initialize(main_starting_position + distance); } }
/* * This method is to intialize a new file manager and initialize through a dialog where the user can choose his/her file. */ public static void newFileManagerThroughDialog() { FileManager newSession = new FileManager(); int chosen_file_index = newSession.InitializeThroughDialog(); if ((chosen_file_index >= 0) && (WinMan != null)) { WinMan.ChangeFileManager(newSession, chosen_file_index); } }
public Clone(FileManager FileMana, int clonenum, String headeraddon, Mode pageMode, int pos_to_start = 0) : base(FileMana ,pos_to_start, clonenum, pageMode) { this.MouseWheel += new MouseEventHandler(Reader_MouseWheel); InitializeComponent(); this.Text = "MangaViewer Clone: " + clonenum + " " + headeraddon; PictureBox.SizeMode = PictureBoxSizeMode.Zoom; }
public PictureManager(FileManager FM, BasicReader thisform, int currentposition, //Constructor: CurrentPosition is defaulted to the first position. int formnumber, Mode pageMode) { this.FM = FM; this.thisform = thisform; PageMode = pageMode; CurrentPosition = currentposition; Initialize(currentposition); this.FormNumber = formnumber; }
private void InitializeSession() { //Work on initialization FileManager fileMana = new FileManager(); int chosen_file_index = fileMana.InitializeThroughDialog(); //Create Picture Manager for the Main Viewer if(chosen_file_index >= 0) { PicMan = new PictureManager(fileMana, this, chosen_file_index, 1, new DefaultMode()); SessionManager.CreateWinMan(PicMan); //Set WindowsManager for Static class responsible for reinitialization } }
private void useSession(object sender, EventArgs e, ToolStripMenuItem menuItem, String pathname, int pos) { if(SessionManager.WinManNotInit) { FileManager filemana = new FileManager(); filemana.InitializeThroughPathName(pathname); PicMan = new PictureManager(filemana, this, pos, 1, new DefaultMode()); SessionManager.CreateWinMan(PicMan); } else { SessionManager.newFileManager(pathname, pos); } }
public BasicReader(FileManager mana, int pos_to_start, int formnumber, Mode pageMode) { InitializeComponent(); PicMan = new PictureManager(mana, this, pos_to_start, formnumber, pageMode); }