コード例 #1
0
ファイル: Commands.cs プロジェクト: presscad/Plan2ExtAcad2013
        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
ファイル: Commands.cs プロジェクト: presscad/Plan2ExtAcad2013
        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);
        }