|
No, what Richard suggested was: "talk to the supplier"
I.e. the supplier of the WSDL, not a random website that probably isn't at all familiar with that particular service...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
And a trivial Google (using part of your last sentence as the search string) would have told you anyway: importing the WSDL into the C - Google Search[^]
The top link is even expanded for you!
Quote: Start Visual Studio.
On the File menu, select New > Project. ...
In the New Project dialog box, enter the desired settings, then click OK.
In the Solution Explorer pane, right-click on References. ...
In the Add Web Reference dialog box, enter the URL to the web service's WSDL document.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Statistical program. Not a keyllogger. For me, to know how much of my life I waste by tapping without meaning into the keyboard;}}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace StatisticChar
{
public partial class Form1 : Form
{
private GlobalKeyboardHook _globalKeyboardHook;
public void SetupKeyboardHooks()
{
_globalKeyboardHook = new GlobalKeyboardHook();
_globalKeyboardHook.KeyboardPressed += OnKeyPressed;
}
private void OnKeyPressed(object sender, GlobalKeyboardHookEventArgs e)
{
if (e.KeyboardState == GlobalKeyboardHook.KeyboardState.KeyDown)
{
var znak = $"{(char)e.KeyboardData.VirtualCode} {e.KeyboardData.VirtualCode}";
if ((e.KeyboardData.VirtualCode >= 112) && (e.KeyboardData.VirtualCode <= 123))
{
znak = "F" + (e.KeyboardData.VirtualCode - 111).ToString();
}
if ((e.KeyboardData.VirtualCode >= 96) && (e.KeyboardData.VirtualCode <= 105))
{
znak = (e.KeyboardData.VirtualCode - 96).ToString();
}
if (e.KeyboardData.VirtualCode == 144)
{
znak = "NumLock";
}
if (e.KeyboardData.VirtualCode == 111)
{
znak = "/";
}
if (e.KeyboardData.VirtualCode == 106)
{
znak = "*";
}
if (e.KeyboardData.VirtualCode == 109)
{
znak = "-";
}
if (e.KeyboardData.VirtualCode == 107)
{
znak = "+";
}
if (e.KeyboardData.VirtualCode == 107)
{
znak = ",";
}
if (e.KeyboardData.VirtualCode == 13)
{
znak = "ENTER";
}
if (e.KeyboardData.VirtualCode == 192)
{
znak = "`";
}
if (e.KeyboardData.VirtualCode == 9)
{
znak = "tabulator";
}
if (e.KeyboardData.VirtualCode == 20)
{
znak = "capslock";
}
if (e.KeyboardData.VirtualCode == 160)
{
znak = "LewyShift";
}
if (e.KeyboardData.VirtualCode == 162)
{
znak = "ctrl";
}
if (e.KeyboardData.VirtualCode == 91)
{
znak = "win";
}
if (e.KeyboardData.VirtualCode == 32)
{
znak = "spacja";
}
if (e.KeyboardData.VirtualCode == 37)
{
znak = "←";
}
if (e.KeyboardData.VirtualCode == 39)
{
znak = "→";
}
if (e.KeyboardData.VirtualCode == 38)
{
znak = "↑";
}
if (e.KeyboardData.VirtualCode == 40)
{
znak = "↓";
}
if (e.KeyboardData.VirtualCode == 8)
{
znak = "backup";
}
if (e.KeyboardData.VirtualCode == 161)
{
znak = "prawyShift";
}
if (e.KeyboardData.VirtualCode == 93)
{
znak = "ppm";
}
if (e.KeyboardData.VirtualCode == 45)
{
znak = "insert";
}
if (e.KeyboardData.VirtualCode == 44)
{
znak = "printscreen";
}
if (e.KeyboardData.VirtualCode == 19)
{
znak = "pause";
}
if (e.KeyboardData.VirtualCode == 166)
{
znak = "back";
}
if (e.KeyboardData.VirtualCode == 36)
{
znak = "home";
}
if (e.KeyboardData.VirtualCode == 35)
{
znak = "end";
}
if (e.KeyboardData.VirtualCode == 46)
{
znak = "delete";
}
if (e.KeyboardData.VirtualCode == 33)
{
znak = "pageUp";
}
if (e.KeyboardData.VirtualCode == 34)
{
znak = "pagDown";
}
if (e.KeyboardData.VirtualCode == 163)
{
znak = "PrawyCtrl";
}
if (e.KeyboardData.VirtualCode == 1)
{
znak = "LeftClick";
}
if (e.KeyboardData.VirtualCode == 2)
{
znak = "RightClick";
}
Statystyki[znak] = Statystyki.ContainsKey(znak) ? ++Statystyki[znak] : 1;
}
}
public new void Dispose()
{
base.Dispose();
_globalKeyboardHook?.Dispose();
}
private DateTime data_zbierania_statystyk;
private static readonly Dictionary<string, int> Statystyki = new Dictionary<string, int>();
public Form1()
{
_globalKeyboardHook = new GlobalKeyboardHook();
SetupKeyboardHooks();
var dt = DateTime.Now;
data_zbierania_statystyk = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0);
Timer timer = new Timer
{
Interval = 1 * 10 * 1000
};
timer.Tick += new EventHandler(Timer_Tick);
timer.Start();
Timer timer2 = new Timer
{
Interval = 1000
};
timer2.Tick += new EventHandler(Timer2_Tick);
timer2.Start();
InitializeComponent();
}
private void Timer2_Tick(object sender, EventArgs e)
{
richTextBox1.Text = StatystykiJakoText();
}
void Timer_Tick(object sender, EventArgs e)
{
Saves();
}
void Saves()
{
var dt = DateTime.Now;
var now = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0);
if (data_zbierania_statystyk < now)
{
data_zbierania_statystyk = now;
string sb = StatystykiJakoText();
string path = $@"O:\statystyki{dt.Year}-{dt.Month}-{dt.Day}.txt";
File.AppendAllText(path, sb);
richTextBox1.Text = "";
richTextBox1.Text = sb.ToString();
}
}
private string StatystykiJakoText()
{
var sb = new StringBuilder();
sb.Append(Environment.NewLine);
sb.Append($"Statystyki za dzień: {data_zbierania_statystyk}{Environment.NewLine}");
foreach (var literka in Statystyki)
{
sb.Append($"{literka.Key} - {literka.Value}{Environment.NewLine}");
}
return sb.ToString();
}
}
}
However, there is still a problem:
1. I do not catch every character, eg right alt, F Mode
2. Does not catch characters written in some programs, eg Notepad ++?
Is anyone able to say why this is happening and how to fix it?
3. How to handle shortcuts eg ctrl + c, ctrl + v?
4. How to protect against pressing the key, if we keep it and do not let it go?
modified 30-Dec-18 11:16am.
|
|
|
|
|
Quote: Statistical program. Not a keyllogger.
Quote:
namespace Keylogger
Um. I suspect it might be ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
it's just the name of the project in English.
in my own I had written: Program Statystyczny
|
|
|
|
|
Your namespace doesn't agree with you...
|
|
|
|
|
I have already corrected that there were no connections.
And the data is for me, for my needs;)
For proof I can show collections of other statistics such as mouse movement and data transmission over the network from the program: "KalendarzXP" or OmCounter (until computer work) - this is unfortunately programs of Polish programmers
|
|
|
|
|
You're not "counting"; you're "logging".
What do you take us for?
Stick to Mavis Beacon for your "stats".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
|
|
AFAIK, it's not possible - just ignoring that it would make a for difficult user experience to use it, there is no mechanism I can think of that allows you to rotate a DGV 90 degrees and still use it as a DGV. It's possible to rotate PrintDocument output by 90 degrees, but not display controls.
Why would you want to? Do your users habitually rotate their monitors to look at them?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I meant that I would have a lot of (256) columns and it is not convenient to view them in the current version of DGV. More conveniently the opposite ...
|
|
|
|
|
|
Hi guys.
I'm doing a program to update applications that we only use in my home. And what I want to do is through the network to find if there is an "X" file on the different PCs, and if there is a return of your route, otherwise it will not return anything.
Could someone help me?
regards
|
|
|
|
|
What do you mean by a return of your route ?
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
He means the fully qualified path to the file.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
So, what have you done/tried. Tell us about your code, show us some code, describe what works or what breaks. What is your "network" like ?
We can't read your mind !
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
First, you need to be able to identify all of the machineson your network, or provide a way for the user to specify what remote drive(s) to search.
Second, you should use UNC paths instead of shares because shares can be deleted (or Windows could simply lose them), while UNC paths always exist as long s the machine is turned on and connected to the network.
After those two things, the act of finding a file on a remote drive is beyond trivial.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
I'm still learning C# and I have a long way to go. I wanted to dive into MonoGame because tinkering with game design has been a hobby of mine since I started learning QBasic at the age of 14. I don't want to use their Content Pipeline to load content, because I'd like to figure out how to load custom resources as needed. Someone on Stack Overflow commented HERE that they use FileStreams to load textures directly. I set about trying to figure out how to do that, and I've gotten this far:
FileStream fs = new FileStream("stars.jpg", FileMode.Open);
byte[] readString = new byte[fs.Length];
fs.Read(readString, 0, (int)fs.Length);
I have no idea if that code even works, because I haven't gotten to a point where running it would yield any visible results. It seems sound, so once I get the file data in the readString array, I need a way to use it as texture data. I tried casting:
object o = (object)readString;
background = (Texture2D)o;
I already know that isn't going to work. I don't even need to run it to figure that one out. I read a little in the MonoGame Reference and thought about using Texture2D.SetData as shown HERE, but I'm not sure how to proceed or even if I'm headed in the right direction. The syntax they provide doesn't really clarify anything.
public void SetData<T>(
T[] data
) where T : ValueType, new()
There's an array here, but I'm not sure what it's asking for. Can I provide SetData with the byte array?
background.SetData(readString);
Your help would be most appreciated, and it would go a long way towards helping me advance in my learning.
Thanks.
-Turtle
modified 27-Dec-18 0:00am.
|
|
|
|
|
|
Hey Kindly do me a favor and tell me
|
|
|
|
|
Syed_Owais wrote: Hey Kindly do me a favor and tell me
Tell you what?
We have no idea what you need to know - or even what you already do know.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with. So we have no idea what is "in" your file, how it is stored, what kind of file it is in - and there are a massive number of possibilities - or even if you know how to read anything from a file! Calling it "a text file" tells us very little: there are large number of ways that text can be used to store into, and an equally large number of different types of information you coudl store in it!
So sit down, think about what you are trying to do, look at your data file, and try to clarify in your own mind exactly what help you need, then try to explain that.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
This is weird. I replied to the OP, not you. Hmmm
|
|
|
|
|
It looks fine - but I got an email for it, so ...
Hamsters at the Eggnog, I suspect.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|