locked
WHS 2011 Add-In Development RRS feed

  • Question

  • I've only just started to play with developing addins for WHS2011.  It seems to me that documentation and useful example are pretty light on.   I am simply trying to display a list of names in a subtab listview and add, change and remove items from the list.  Can anyone provide any assistance as this is driving me crazy.  So far this is what I have.

    namespace ListViewSubTab
    {
        static class SubTabTasks
        {
            public static TaskCollection CreateTasks()
            {
                TaskCollection tasks = new TaskCollection();
    
                tasks.Add(DeleteOperatorTask());
                tasks.Add(InsertOperatorTask());
                
                return (tasks);
            }
    
            private static AsyncUiTask InsertOperatorTask()
            {
                var task = new AsyncUiTask("New Operator", 
                
                    delegate(object sender) 
                    {
                        MessageBox.Show("Show new Window and allow user to enter an operator name.");
                        return (null);
                    } 
                );
                return (task);
    
            }
    
            private static SyncUiTask<YourBusinessObject> DeleteOperatorTask()
            {
                SyncUiTask<YourBusinessObject> task = new SyncUiTask<YourBusinessObject>("Delete Operator", delegate(YourBusinessObject op)
                {
                    if (MessageBox.Show( string.Format("Are you sure you want to Delete the Operator {0}?", op.Name), "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
    
                        MessageBox.Show("OK Then Consider it Done");
    
                    }
                    return null;
                });
            
                return task;
    
            }
    
    
    
        }
    }
    

    Wednesday, June 13, 2012 8:59 AM