예제 #1
0
        public IndexingStatusWindow()
            : base("IndexingStatusWindow")
        {
            indexingSpinner = new Hyena.Widgets.AnimatedImage();
            indexingSpinner.SetSizeRequest(16, 16);
            indexingSpinner.Pixbuf = Gui.LoadIcon(22, "process-working");
            indexingSpinner.FrameHeight = 22;
            indexingSpinner.FrameWidth = 22;
            indexingSpinner.Load();
            indexingSpinnerAlignment.Add(indexingSpinner);

            hashingSpinner = new Hyena.Widgets.AnimatedImage();
            hashingSpinner.SetSizeRequest(16, 16);
            hashingSpinner.Pixbuf = Gui.LoadIcon(22, "process-working");
            hashingSpinner.FrameHeight = 22;
            hashingSpinner.FrameWidth = 22;
            hashingSpinner.Load();
            hashingSpinnerAlignment.Add(hashingSpinner);

            Core.ShareBuilder.StartedIndexing += delegate {
                Application.Invoke(delegate {
                    indexingFileLabel.Text = "(Starting...)";
                    indexingSpinner.Show();
                });
            };

            Core.ShareBuilder.IndexingFile += delegate (ShareBuilder builder, string filePath) {
                Application.Invoke(delegate {
                    indexingFileLabel.Text = filePath;
                    indexingSpinner.Show();
                });
            };

            Core.ShareBuilder.FinishedIndexing += delegate {
                Application.Invoke(delegate {
                    indexingFileLabel.Text = "(Idle)";
                    indexingSpinner.Hide();
                });
            };

            Core.ShareBuilder.StoppedIndexing += delegate {
                Application.Invoke(delegate {
                    indexingFileLabel.Text = "(Idle - last run aborted)";
                    indexingSpinner.Hide();
                });
            };

            Core.ShareHasher.StartedHashingFile += delegate {
                UpdateShareHasherStatus();
            };

            Core.ShareHasher.FinishedHashingFile += delegate {
                UpdateShareHasherStatus();
            };

            Core.ShareHasher.QueueChanged += delegate {
                UpdateShareHasherStatus();
            };
        }
예제 #2
0
 protected override void OnHidden()
 {
     base.OnHidden();
     image.Hide();
 }