Esempio n. 1
0
        public void BindConnections(IManagerEntity stateEntry)
        {
            State state = (State)stateEntry;

            TaskStateConnectionStore = new TreeStore(typeof(int), typeof(string));
            TaskStateConnectionStore.Clear();
            foreach (int connectionID in state.Connections.Keys)
            {
                State connectedState = (State)stateCore.TaskManager.GetTaskStateConnection(connectionID);
                TaskStateStore.AppendValues(connectionID, connectedState.Name);
            }

            tvStateConnection.Model = TaskStateConnectionStore;
        }
Esempio n. 2
0
        public void BindStates()
        {
            TaskStateStore.Clear();
            foreach (DataRow row in Source.Tables["TaskState"].Rows)
            {
                TaskStateStore.AppendValues(row["ID"], row["Name"]);
                if (StateSearchDictionary == null)
                {
                    throw new ManagementException(ExceptionType.NotAllowed, "State Search Dictionary no set to instance of object");
                }

                if (!StateSearchDictionary.ContainsKey(row["Name"]))
                {
                    StateSearchDictionary.Add(row["Name"], row["Name"]);
                }
            }

            tvState.Model = TaskStateStore;
        }