125 lines
5.2 KiB
C#
125 lines
5.2 KiB
C#
using Sarand.Core.Mobile.App;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Text;
|
|
using Xamarin.Forms;
|
|
|
|
namespace Sarand.LogisticsMgr.Mobile.Core.App
|
|
{
|
|
//=======================================================================
|
|
// Colour references:
|
|
// http://www.html-color-names.com/skyblue.php
|
|
// http://www.html-color-names.com/lightsteelblue.php
|
|
//=======================================================================
|
|
public static class SlmMobile
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Definitions.
|
|
public enum Platform
|
|
{
|
|
Unknown = 0,
|
|
Android,
|
|
IOS,
|
|
Windows
|
|
}
|
|
public static String AppTitle { get; } = "Sarand LogisticsMgr";
|
|
// Utilities.
|
|
public static Random Random { get; } = new Random();
|
|
|
|
//-------------------------------------------------------------------
|
|
// Application.
|
|
public enum MainView
|
|
{
|
|
Unknown = 0,
|
|
// System.
|
|
Login,
|
|
Home,
|
|
// Bulk.
|
|
ShipFile,
|
|
// Containers.
|
|
AssetMovements
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Localisation.
|
|
public static CultureInfo CultureInfo { get; } = CultureInfo.CurrentCulture;
|
|
public static TextInfo TextInfo { get; } = CultureInfo.TextInfo;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Application styling.
|
|
public static double ApplicationBarHeight { get; } = 28;
|
|
public static Color ApplicationBarBackgroundColor { get; } = Color.FromHex("#558395");
|
|
public static Color ApplicationBarTextColor { get; } = Color.FromHex("#f8f8f8");
|
|
public static double ApplicationBarTextSizeRatio { get; } = 1.5;
|
|
public static Color ApplicationBarBorderColor { get; } = Color.DarkSlateBlue;
|
|
public static double ApplicationBarBorderBottom { get; } = 1.0;
|
|
// Menu.
|
|
public static Color MenuBorderColor { get; } = Color.DarkSlateBlue;
|
|
public static double MenuBorder { get; } = 1.0;
|
|
public static Color MenuBackgroundColor { get; } = Color.FromHex("#F0F0F0");
|
|
public static Color MenuHeaderBackgroundColor { get; } = Color.FromHex("#E0E0E0");
|
|
// Dynamic font sizing.
|
|
public static String HtmlFontSize
|
|
{
|
|
get
|
|
{
|
|
if (SaxApplication.MinDeviceDimension > 2000) return "14pt";
|
|
if (SaxApplication.MinDeviceDimension > 1600) return "13pt";
|
|
if (SaxApplication.MinDeviceDimension > 1200) return "12pt";
|
|
if (SaxApplication.MinDeviceDimension > 1000) return "11pt";
|
|
return "10pt";
|
|
}
|
|
}
|
|
public static double FontSizeRatio
|
|
{
|
|
get
|
|
{
|
|
if (SaxApplication.MinDeviceDimension > 2000) return 1.75;
|
|
if (SaxApplication.MinDeviceDimension > 1600) return 1.50;
|
|
if (SaxApplication.MinDeviceDimension > 1200) return 1.25;
|
|
return 1.0;
|
|
}
|
|
}
|
|
// Pages.
|
|
public static Color PageCaptionBackgroundColor { get; } = Color.FromHex("#558395");
|
|
public static double PageCaptionPaddingHorizontal { get; } = 4.0;
|
|
public static double PageCaptionPaddingVertical { get; } = 8.0;
|
|
public static Color PageCaptionTextColor { get; } = Color.FromHex("#f8f8f8");
|
|
public static double PageCaptionTextSizeRatio { get; } = 1.25;
|
|
public static Color PageBaseColor { get; } = Color.FromHex("#c8e8f5");
|
|
public static Color PageBackgroundColor { get; } = Color.FromHex("#e9f6fb");
|
|
public static double PageBodyPaddingVerticalMin { get; } = 4.0;
|
|
public static double PageBodyPaddingHorizontalMin { get; } = 4.0;
|
|
public static double PageNavigationBorderTopWidth { get; } = 0.75;
|
|
public static double PageNavigationPaddingVertical { get; } = 4.0;
|
|
public static Color PageNavigationBorderColor { get; } = Color.FromHex("#808080");
|
|
public static Color PageNavigationBackgroundColor { get; } = Color.FromHex("#e9f6fb");
|
|
// Item List.
|
|
public static double ItemListHeaderBorderWidth { get; set; } = 2.0;
|
|
public static float ItemListHeaderBorderRadius = 6.0f;
|
|
public static Color ItemListHeaderBorderColor = ApplicationBarBackgroundColor;
|
|
public static Color ItemListHeaderBackgroundColor = Color.FromHex("#F0F0F0");
|
|
// Forms.
|
|
public static double FormGridRowSpacing { get; } = 4.0;
|
|
public static double FormGridColumnSpacing { get; } = 4.0;
|
|
// Controls.
|
|
public static Color ControlBackgroundColor { get; } = Color.FromHex("#F8F8F8");
|
|
public static Color ControlBorderColor { get; } = Color.FromHex("#E0E0E0");
|
|
public static double ControlBorderWidth { get; } = 0.5;
|
|
public static Thickness LabelMargin { get; } = new Thickness(4.0, 8.0, 0, 0);
|
|
// Tab controls.
|
|
public static Color TabControlHeaderBackgroundColor { get; } = Color.Transparent;
|
|
public static Color TabControlCaptionBackgroundColor { get; } = Color.FromHex("#E0E0E0");
|
|
public static Color TabControlBodyBackgroundColor { get; } = Color.FromHex("#F8F8F8");
|
|
// Associated items panel.
|
|
public static Color AssociatedItemsCaptionBackgroundColor { get; } = Color.FromHex("#becee4");
|
|
public static Color AssociatedItemsCaptionTextColor { get; } = Color.FromHex("#f8f8f8");
|
|
public static double AssociatedItemsCaptionTextSizeRatio { get; } = 1.2;
|
|
public static Color AssociatedItemsBackgroundColor { get; } = Color.FromHex("#dbe4f0");
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|