private void ShowHistory_Click(object sender, RoutedEventArgs e)
        {
            History = m_biz.GetFullHistory();
            DisplayHistory disp = new DisplayHistory(History);

            disp.Show();
        }
        private void Load_Click(object sender, RoutedEventArgs e)
        {
            //Note: It may required to run Visual Studio in administrator mode fro filestream to work
            FileStream             f  = new FileStream("C:/History.xml", FileMode.Open, FileAccess.Read);
            DataContractSerializer sz = new DataContractSerializer(typeof(BrowseHistory));

            History = (BrowseHistory)sz.ReadObject(f);
            f.Close();
            m_biz.SetFullHistory(History);

            int currentzoom = (int)slider.Value;

            HE    = m_biz.GetCurrHistEntry();
            xaxis = HE.x;
            yaxis = HE.y;
            if (currentzoom != HE.zoom)
            {
                slideraddhistent = 0;
                slider.Value     = HE.zoom;
            }
            else
            {
                loader();
            }
        }
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            History = m_biz.GetFullHistory();
            //Note: It may required to run Visual Studio in administrator mode fro filestream to work
            FileStream f = new FileStream("C:/History.xml", FileMode.Create, FileAccess.Write);

            DataContractSerializer sz = new DataContractSerializer(typeof(BrowseHistory));

            sz.WriteObject(f, History);
            f.Close();
        }
 public void SetFullHistory(BrowseHistory History)
 {
     BH = History;
 }
 //Save history to a disk
 public void SetFullHistory(BrowseHistory history)
 {
     m_hist = history;
 }
Exemple #6
0
 void ITMBizController.SetFullHistory(BrowseHistory hist)
 {
     browseH.History        = hist.History;
     browseH.CurrEntryIndex = hist.CurrEntryIndex;
 }
 /// <summary>
 /// SetFullHistory
 /// sets a new BrowseHistory object and sets curidx to the end
 /// </summary>
 /// <param name="hist"></param>
 public void SetFullHistory(BrowseHistory hist)
 {
     m_hist             = hist;
     m_hist.CurEntryIdx = m_hist.History.Count() - 1;      // set idx so history is behind it
 }