コード例 #1
0
 private string GetStringId(TyleType type)
 {
     switch (type)
     {
         case TyleType.Income:
             return Constants.ADD_INCOME_TILE_ID;
         case TyleType.Expense:
             return Constants.ADD_EXPENSE_TILE_ID;
         case TyleType.Transfer:
             return Constants.ADD_TRANSFER_TILE_ID;
         default:
             return string.Empty;
     }
 }
コード例 #2
0
ファイル: TileManager.cs プロジェクト: sahelttu/MoneyFox
        public async void CreateTile(TyleType type)
        {
            var informations = GetTileInformation(type);

            var secondaryTile = new SecondaryTile(
                informations.Item1,
                informations.Item2,
                informations.Item1,
                informations.Item3,
                TileSize.Default);

            secondaryTile.VisualElements.ShowNameOnSquare150x150Logo = true;
            await secondaryTile.RequestCreateAsync();
        }
コード例 #3
0
 private Tuple<string, string, Uri> GetTileInformation(TyleType type)
 {
     switch (type)
     {
         case TyleType.Income:
             return new Tuple<string, string, Uri>(Constants.ADD_INCOME_TILE_ID, Strings.AddIncomeLabel, new Uri("ms-appx:///Assets/IncomeTileIcon.png", UriKind.Absolute));
         case TyleType.Expense:
             return new Tuple<string, string, Uri>(Constants.ADD_EXPENSE_TILE_ID, Strings.AddExpenseLabel, new Uri("ms-appx:///Assets/SpendingTileIcon.png", UriKind.Absolute));
         case TyleType.Transfer:
             return new Tuple<string, string, Uri>(Constants.ADD_TRANSFER_TILE_ID, Strings.AddTransferLabel, new Uri("ms-appx:///Assets/TransferTileIcon.png", UriKind.Absolute));
         default:
             return null;
     }
 }
コード例 #4
0
        public async void CreateTile(TyleType type)
        {
            var informations = GetTileInformation(type);

            var secondaryTile = new SecondaryTile(
                            informations.Item1,
                            informations.Item2,
                            informations.Item1,
                            informations.Item3,
                            TileSize.Default);

            secondaryTile.VisualElements.ShowNameOnSquare150x150Logo = true;
            await secondaryTile.RequestCreateAsync();
        }
コード例 #5
0
ファイル: TileManager.cs プロジェクト: sahelttu/MoneyFox
        private Tuple <string, string, Uri> GetTileInformation(TyleType type)
        {
            switch (type)
            {
            case TyleType.Income:
                return(new Tuple <string, string, Uri>(Constants.ADD_INCOME_TILE_ID, Strings.AddIncomeLabel, new Uri("ms-appx:///Assets/IncomeTileIcon.png", UriKind.Absolute)));

            case TyleType.Expense:
                return(new Tuple <string, string, Uri>(Constants.ADD_EXPENSE_TILE_ID, Strings.AddExpenseLabel, new Uri("ms-appx:///Assets/SpendingTileIcon.png", UriKind.Absolute)));

            case TyleType.Transfer:
                return(new Tuple <string, string, Uri>(Constants.ADD_TRANSFER_TILE_ID, Strings.AddTransferLabel, new Uri("ms-appx:///Assets/TransferTileIcon.png", UriKind.Absolute)));

            default:
                return(null);
            }
        }
コード例 #6
0
ファイル: TileManager.cs プロジェクト: sahelttu/MoneyFox
        private string GetStringId(TyleType type)
        {
            switch (type)
            {
            case TyleType.Income:
                return(Constants.ADD_INCOME_TILE_ID);

            case TyleType.Expense:
                return(Constants.ADD_EXPENSE_TILE_ID);

            case TyleType.Transfer:
                return(Constants.ADD_TRANSFER_TILE_ID);

            default:
                return(string.Empty);
            }
        }
コード例 #7
0
ファイル: TileManager.cs プロジェクト: sahelttu/MoneyFox
 public async void RemoveTile(TyleType type)
 {
     await new SecondaryTile(GetStringId(type)).RequestDeleteAsync();
 }
コード例 #8
0
ファイル: TileManager.cs プロジェクト: sahelttu/MoneyFox
 public bool Exists(TyleType type)
 {
     return(SecondaryTile.Exists(GetStringId(type)));
 }
コード例 #9
0
 public bool Exists(TyleType type)
 {
     throw new PlatformNotSupportedException();
 }
コード例 #10
0
 public void RemoveTile(TyleType type)
 {
     throw new PlatformNotSupportedException();
 }
コード例 #11
0
 public async void RemoveTile(TyleType type)
 {
     await new SecondaryTile(GetStringId(type)).RequestDeleteAsync();
 }
コード例 #12
0
 public bool Exists(TyleType type)
 {
     return SecondaryTile.Exists(GetStringId(type));
 }
コード例 #13
0
 public bool Exists(TyleType type)
 {
     throw new PlatformNotSupportedException();
 }
コード例 #14
0
 public void RemoveTile(TyleType type)
 {
     throw new PlatformNotSupportedException();
 }