Esempio n. 1
0
        protected override void Run()
        {
            var    selector = new FileSelectorDialog("Open session");
            string filename = null;

            try {
                var result = MessageService.RunCustomDialog(selector, MessageService.RootWindow);

                if (result == (int)Gtk.ResponseType.Cancel)
                {
                    return;
                }

                filename = selector.Filename;
            } finally {
                selector.Destroy();
            }
            AutoTestService.ReplaySessionFromFile(filename);
        }
Esempio n. 2
0
        protected override void Run()
        {
            if (AutoTestService.CurrentRecordSession == null)
            {
                AutoTestService.StartRecordingSession();
            }
            else
            {
                var selector = new FileSelectorDialog("Save session as...", Gtk.FileChooserAction.Save);
                try {
                    var result = MessageService.RunCustomDialog(selector, MessageService.RootWindow);

                    if (result == (int)Gtk.ResponseType.Cancel)
                    {
                        return;
                    }

                    AutoTestService.StopRecordingSession(selector.Filename);
                } finally {
                    selector.Destroy();
                }
            }
        }