Beispiel #1
0
        /// <summary>
        /// Set the current result view of this dialog in the ap meta settings
        /// </summary>
        /// <param name="bView"></param>
        static internal void SetResultViewInSettingsMeta(bool bView)
        {
            Geosoft.GXNet.CMETA hMeta = null;
            Int32 iDapClass;
            Int32 iResultViewAttribute;

            try
            {
                hMeta = Geosoft.GXNet.CMETA.Create();
                Geosoft.GXNet.CSYS.GetSettingsMETA(hMeta);

                iDapClass            = hMeta.ResolveUMN("CLASS:/Geosoft/Core/AppSettings/Dap Settings");
                iResultViewAttribute = hMeta.ResolveUMN("ATTRIB:/Geosoft/Core/AppSettings/Dap Settings/GetDapData ResultView");

                Int32 iView = Convert.ToInt32(bView);
                hMeta.SetAttribBool(iDapClass, iResultViewAttribute, iView);

                Geosoft.GXNet.CSYS.SetSettingsMETA(hMeta);
            }
            catch (Exception e)
            {
                GetDapError.Instance.Write("SetResultViewInSettingsMeta - " + e.Message);
            }
            finally
            {
                if (hMeta != null)
                {
                    try
                    {
                        hMeta.Dispose();
                    }
                    catch {}
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Get the selected server from the meta settings
        /// </summary>
        /// <param name="bView"></param>
        static internal void GetSelectedServerInSettingsMeta(out string szUrl)
        {
            Geosoft.GXNet.CMETA hMeta = null;
            Int32 iDapClass;
            Int32 iUrlAttribute;

            szUrl = string.Empty;

            try
            {
                hMeta = Geosoft.GXNet.CMETA.Create();
                Geosoft.GXNet.CSYS.GetSettingsMETA(hMeta);

                iDapClass     = hMeta.ResolveUMN("CLASS:/Geosoft/Core/AppSettings/Dap Settings");
                iUrlAttribute = hMeta.ResolveUMN("ATTRIB:/Geosoft/Core/AppSettings/Dap Settings/Dap Server");

                hMeta.IGetAttribString(iDapClass, iUrlAttribute, ref szUrl);
            }
            catch (Exception e)
            {
                GetDapError.Instance.Write("GetSelectedServerInSettingsMeta - " + e.Message);
            }
            finally
            {
                if (hMeta != null)
                {
                    try
                    {
                        hMeta.Dispose();
                    }
                    catch {}
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// Get the size of the dialog from the meta settings
        /// </summary>
        /// <param name="iWidth"></param>
        /// <param name="iHeight"></param>
        static internal void GetSizeInSettingsMeta(out Int32 iWidth, out Int32 iHeight)
        {
            Geosoft.GXNet.CMETA hMeta = null;
            Int32 iDapClass;
            Int32 iHeightAttribute;
            Int32 iWidthAttribute;

            iHeight = Geosoft.GXNet.Constant.iDUMMY;
            iWidth  = Geosoft.GXNet.Constant.iDUMMY;

            try
            {
                hMeta = Geosoft.GXNet.CMETA.Create();
                Geosoft.GXNet.CSYS.GetSettingsMETA(hMeta);

                iDapClass        = hMeta.ResolveUMN("CLASS:/Geosoft/Core/AppSettings/Dap Settings");
                iHeightAttribute = hMeta.ResolveUMN("ATTRIB:/Geosoft/Core/AppSettings/Dap Settings/GetDapData Height");
                iWidthAttribute  = hMeta.ResolveUMN("ATTRIB:/Geosoft/Core/AppSettings/Dap Settings/GetDapData Width");

                hMeta.GetAttribInt(iDapClass, iHeightAttribute, ref iHeight);
                hMeta.GetAttribInt(iDapClass, iWidthAttribute, ref iWidth);
            }
            catch (Exception e)
            {
                GetDapError.Instance.Write("GetSizeInSettingsMeta - " + e.Message);
            }
            finally
            {
                if (hMeta != null)
                {
                    try
                    {
                        hMeta.Dispose();
                    }
                    catch {}
                }
            }
        }