This file contains hidden or 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
public partial class ASR : ServiceBase | |
{ | |
static string watcherpath = System.Configuration.ConfigurationManager.AppSettings["watcherpath"]; | |
static string dbpath = System.Configuration.ConfigurationManager.AppSettings["dbpath"]; | |
static string sqlserver = System.Configuration.ConfigurationManager.AppSettings["sqlserver"]; | |
static string log = System.Configuration.ConfigurationManager.AppSettings["log"]; |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<appSettings> | |
<add key="dbpath" value="c:\temp\databases\"/> | |
<add key="sqlserver" value="."/> | |
<add key="watcherpath" value="c:\temp\testing\"/> | |
<add key ="log" value="c:\temp\log\log.txt"/> | |
</appSettings> | |
</configuration> |
This file contains hidden or 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
private static void restoredb(object source, RenamedEventArgs e) | |
{ | |
Server svr = new Server(sqlserver); | |
Restore res = new Restore(); | |
// only temporary until passing in site number as argument | |
string dbname = DateTime.Now.Millisecond.ToString(); | |
res.Database = dbname; | |
res.Action = RestoreActionType.Database; |
This file contains hidden or 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
protected override void OnStart(string[] args) | |
{ | |
eventLog1.WriteEntry("ASR Service Started"); | |
try | |
{ | |
watcher.Path = watcherpath; | |
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; | |
watcher.Filter = "*.bak"; | |
watcher.Filter = "*.tmp"; | |
watcher.Renamed += new RenamedEventHandler(restoredb); |
This file contains hidden or 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
public partial class ASR : ServiceBase | |
{ | |
static FileSystemWatcher watcher = new FileSystemWatcher(); |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; |
This file contains hidden or 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
<Window x:Class="BillCalc2.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="395" Width="350"> | |
<Grid> | |
<TextBox x:Name="balanceBox" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Height="23" Margin="34,35,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/> | |
<TextBox x:Name="rentBox" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Height="23" Margin="34,79,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/> | |
<TextBox x:Name="lightBox" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Height="23" Margin="34,105,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/> | |
<TextBox x:Name="cableBox" HorizontalAlignment="Left" HorizontalContentAlignment="Right" Height="23" Margin="34,131,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/> | |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains hidden or 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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Firefox; | |
namespace TestingSeleniumGmail | |
{ | |
[TestClass] | |
public class FillFormIntegrationTest | |
{ |
This file contains hidden or 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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Firefox; | |
namespace Web.UI.Tests | |
{ | |
[TestClass] | |
public class FillFormIntegrationTest | |
{ |