Esempio n. 1
0
        private void GetZMost(ref int zMost)
        {
            if (OwnerRegion == null)
            {
                return;
            }

            IRegions regions = OwnerRegion.GetChildRegions(_viewGuid);

            foreach (IRegion region in regions)
            {
                IRegionStyle regionStyle = region.GetRegionStyle(_viewGuid);

                // If region is hamburger menu, use the button location and size to caculate.
                if (region is IHamburgerMenu)
                {
                    IHamburgerMenu menu = region as IHamburgerMenu;
                    regionStyle = menu.MenuButton.GetRegionStyle(_viewGuid);
                }

                if (regionStyle != null)
                {
                    zMost = Math.Max(regionStyle.Z, zMost);
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fileName"></param>
 protected SongMemory(string fileName)
 {
     OriginalFileName   = fileName;
     FileName           = fileName;
     MemoryFileType     = FileType.Sng;
     Songs              = new Songs();
     Regions            = new Regions();
     ConnectedPcgMemory = null;
 }
Esempio n. 3
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public RegionSelectForm(IRegions regions)
            : base()
        {
            InitializeComponent();                  // Инициализировать компоненты формы

            _regions = regions;                     // Скопировать список регионов в поле

            ConfigureEntitiesDataGridView();        // Настроить визуальное представление элемента отображения списка сущностей

            FillEntitiesDataGridView();             // Заполнить элемент отображения списка сущностей

            SetButtonActivity();                    // Задать активность элементов управления
        }
Esempio n. 4
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public CityForm(ICity city, IRegions regions)
        {
            InitializeComponent();                      // Инициализировать компоненты формы

            _city    = city;                            // Сохранить город в поле
            _regions = regions;                         // Сохранить список регионов в поле

            _regionAfterRelinking = city.Region;        // Сохранить регион, связанный с городом

            CleanAllData();                             // Очистить все данные формы

            CopyDataFromEntity();                       // Скопировать данные из сущности в компоненты формы
        }
Esempio n. 5
0
        private void GetBottomMost(ref double bottomMost)
        {
            if (OwnerRegion == null)
            {
                return;
            }

            IRegions regions = OwnerRegion.GetChildRegions(_viewGuid);

            foreach (IRegion region in regions)
            {
                IRegionStyle regionStyle = region.GetRegionStyle(_viewGuid);

                // If region is hamburger menu, use the button location and size to caculate.
                if (region is IHamburgerMenu)
                {
                    IHamburgerMenu menu = region as IHamburgerMenu;
                    regionStyle = menu.MenuButton.GetRegionStyle(_viewGuid);
                }

                if (regionStyle != null)
                {
                    if (regionStyle.Rotate == 0)
                    {
                        bottomMost = Math.Max(regionStyle.Y + regionStyle.Height, bottomMost);
                    }
                    else
                    {
                        double x     = regionStyle.X;
                        double y     = regionStyle.Y;
                        double xc    = (regionStyle.X * 2 + regionStyle.Width) / 2;
                        double yc    = (regionStyle.Y * 2 + regionStyle.Height) / 2;
                        double angle = Math.Abs(regionStyle.Rotate) % 180;
                        if (angle > 90)
                        {
                            angle = 180 - angle;
                        }
                        double Kc = Math.Cos(angle * Math.PI / 180);
                        double Ks = Math.Sin(angle * Math.PI / 180);

                        double yr     = yc - (Ks * (xc - x) + Kc * (yc - y));
                        double height = regionStyle.Height + (y - yr) * 2;
                        bottomMost = Math.Max(yr + height, bottomMost);
                    }
                }
            }
        }
 /// <summary>
 /// Get entity from bcgov_regions by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='bcgovRegionid'>
 /// key: bcgov_regionid
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMbcgovRegion GetByKey(this IRegions operations, string bcgovRegionid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetByKeyAsync(bcgovRegionid, select, expand).GetAwaiter().GetResult());
 }
Esempio n. 7
0
 public ValuesController(IBloodStock iBloodStock, IRegions iRegions)
 {
     _bloodStock = iBloodStock;
     _iRegions   = iRegions;
 }
Esempio n. 8
0
 /// <summary>
 /// Get entities from adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMadoxioRegionCollection> GetAsync(this IRegions operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 9
0
 /// <summary>
 /// Get entities from adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMadoxioRegionCollection Get(this IRegions operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get entities from bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static RegionsGetResponseModel Get(this IRegions operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update entity in bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='bcgovRegionid'>
 /// key: bcgov_regionid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void Update(this IRegions operations, string bcgovRegionid, MicrosoftDynamicsCRMbcgovRegion body)
 {
     operations.UpdateAsync(bcgovRegionid, body).GetAwaiter().GetResult();
 }
Esempio n. 12
0
 /// <summary>
 /// Add new entity to adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioRegion> CreateWithHttpMessages(this IRegions operations, MicrosoftDynamicsCRMadoxioRegion body, string prefer = "return=representation", Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.CreateWithHttpMessagesAsync(body, prefer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 13
0
 /// <summary>
 /// Get entities from adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioRegionCollection> GetWithHttpMessages(this IRegions operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Esempio n. 14
0
 public TravelFacade(IRegions regions, IAccommodations accommodations)
 {
     Regions        = regions;
     Accommodations = accommodations;
 }
 /// <summary>
 /// Delete entity from bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='bcgovRegionid'>
 /// key: bcgov_regionid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void Delete(this IRegions operations, string bcgovRegionid, string ifMatch = default(string))
 {
     operations.DeleteAsync(bcgovRegionid, ifMatch).GetAwaiter().GetResult();
 }
Esempio n. 16
0
 /// <summary>
 /// Get entity from adoxio_regions by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioRegionid'>
 /// key: adoxio_regionid of adoxio_region
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioRegion> GetByKeyWithHttpMessages(this IRegions operations, string adoxioRegionid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetByKeyWithHttpMessagesAsync(adoxioRegionid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete entity from bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='bcgovRegionid'>
 /// key: bcgov_regionid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IRegions operations, string bcgovRegionid, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(bcgovRegionid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 18
0
 /// <summary>
 /// Update entity in adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioRegionid'>
 /// key: adoxio_regionid of adoxio_region
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse UpdateWithHttpMessages(this IRegions operations, string adoxioRegionid, MicrosoftDynamicsCRMadoxioRegion body, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.UpdateWithHttpMessagesAsync(adoxioRegionid, body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update entity in bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='bcgovRegionid'>
 /// key: bcgov_regionid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IRegions operations, string bcgovRegionid, MicrosoftDynamicsCRMbcgovRegion body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(bcgovRegionid, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 20
0
 /// <summary>
 /// Delete entity from adoxio_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioRegionid'>
 /// key: adoxio_regionid of adoxio_region
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse DeleteWithHttpMessages(this IRegions operations, string adoxioRegionid, string ifMatch = default(string), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.DeleteWithHttpMessagesAsync(adoxioRegionid, ifMatch, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Add new entity to bcgov_regions
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 public static MicrosoftDynamicsCRMbcgovRegion Create(this IRegions operations, MicrosoftDynamicsCRMbcgovRegion body, string prefer = "return=representation")
 {
     return(operations.CreateAsync(body, prefer).GetAwaiter().GetResult());
 }
Esempio n. 22
0
 public CountriesController(IRegions regions)
 {
     _regions = regions;
 }