Esempio n. 1
0
 public void IndexFolder2012()
 {
     LinearClusterMyLoIndexer indexer = new LinearClusterMyLoIndexer();
     MyLoIndexer mx = new MyLoIndexer(indexer);
     Stopwatch stopWatch = new Stopwatch();
     stopWatch.Start();
     try
     {
         mx.UserLogin(1);
         int count = mx.StartIndexing();
         TimeSpan ts = stopWatch.Elapsed;
         string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
             ts.Hours, ts.Minutes, ts.Seconds,
             ts.Milliseconds / 10);
         Debug.WriteLine(String.Format("Finished Indexing; Time: {0}; Number: {1}", elapsedTime, count));
     }
     catch (Exception ex)
     {
         Debug.WriteLine(String.Format(ex.Message));
     }
 }
 private void IndexerBuilder_Click(object sender, EventArgs e)
 {
     MyLoIndexer mx = new MyLoIndexer();
     _userId = mx.UserLogin(this.MyLoAccountName.Text);
     Stopwatch stopWatch = new Stopwatch();
     Cursor.Current = Cursors.WaitCursor;
     stopWatch.Start();
     if (_userId != 0)
     {
         try
         {
             int count = mx.StartIndexing();
             TimeSpan ts = stopWatch.Elapsed;
             string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                 ts.Hours, ts.Minutes, ts.Seconds,
                 ts.Milliseconds / 10);
             textBox1.Text = String.Format("Finished Indexing; Time: {0}; Number: {1}", elapsedTime, count);
             Cursor.Current = Cursors.Default;
         }
         catch (Exception ex)
         {
             textBox1.Text = String.Format(ex.Message);
         }
     }
     else
     {
         textBox1.Text = String.Format("Please Enter a Valid MyLo Account Name");
     }
 }
 private void catalogPhotosButton_Click(object sender, EventArgs e)
 {
     SimpleMyLoIndexer simpleIndexer = new SimpleMyLoIndexer();
     MyLoIndexer indexer = new MyLoIndexer(simpleIndexer);
     indexer.UserLogin(_userId);
     Stopwatch stopWatch = new Stopwatch();
     Cursor.Current = Cursors.WaitCursor;
     stopWatch.Start();
     if (_userId != 0)
     {
         try
         {
             int count = indexer.StartIndexing();
             TimeSpan ts = stopWatch.Elapsed;
             string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                 ts.Hours, ts.Minutes, ts.Seconds,
                 ts.Milliseconds / 10);
             textBox3.Text = String.Format("Finished Indexing; Time: {0}; Number: {1}", elapsedTime, count);
             RefreshAllBoxes();
             Cursor.Current = Cursors.Default;
         }
         catch (Exception ex)
         {
             textBox3.Text = String.Format(ex.Message);
         }
     }
     else
     {
         textBox3.Text = String.Format("Please Enter a Valid MyLo Account Name");
     }
 }