Skip to content

Instantly share code, notes, and snippets.

View Sampath-Lokuge's full-sized avatar
🏠
Working from home

Sampath Lokuge Sampath-Lokuge

🏠
Working from home
View GitHub Profile
//take Photo
takePhoto(sourceType: number) {
const options: CameraOptions = {
quality: 50,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
correctOrientation: true,
sourceType: sourceType,
}
@Sampath-Lokuge
Sampath-Lokuge / HammerJs
Last active June 16, 2018 09:08
HammerJs
import { Directive, ElementRef, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from '@angular/core';
interface HammerManager {
new (element: HTMLElement | SVGElement, options?: any): HammerManager;
destroy(): void;
add(recognizer: Recognizer): void;
on(eventName: string, callback: Function): void;
}
interface Recognizer {
@Sampath-Lokuge
Sampath-Lokuge / gallery.component.css
Last active June 19, 2018 11:17
gallery.component.css
@Sampath-Lokuge
Sampath-Lokuge / gallery.component.html
Created June 19, 2018 10:44
gallery.component.html
@Sampath-Lokuge
Sampath-Lokuge / gallery.component.ts
Created June 19, 2018 10:47
gallery.component.ts
@Sampath-Lokuge
Sampath-Lokuge / commentForm.js
Created June 19, 2018 11:05
commentForm.js
(function () {
appModule.controller("tenant.views.propertymanagement.tabs.commentForm", [
"$scope", "$uibModal", "$window", "abp.services.app.propertyStatusContact", "abp.services.app.status",
"abp.services.app.comment", function ($scope, $uibModal, $window, propertyStatusContactService, statusService, commentService) {
var vm = this;
vm.saving = false;
vm.property = {
id: null
};
@Sampath-Lokuge
Sampath-Lokuge / commentForm.cshtml
Created June 19, 2018 11:07
commentForm.cshtml
@using IP.Comments
@*Comment Form*@
<div ng-controller="tenant.views.propertymanagement.tabs.commentForm as commentFormCtrl">
<div style="overflow: auto;">
<div class="comment-form-wrapper">
<table class="table table-bordered table-hover table-condensed fixed-size">
<tr style="font-weight: bold">
<td style="width: 12.5%">@L("CsDate")</td>
@Sampath-Lokuge
Sampath-Lokuge / IAgentAppService.cs
Created June 19, 2018 11:39
IAgentAppService.cs
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using IP.Agents.Dtos;
namespace IP.Agents
{
public interface IAgentAppService : IApplicationService
{
Task<ListResultDto<AgentListDto>> GetAllAgentsAsync();
@Sampath-Lokuge
Sampath-Lokuge / AgentAppService.cs
Created June 19, 2018 11:40
AgentAppService.cs
using System.Collections.Generic;
using System.Data.Entity;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using Abp.AutoMapper;
using Abp.Domain.Repositories;
using Abp.Domain.Uow;
@Sampath-Lokuge
Sampath-Lokuge / PlayList.ts
Last active June 19, 2018 12:39
PlayList.ts
import { MediaItem } from "./media-item";
export interface PlayList {
id: number;
text: string;
imageUrl: string;
mediaItems: MediaItem[];
}