コード例 #1
0
ファイル: Workbench.cs プロジェクト: noah1510/dotdevelop
 public static string GetStatusMessage(int timeout = 20000, bool waitForNonEmpty = true)
 {
     if (waitForNonEmpty)
     {
         string text = null;
         Ide.WaitUntil(
             () => (text = Session.GetGlobalValue <string> ("MonoDevelop.Ide.IdeApp.Workbench.statusBar.CurrentText")) != string.Empty,
             timeout
             );
         return(text);
     }
     return((string)Session.GetGlobalValue("MonoDevelop.Ide.IdeApp.Workbench.statusBar.CurrentText"));
 }
コード例 #2
0
        public static string GetStatusMessage(int timeout = 20000)
        {
            if (Platform.IsMac)
            {
                Ide.WaitUntil(
                    () => Session.GetGlobalValue <string> ("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.text") != string.Empty,
                    timeout
                    );
                return((string)Session.GetGlobalValue("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.text"));
            }

            Ide.WaitUntil(
                () => Session.GetGlobalValue <int> ("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.messageQueue.Count") == 0,
                timeout
                );
            return((string)Session.GetGlobalValue("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.renderArg.CurrentText"));
        }
コード例 #3
0
ファイル: Workbench.cs プロジェクト: leculver/monodevelop
        public static string GetStatusMessage(int timeout = 20000, bool waitForNonEmpty = true)
        {
            if (Platform.IsMac)
            {
                const string macStatusTextField = "MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.text";
                if (waitForNonEmpty)
                {
                    Ide.WaitUntil(
                        () => Session.GetGlobalValue <string> (macStatusTextField) != string.Empty,
                        timeout
                        );
                }
                return((string)Session.GetGlobalValue(macStatusTextField));
            }

            if (waitForNonEmpty)
            {
                const string gtkStatusMessageCount = "MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.messageQueue.Count";
                Ide.WaitUntil(
                    () => Session.GetGlobalValue <int> (gtkStatusMessageCount) == 0,
                    timeout,
                    timeoutMessage: () => "MessageQueue.Count=" + Session.GetGlobalValue <int> (gtkStatusMessageCount)
                    );
            }
            return((string)Session.GetGlobalValue("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.renderArg.CurrentText"));
        }