Results 1 to 3 of 3

Thread: Suggestions to improve User-Experience!

  1. #1
    Normal User popz's Avatar
    Join Date
    Apr 2012
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5

    Suggestions to improve User-Experience!

    Hello there,
    I have been testing iBot for a couple of days now and IT IS really annoying that you have to be clicking here and there, moving the mouse back and forth to add ONE option, so since iBot is really inspired off Neobot i figured we should just get the missing function neo had... I already made some pseudo-code that you could easily interpret and add it to the iBot code. It is coded in C# and I tried to comment as much as i could...

    This thread is mainly directed to the admin Jonatas


    PHP Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace 
    iBot_Improvements
    {
        public 
    partial class Form1 Form
        
    {

            public static 
    string Action_Control;
            public static 
    string Action_Property;

            public 
    Form1()
            {
                
    InitializeComponent();
                
    //Add the control name to the list so we can know what option does what.
                
    Extensions.Controls.Add("healer_Rules");
                
    Extensions.Controls.Add("friendhealer_Rules");
                
    Extensions.Properties.Add("healer_Enabled");
                
    Extensions.Properties.Add("friendhealer_Enabled");
                
    Settings_TreeView.NodeMouseClick += new TreeNodeMouseClickEventHandler(Settings_TreeView_NodeMouseClick);
            }

            
    void Settings_TreeView_NodeMouseClick(object senderTreeNodeMouseClickEventArgs e)
            {
                if (
    e.Node.Name.hasEntry())
                {
                    
    Button NewSet = new Button(); // we create a new button
                    
    NewSet.Text "....";
                    
    NewSet.Location = new Point(e.Node.Bounds.40e.Node.Bounds.2);
                    
    NewSet.Size = new Size(4020);
                    
    NewSet.LostFocus += new EventHandler(NewSet_LostFocus); //make sure we get rid of this....
                    
    NewSet.Click += new EventHandler(NewSet_Click); // User has clicked to make a new entry
                    
    Action_Control e.Node.Name;
                    
    Settings_TreeView.Controls.Add(NewSet);
                    
    NewSet.Focus(); // get it focused...
                
    }
                else if (
    e.Node.Name.hasProperty())
                {
                    
    ValuesProperties vp = new ValuesProperties();
                    
    vp.Value.KeyUp += new KeyEventHandler(Value_KeyUp); // User must press enter to close the window or escape.
                    
    Action_Property e.Node.Name;
                    
    vp.Value.Text e.Node.Text;
                    
    vp.ShowDialog();
                }
                else
                    return;
            }

            
    void Value_KeyUp(object senderKeyEventArgs e)
            {
                
    TextBox vp = (TextBox)sender;
                if (
    e.KeyCode == Keys.Enter || e.KeyCode == Keys.Escape)
                {
                    
    //Process the data first
                    
    MessageBox.Show("Data Change: " vp.Text);
                    
    //then we dispose the window
                    
    vp.Parent.Dispose();
                }
                
            }

            
    void NewSet_Click(object senderEventArgs e)
            {
                switch (
    Action_Control)
                {
                    case 
    "healer_Rules":
                        {
                            
    //call your function to add the controls to the form
                            
    MessageBox.Show("New Entry for: " Action_Control);
                            break;
                        }
                    case 
    "friendhealer_Rules":
                        {
                            
    //call your function to add the controls to the form
                            
    MessageBox.Show("New Entry for: " Action_Control);
                            break;
                        }
                    case 
    "":
                        break;
                }
            }

            
    void NewSet_LostFocus(object senderEventArgs e)
            {
                try
                {
                    
    //Lets try to get the button...
                    
    Button NewSettingButton = (Button)sender;
                    
    NewSettingButton.Dispose(); // We Dispose it.
                
    }
                catch
                {
                    
    // do something to handle the error
                
    }
            }
        }

        public static class 
    Extensions
        
    {
            public static List<
    stringControls = new List<string>();
            public static List<
    stringProperties = new List<string>();

            public static 
    bool hasEntry(this string NodeName)
            {
                if (
    Controls.Any(NodeName.Contains)) // do some kind of list of name to make sure it can be access to make a new entry
                    
    return true;
                else
                    return 
    false;
            }

            public static 
    bool hasProperty(this string NodeName)
            {
                if (
    Properties.Any(NodeName.Contains)) // do some kind of list of name to make sure it can be access to make a new entry
                    
    return true;
                else
                    return 
    false;
            }
        }

    Hope you consider it

    This is how it would look


    Click image for larger version. 

Name:	goodstuff.png 
Views:	14 
Size:	38.2 KB 
ID:	9568
    Last edited by popz; 11-14-2012 at 02:42 AM.

  2. #2
    Normal User Electrofaust's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Yes, its really annoying to add New actions etc like its now.. Good thing if they would do it like Neo!
    Good job

  3. #3
    Normal User popz's Avatar
    Join Date
    Apr 2012
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    Quote Originally Posted by Electrofaust View Post
    Yes, its really annoying to add New actions etc like its now.. Good thing if they would do it like Neo!
    Good job

    Hopefully jonatas see this and add it up

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •