|
smoke and a few pops? Suggest Office Space - Printer Scene (UNCENSORED) - YouTube[^]
Now that scene was in California, so we could go to other extremes....
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
What a waste of good deodorant!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Bet you could use some (being the hard worker that you are )
|
|
|
|
|
I say we take off and nuke the entire site from orbit. It's the only way to be sure.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You'll need it.
cheers
Chris Maunder
|
|
|
|
|
Been there, done that, found a different job.
|
|
|
|
|
Sounds like there is a big goodies bag at the end if you fix this!
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
If only. I quoted my (very cheap) hourly rate and the customer was obviously taken aback... "But I've been so used to paying £40/hour for years..." I used to charge clients £40/hour... in 1996.
Peanuts and monkeys come to mind
Trouble is I like a challenge, am semi-retired so this is really like a paid hobby, and his offices are fabulous (an old English stately home, complete with wood panelling and huge portraits on the wall) so site visits are interesting! He has now agreed a rewrite is in order (once the initial fire fighting is over) so there's a good few months' work in it.
|
|
|
|
|
As long as it doesn't happen to you... Dilbert Comic Strip on 2013-02-24 | Dilbert by Scott Adams[^]
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I envy you not.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
Poking around, MS doesn't want you to use GetSaveFileName anymore. Instead, they want you to use the 'Common Item Dialog'. So click on that page, and find a function with 11 indentation levels! Copy and paste it, to find that it is part of a sample code, and relies on other functions in that sample. Try to download the sample, and the page isn't found. But you can download an SDK which supposedly contains the sample? Try to run it, though, and you will get a 'Some components cannot be installed' error, and no indication that the samples are included in it. Oh MS, you funny!
All this because I was trying to figure out a way to allow the user to save program configuration files in the user app work directory, and regular files wherever they wish, but MS, in their infinite non-wisdom, won't allow the directory to be changed using GetSaveFileName , because they believe you will only ever be dealing with one type of file for your application.
(Of course, they have the same issue in MS Word, and other Office programs, because they store config files like macros in a special subdirectory until the user changes where they store them. Afterwards, the dialog will default to that special directory until after you change it once. At least that was the case the last time I played with macros in Word.) Double-
|
|
|
|
|
This is why I use .NET
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
In .NET, can you create a program where the save file dialog will default to the user's AppData folder for files like .ini files, and then back to the user's regular folders for their regular files? (I doubt you can, because I think this is a limitation of MS believing they know better than us how programs should work, and overriding their dialogs to disable such use.) If I'm wrong, I'm not going to rewrite, but would be interested to know.
|
|
|
|
|
|
Interesting. Thanks for the knowledge!
|
|
|
|
|
That's correct, you can not save app.config settings in the application directory with C#.
I have a simple fix which allows this using file based search and replace, if you want I can send you some code, just let me know
|
|
|
|
|
Please do, and I'll see if I can pound it into C++.
|
|
|
|
|
I will post it tomorrow, as I don't have the source code at home
|
|
|
|
|
Cool!
|
|
|
|
|
Here's my code, as you can see it's quite simple:
this.SaveSettings(Application.ExecutablePath + ".config");
private void SaveSettings(string fileName)
{
string oldHostname = Properties.Settings.Default.HostnameUrl;
string oldSipClients = Properties.Settings.Default.SipClients;
string oldVersion = Properties.Settings.Default.LastExeVersion;
if (this.textBoxHostname.Text != oldHostname)
{
this.ConfigFileUpdate(fileName, "HostnameUrl", oldHostname, this.textBoxHostname.Text);
}
if (this.textBoxSipClients.Text != oldSipClients)
{
this.ConfigFileUpdate(fileName, "SipClients", oldSipClients, this.textBoxSipClients.Text);
}
if (string.Compare(this.newExeVersion, oldVersion) > 0)
{
this.ConfigFileUpdate(fileName, "LastExeVersion", oldVersion, this.newExeVersion);
}
}
private void ConfigFileUpdate(string fileName, string keyName, string searchstring, string replacestring)
{
try
{
if (string.IsNullOrEmpty(searchstring) || string.IsNullOrEmpty(replacestring))
{
return;
}
searchstring = ">" + searchstring + "<";
replacestring = ">" + replacestring + "<";
string[] configLines = File.ReadAllLines(fileName);
for (int i = 10; i < configLines.Length; i++)
{
string linePrevious = configLines[i - 1];
string line = configLines[i];
if (linePrevious.Contains(keyName) && line.Contains(searchstring))
{
configLines[i] = line.Replace(searchstring, replacestring);
break;
}
}
File.WriteAllLines(fileName, configLines);
}
catch (Exception ex)
{
Debug.Print(ex.Message);
}
}
|
|
|
|
|
|
Save it in other place and then move the "closed" file there
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
All well and good, until you want to load one of those files!
|
|
|
|
|
Here is another page with more then 20 Sample code links that do not work:
Shell SDK Samples (Windows)
-> you have to click (for example):Automatic Jump List Sample -> Downloading the Sample
-> You'll either end up with page not found or just the SDK Link
I don't think its funny and certainly not helpful
|
|
|
|