void OpenProfile (string filename) { ProfileView view = new ProfileView (); if (view.LoadProfile (filename)) { view.Show (); View = view; logging_enabled_action.Visible = false; save_action.Sensitive = true; show_system_nodes_action.Sensitive = view.SupportsFiltering; log_info = null; foreach (LogInfo info in history.LogFiles) { if (info.Filename == filename) { log_info = info; break; } } if (log_info == null) log_info = new LogInfo (filename, null); history.LogFiles.Prepend (log_info); } }
void StartProfile (ProfileConfiguration config) { ProfileView view = new ProfileView (); view.Show (); View = view; logging_enabled_action.Visible = true; logging_enabled_action.Active = config.StartEnabled; proc = new ProfilerProcess (config); proc.Paused += delegate { Refresh (view); }; proc.Exited += delegate { Refresh (view); logging_enabled_action.Visible = false; }; proc.Start (); log_info = new LogInfo (proc.LogFile, config.ToString ()); history.LogFiles.Prepend (log_info); history.Configs.Prepend (config); }