Beispiel #1
0
 /// <summary>
 /// 实例化一个桌面应用对象
 /// </summary>
 public Member(
     String name,
     String iconUrl,
     String appUrl,
     Int32 appId,
     Int32 width,
     Int32 height,
     Int32 userId,
     AppStyle appStyle,
     Boolean isIconByUpload = default,
     Boolean isSetbar       = default,
     Boolean isOpenMax      = default,
     Boolean isFlash        = default,
     Boolean isResize       = default)
 {
     AppId          = appId;
     Width          = width > 800 ? 800 : width;
     Height         = height > 600 ? 600 : height;
     IsOpenMax      = isOpenMax;
     IsSetbar       = isSetbar;
     IsFlash        = isFlash;
     IsResize       = isResize;
     Name           = name;
     IconUrl        = iconUrl;
     AppUrl         = appUrl;
     MemberType     = appId == 0 ? MemberType.Folder : (appStyle == AppStyle.Widget ? MemberType.Widget : MemberType.App);
     DeskIndex      = 1;
     IsIconByUpload = isIconByUpload;
     UserId         = userId;
 }
Beispiel #2
0
 /// <summary>
 /// Determines if the file specified represents a valid Theme.
 /// <param name="path">The full path to a theme file</param>
 /// <returns>True if the theme file is valid and everything specified
 /// in the file is valid.</returns>
 /// </summary>	
 public static bool IsValid(string path)
 {
     try {
         AppStyle appStyle = new AppStyle(path);
     } catch {
         return false;
     }
     return true;
 }
Beispiel #3
0
 /// <summary>
 /// Determines if the file specified represents a valid Theme.
 /// <param name="path">The full path to a theme file</param>
 /// <returns>True if the theme file is valid and everything specified
 /// in the file is valid.</returns>
 /// </summary>
 public static bool IsValid(string path)
 {
     try {
         AppStyle appStyle = new AppStyle(path);
     } catch {
         return(false);
     }
     return(true);
 }
 private void Initialize()
 {
     _label = new UILabel(new RectangleF(0, 0, Frame.Width, 44));
     _label.BackgroundColor = UIColor.Clear;
     _label.TextAlignment   = UITextAlignment.Center;
     _label.TextColor       = AppStyle.NavigationTitleColor;
     _label.Font            = AppStyle.GetButtonFont(20);
     AddSubview(_label);
 }
Beispiel #5
0
 private void ChangeStyleButton_Click(object sender, RoutedEventArgs e)
 {
     if (this.CurrentStyle == AppStyle.Dark)
     {
         this.CurrentStyle = AppStyle.Light;
         this.SetToLight();
     }
     else
     {
         this.CurrentStyle = AppStyle.Dark;
         this.SetToDark();
     }
 }
Beispiel #6
0
        public MainWindow()
        {
            InitializeComponent();
            this.Title = "Laptime Tool";

            this.LapTime = new LapTime(0, 0, 0, 0);

            this.EnterButton.Content     = "Show Average Laptime";
            this.AverageLapLabel.Content = "Average Laptime";
            this.EnterLabel1.Content     = "Enter Racetime";

            this.CurrentStyle = AppStyle.Dark;
            this.SetToDark();
        }
Beispiel #7
0
        /// <summary>
        /// 实例化一个app对象
        /// </summary>
        public App(String name,
                   String iconUrl,
                   String appUrl,
                   Int32 width,
                   Int32 height,
                   Int32 appTypeId,
                   Boolean isResize,
                   Boolean isOpenMax,
                   Boolean isFlash,
                   Boolean isSetbar,
                   AppAuditState appAuditState,
                   AppReleaseState appReleaseState,
                   AppStyle appStyle      = AppStyle.App,
                   Int32 userId           = default(Int32),
                   String remark          = default(String),
                   Boolean isIconByUpload = default(Boolean))
        {
            Name      = name;
            IconUrl   = iconUrl;
            AppUrl    = appUrl;
            Width     = width > 800 ? 800 : width;
            Height    = height > 600 ? 600 : height;
            AppTypeId = appTypeId;
            AppStyle  = appStyle;
            if (userId == 0)
            {
                IsSystem = true;
            }
            else
            {
                IsSystem = false;
                UserId   = userId;
            }

            Remark          = remark;
            AppAuditState   = appAuditState;
            AppReleaseState = appReleaseState;
            UseCount        = 0;
            IsRecommand     = false;
            IsIconByUpload  = isIconByUpload;
        }
Beispiel #8
0
 /// <summary>
 /// 修改app样式
 /// </summary>
 /// <param name="appStyle"></param>
 /// <returns></returns>
 public App ModifyAppStyle(AppStyle appStyle)
 {
     AppStyle = appStyle;
     return this;
 }
Beispiel #9
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name">app名称</param>
        /// <param name="iconUrl">app图标路径</param>
        /// <param name="appUrl">app地址</param>
        /// <param name="width">宽</param>
        /// <param name="height">高</param>
        /// <param name="appTypeId"></param>
        /// <param name="appAuditState"></param>
        /// <param name="appStyle"></param>
        /// <param name="accountId"></param>
        /// <param name="remark">备注</param>
        /// <param name="isMax">是否最大化</param>
        /// <param name="isFull">是否全屏</param>
        /// <param name="isSetbar">是否显示app底部的按钮</param>
        /// <param name="isOpenMax">是否打开默认最大化</param>
        /// <param name="isFlash">是否为flash</param>
        /// <param name="isDraw">是否可以任意修改app窗体的大小</param>
        /// <param name="isResize"></param>
        public App(String name,
            String iconUrl,
            String appUrl,
            Int32 width,
            Int32 height,
            Int32 appTypeId,
            AppAuditState appAuditState,
            AppStyle appStyle = AppStyle.App,
            Int32 accountId = default(Int32),
            String remark = default(String),
            Boolean isMax = default(Boolean),
            Boolean isFull = default(Boolean),
            Boolean isSetbar = default(Boolean),
            Boolean isOpenMax = default(Boolean),
            Boolean isFlash = default(Boolean),
            Boolean isDraw = default(Boolean),
            Boolean isResize = default(Boolean))
        {
            Name = name;
            IconUrl = iconUrl;
            AppUrl = appUrl;
            Width = width > 800 ? 800 : width;
            Height = height > 600 ? 600 : height;
            IsMax = isMax;
            IsFull = isFull;
            IsSetbar = isSetbar;
            IsOpenMax = isOpenMax;
            IsFlash = isFlash;
            IsDraw = isDraw;
            IsResize = isResize;
            AppTypeId = appTypeId;
            AppStyle = appStyle;
            if (accountId == 0)
            {
                IsSystem = true;
            }
            else
            {
                IsSystem = false;
                AccountId = accountId;
            }

            IsLock = false;
            Remark = remark;
            AppAuditState = appAuditState;
            AppReleaseState = AppReleaseState.UnRelease;
            UseCount = 0;
            AppStars = new List<AppStar>();
        }