Skip to content

Instantly share code, notes, and snippets.

View oesolberg's full-sized avatar

Odd Erik Midthaug oesolberg

View GitHub Profile
@oesolberg
oesolberg / ButtonWithDialog.cs
Last active January 18, 2020 15:55
ButtonWithDialog
using System.Text;
// Use with a script at the top of your form
// returnString.AppendLine(
//"<script type='text/javascript'>function userConfirm(itemName) { var answer=confirm('hey - are you sure?? All the devices for the item '+itemName+' will be deleted! ');if(answer){return 'Submit';}else{return 'Cancel';} }</script>");
//
// Usage in code
// var deleteButton = new ButtonWithDialog()
// {
// Name = DeleteButtonKey + HttpUtility.JavaScriptStringEncode(itemId),
@oesolberg
oesolberg / HomeseerDeviceHandling.cs
Created December 6, 2017 09:34
Homeseer device handling
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using HomeSeerAPI;
using RfLinkSeer.Common;
using RfLinkSeer.Common.Interfaces;
using Scheduler;
namespace RfLinkSeer.DeviceHandling