Пример #1
0
        private static bool OpenRnPalette()
        {
            if (_RnPalette == null)
            {
                _RnPalette = new RnPalette();
            }

            bool wasOpen = _RnPalette.Show();

            if (!wasOpen)
            {
                return(false);
            }

            Document doc = Application.DocumentManager.MdiActiveDocument;

            if (doc == null)
            {
                return(false);
            }
            log.DebugFormat("Dokumentname: {0}.", doc.Name);

            if (Globs.TheRnOptions == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Пример #2
0
        public static object Plan2Raumnummern(ResultBuffer rb)
        {
            log.Debug("--------------------------------------------------------------------------------");
            log.Debug("Plan2Raumnummern");
            try
            {
                Document doc = Application.DocumentManager.MdiActiveDocument;
                log.DebugFormat("Dokumentname: {0}.", doc.Name);

                if (_RnPalette == null)
                {
                    _RnPalette = new RnPalette();
                }

                bool wasOpen = _RnPalette.Show();

                if (wasOpen)
                {
                    return(true);
                }
                else
                {
                    return(false); // returns nil
                }
            }
            catch (System.Exception ex)
            {
                Application.ShowAlertDialog(string.Format(CultureInfo.CurrentCulture, "Fehler in Plan2Raumnummern aufgetreten! {0}", ex.Message));
            }
            finally
            {
                //Free();
            }
            return(false);
        }