Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
suggestions
#1
thanks for giving us the options to change the editor text font size colors ect.

A couple of suggestions i would love to see
1. a reset button to restore fonts and colors back to default
2. the ability to save and load multiple themes


a couple of other things

this example  from Class ADialog
gives me a warning and multiple errors
C# code:
var d = new ADialog(); //info: another constructor has the same parameters as ShowEx

d.SetText("Main text.", "More text.\nSupports <A HREF=\"link data\">links</A> if you subscribe to HyperlinkClicked event.");
d.SetButtons("1 OK|2 Cancel|3 Custom|4 Custom2");
d.SetIcon(DIcon.Warning);
d.SetExpandedText("Expanded info\nand more info.", true);
d.FlagCanBeMinimized = true;
d.SetRadioButtons("1 r1|2 r2");
d.SetCheckbox("Check");
d.SetTimeout(30, "OK");
d.HyperlinkClicked += e => { ADialog.Show("link clicked", e.LinkHref, owner: e.hwnd); };
d.ButtonClicked += e => { Print(e.Button); if(e.Button == 4) e.DoNotCloseDialog = true; };
d.FlagShowProgressBar = true; d.Timer += e => { e.dialog.Send.Progress(e.TimerTimeMS / 100); };
var r = d.ShowDialog();
Print®;
switch(r.Button) { case 1: Print("OK"); break; case DResult.Timeout: Print("timeout"); break; }

 Compilation: 13 errors, 1 warnings  >>
    Warnings can be disabled in Properties -> noWarnings or warningLevel.
    Warnings for part of code can be disabled with <google>C# #pragma warning.
<open "<0x100000016>|10|1">Script3.cs(10,1): warning CS1702: Assuming assembly reference 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'System.Drawing.Common' matches identity 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
<open "<0x100000016>|16|23">Script3.cs(16,23): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|16|27">Script3.cs(16,27): error CS0103: The name 'gt' does not exist in the current context
<open "<0x100000016>|16|62">Script3.cs(16,62): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|16|81">Script3.cs(16,81): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|17|20">Script3.cs(17,20): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|17|24">Script3.cs(17,24): error CS0103: The name 'gt' does not exist in the current context
<open "<0x100000016>|17|36">Script3.cs(17,36): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|17|50">Script3.cs(17,50): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|17|65">Script3.cs(17,65): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|18|42">Script3.cs(18,42): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|18|46">Script3.cs(18,46): error CS0103: The name 'gt' does not exist in the current context
<open "<0x100000016>|18|52">Script3.cs(18,52): error CS0103: The name 'e' does not exist in the current context
<open "<0x100000016>|18|75">Script3.cs(18,75): error CS0103: The name 'e' does not exist in the current context

how to fix?

also this example from helpMethod ADialog.ShowProgress
C# code:
var pd = ADialog.ShowProgress(false, "Working");
for(int i = 1; i <= 100; i++) {
    if(!pd.IsOpen) { Print(pd.Result); break; } //if the user closed the dialog
    pd.Send.Progress(i); //don't need this if marquee
    Thread.Sleep(50); //do something in the loop
}
pd.Send.Close();
 only works when i add
C# code:
using System.Threading;
#2
Somehow this example code is HTML-encoded. Now fixed. If still HTML-encoded, press F5 or Ctrl+F5.

Warning CS1702 - I'll try to fix it. Now ignore.
#3
I would like to be able to rename the script, right now when pressing F2 nothing happens.

I've got some errors when testing some examples from the library:

C# code:
ADialog.ShowTextInputEx("Example", flags: DFlags.CommandLinks, buttons: "OK|Cancel|10 Browse\nSets edit control text.",
    onButtonClick: e => { if(e.Button == 10) { e.EditText = "text"; e.DontCloseDialog = true; } });

ADialog.ShowTextInputEx("Example", "Try to click OK while text is empty.", onButtonClick: e =>
{
    if(e.Button == 1 && Empty(e.EditText)) {
        ADialog.Show("Text cannot be empty.", owner: e.hwnd);
        e.dialog.EditControl.FocusControlOfThisThread();
        e.DontCloseDialog = true;
    }
});

Compilation: 3 errors
<open "<0x100000013>|6|68">Script15.cs(6,68): error CS1061: 'DEventArgs' does not contain a definition for 'DoNotCloseDialog' and no accessible extension method 'DoNotCloseDialog' accepting a first argument of type 'DEventArgs' could be found (are you missing a using directive or an assembly reference?)
<open "<0x100000013>|12|24">Script15.cs(12,24): error CS1061: 'AWnd' does not contain a definition for 'FocusControlOfThisThread' and no accessible extension method 'FocusControlOfThisThread' accepting a first argument of type 'AWnd' could be found (are you missing a using directive or an assembly reference?)
<open "<0x100000013>|13|5">Script15.cs(13,5): error CS1061: 'DEventArgs' does not contain a definition for 'DoNotCloseDialog' and no accessible extension method 'DoNotCloseDialog' accepting a first argument of type 'DEventArgs' could be found (are you missing a using directive or an assembly reference?)

C# code:
ADialog.ShowNoWait("Simple example");

var d = ADialog.ShowNoWaitEx("Another example", "text", "1 OK|2 Cancel", y: -1, secondsTimeout: 30);
2.s(); //do something while the dialog is open
d.Send.ChangeText2("new text", false);
2.s(); //do something while the dialog is open
d.ThreadWaitClosed(); Print(d.Result); //wait until the dialog is closed and get result. Optional, just an example.

Compilation: 1 errors
<open "<0x10000000E>|11|3">Script10.cs(11,3): error CS1061: 'ADialog' does not contain a definition for 'ThreadWaitClosed' and no accessible extension method 'ThreadWaitClosed' accepting a first argument of type 'ADialog' could be found (are you missing a using directive or an assembly reference?)
#4
If F2 does not start renaming, possible reasons are:
The list control is not focused.
F2 is assigned to a menu item.
F2 is used as a global hotkey in some app. For example a trigger.

Again errors in example code. Correct codes:
C# code:
ADialog.ShowTextInputEx("Example", flags: DFlags.CommandLinks, buttons: "OK|Cancel|10 Browse\nSets edit control text.",
    onButtonClick: e => { if(e.Button == 10) { e.EditText = "text"; e.DontCloseDialog = true; } });

ADialog.ShowTextInputEx("Example", "Try to click OK while text is empty.", onButtonClick: e =>
{
    if(e.Button == 1 && Empty(e.EditText)) {
        ADialog.Show("Text cannot be empty.", owner: e.hwnd);
        e.dialog.EditControl.Focus();
        e.DontCloseDialog = true;
    }
});

C# code:
var d = ADialog.ShowNoWaitEx("Another example", "text", "1 OK|2 Cancel", y: -1, secondsTimeout: 30);
2.s(); //do something while the dialog is open
d.Send.ChangeText2("new text", false);
2.s(); //do something while the dialog is open
d.ThreadWaitForClosed(); Print(d.Result); //wait until the dialog is closed and get result. Optional, just an example.
#5
I've found out that on the left-hand side menu, I click on the "Open" tab. That's why the F2 key did not work.
Now when I switch back to "Files" tab then it works just fine.
The 2 examples you've fixed works as expected.
Thanks Gintaras.


Forum Jump:


Users browsing this thread: 1 Guest(s)