This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({}); | |
var tableView = Ti.UI.createTableView({}); | |
for(var i = 0; i < 5; i++) { | |
var checkBox = Ti.UI.createView({ | |
width : 20, | |
height : 20, | |
done : false, | |
item_type : "CHECKBOX", // us this to know we clicked a checkbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({}); | |
var tableView = Ti.UI.createTableView({}); | |
for(var i = 0; i < 5; i++) { | |
var checkBox = Ti.UI.createView({ | |
width : 20, | |
height : 20, | |
done : false, | |
item_type : "CHECKBOX", // us this to know we clicked a checkbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* helper to find an element, can be used when there are | |
* multiple elements in a row and you need to find one | |
* | |
* @param _o {Object} parent object to find elements in | |
* @param _i {String} id of the element you are looking for | |
*/ | |
function findElement(_o, _i) { | |
for(var x in _o.children) { | |
if(_o.children[x].id === _i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* simple method to get the list of items selected | |
*/ | |
function checkedRowsAre() { | |
// get the rows; there is a default section in all tables so that | |
// is why we need to get the rows this way | |
var selected = []; | |
var rows = tableView.data[0].rows; | |
// iterate through the rows to find out which ones are selected, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Titanium.UI.createWindow({ | |
title:'Tab 1', | |
backgroundColor:'#fff' | |
}); | |
var aTableView = Ti.UI.createTableView(); | |
var data = [ | |
Ti.UI.createTableViewRow({title:'Row 1', hasChild:true, color:'red', header:'First'}), | |
Ti.UI.createTableViewRow({title:'Row 2', hasDetail:true, color:'green'}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DialogWindow = function(message, type){ | |
// Default params | |
var message = message || "How about you add some message to this? :)"; | |
var type = type || "error"; | |
var window = Titanium.UI.createWindow({ | |
width: 320, | |
height: 44, | |
top: 44, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.AUTHOR : MICHELE-TN | |
.CLIENT DEPLOYMENT : https://rustdesk.com/docs/en/self-host/client-configuration/ | |
: https://rustdesk.com/docs/en/self-host/client-deployment/ | |
.SERVER DEPLOYMENT : https://rustdesk.com/docs/en/self-host/ | |
.Techahold/rustdeskinstall : Easy install Script for Rustdesk | |
: https://github.com/techahold/rustdeskinstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run as administrator and stays in the current directory | |
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { | |
Start-Process PowerShell -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`""; | |
} | |
} | |
[Net.ServicePointManager]::SecurityProtocol = "Tls, Tls11, Tls12, Ssl3" | |
# Convert from Base64 to String |