public MainWindow() { InitializeComponent(); keyboardHook = new GlobalKeyboardHook(); keyboardHook.Install(); keyboardHook.HotKeyDown += HotKeyDown; notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon.Text = "Click to open view note window"; notifyIcon.Icon = Properties.Resources.noteIcon; notifyIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(NotifyIcon_MouseClick); System.Windows.Forms.ContextMenu notifyIconMenu = new System.Windows.Forms.ContextMenu(); notifyIconMenu.MenuItems.Add("New note" + " (" + keyboardHook.HotKey1.ToString() + "+" + keyboardHook.HotKey2.ToString() + ")", new EventHandler(NewNote_MenuItem)); notifyIconMenu.MenuItems.Add("-"); notifyIconMenu.MenuItems.Add("View notes", new EventHandler(ViewNotes_MenuItem)); notifyIconMenu.MenuItems.Add("View statistics", new EventHandler(ViewStat_MenuItem)); notifyIconMenu.MenuItems.Add("-"); notifyIconMenu.MenuItems.Add("Exit", new EventHandler(TrayExit_MenuItem)); notifyIcon.ContextMenu = notifyIconMenu; // Initial Database databaseManager = new DatabaseManager("NoteTagDatabase.db"); databaseManager.LoadData(); dataTags = new ObservableCollection <QuickNote.Tag>(databaseManager.GetListTag()); dataNotes = new ObservableCollection <Note>(databaseManager.GetListNote()); listTag.DataContext = new TagsViewModel(dataTags); listTag.Items.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); listNote.DataContext = new NotesViewModel(dataNotes); }
private void btnERPItem_Click(object sender, EventArgs e) { SetNotes("Started ERP Item"); DatabaseManager dbManager = new DatabaseManager(); lERPItem = dbManager.LoadData(); tbCountERPItem.Text = lERPItem.Count.ToString(); SetNotes("ERP Item END"); }
public void LoadButtonPressed() { DatabaseManager.LoadData(previousSaves.options[previousSaves.value].text); LeaveCanvas(); SceneManager.LoadScene(SceneManagement.GameScenes.BASEVIEW); }
public PictureView() { InitializeComponent(); InitSettings(); Util myFunctions = new Util(); string[] args = Environment.GetCommandLineArgs(); if (args.Length > 1 && args[1].ToString().ToLower() == "sportvisionbih") { //Step01:btnScanFTP_Click lSource = Util.scanFTP(tbFTPIP1.Text, tbFTPUser1.Text, tbFTPPassword1.Text); //lSource = Util.scanFTP(lFTPIP, lFTPUser, lFTPPassword); //Step02:btnScanDestination_Click lDestination = Util.scanDestination(tbDestination.Text, "jpg"); //Step03:btnDifference_Click lDiff = Util.DifferenceSourceDestination(lSource, lDestination); //Step04:btnERPItem_Click DatabaseManager dbManager = new DatabaseManager(); lERPItem = dbManager.LoadData(); //Step05:btnDifferenceERP_Click lFTP = Util.DifferenceERPDifference(lERPItem, lDiff); //Step06:btnDownloadFTP_Click int i = Util.DownloadFromFTP(lSource, lFTP, tbFTPUser1.Text, tbFTPPassword1.Text, tbDestinationFTP.Text); //Step07:btnResizePicture_Click int j = Util.ResizePicture(tbDestinationFTP.Text, "jpg", tbResizePicture.Text, Convert.ToInt32(tbResWidth.Text), Convert.ToInt32(tbResHeight.Text)); int k = Util.CopyResizedPicture(tbResizePicture.Text, tbDestination.Text, "jpg"); //myToAL.Add(tbTo.Text); //myFunctions.SendMail(tbFrom.Text, tbFromName.Text, myToAL, tbSubject.Text + " SportVision", tbBody.Text + " " + k.ToString()); myFunctions.SendMail(tbFrom.Text, tbFromName.Text, tbTo.Text, tbSubject.Text + " SportVision", tbBody.Text + " " + k.ToString()); Environment.Exit(0); } if (args.Length > 1 && args[1].ToString().ToLower() == "buzz") { //Step01:btnScanFTP_Click lSource = Util.scanFTP(tbFTPIP.Text, tbFTPUser.Text, tbFTPPassword.Text); //lSource = Util.scanFTP(lFTPIP, lFTPUser, lFTPPassword); //Step02:btnScanDestination_Click lDestination = Util.scanDestination(tbDestination.Text, "jpg"); //Step03:btnDifference_Click lDiff = Util.DifferenceSourceDestination(lSource, lDestination); //Step04:btnERPItem_Click DatabaseManager dbManager = new DatabaseManager(); lERPItem = dbManager.LoadData(); //Step05:btnDifferenceERP_Click lFTP = Util.DifferenceERPDifference(lERPItem, lDiff); //Step06:btnDownloadFTP_Click int i = Util.DownloadFromFTP(lSource, lFTP, tbFTPUser.Text, tbFTPPassword.Text, tbDestinationFTP.Text); //Step07:btnResizePicture_Click int j = Util.ResizePicture(tbDestinationFTP.Text, "jpg", tbResizePicture.Text, Convert.ToInt32(tbResWidth.Text), Convert.ToInt32(tbResHeight.Text)); int k = Util.CopyResizedPicture(tbResizePicture.Text, tbDestination.Text, "jpg"); myToAL.Add(tbTo.Text); //myFunctions.SendMail(tbFrom.Text, tbFromName.Text, myToAL, tbSubject.Text + " BUZZ", tbBody.Text + " " + k.ToString()); myFunctions.SendMail(tbFrom.Text, tbFromName.Text, tbTo.Text, tbSubject.Text + " BUZZ", tbBody.Text + " " + k.ToString()); Environment.Exit(0); } }