示例#1
0
 public Bitmap SwitchImage(int iIndex)
 {
     UpdateImageInIH();
     Global.WriteToLog("Switching image to " + iIndex, true);
     m_ihPrimaryImageHandler.SwitchImages(iIndex);
     m_hhPrimaryHistoryHandler = new HistoryHandler();
     m_hhPrimaryHistoryHandler.AddOperation(Constants.Operations.SwitchImage, m_ihPrimaryImageHandler.CurrentImage);
     return(m_ihPrimaryImageHandler.CurrentImage);
 }
示例#2
0
 public Bitmap AddImage(string FilePath)
 {
     UpdateImageInIH();
     if (m_hhPrimaryHistoryHandler == null)
     {
         m_hhPrimaryHistoryHandler = new HistoryHandler(); //Create a new history handler
     }
     else
     {
         m_hhPrimaryHistoryHandler.Reset(); //Reset instead of recreate for speed
     }
     //Original code
     //m_hhPrimaryHistoryHandler = new HistoryHandler(); //Destroy history handler and create a new one
     Global.WriteToLog("Adding image " + FilePath, true);
     m_ihPrimaryImageHandler.AddImage(FilePath);
     m_hhPrimaryHistoryHandler.AddOperation(Constants.Operations.LoadImage, m_ihPrimaryImageHandler.CurrentImage);
     return(m_ihPrimaryImageHandler.CurrentImage);
 }