Example #1
0
        private void ModelLoaded(String name, PositionedModel model)
        {
            if (this.InvokeRequired)
            {
                ModelLoadedCallback d = new ModelLoadedCallback(ModelLoaded);
                this.Invoke(d, new object[] { name, model });
            }
            else
            {
                // Add the new model
                if (mModelDictionary.ContainsKey(name))
                {
                    mModelDictionary[name] = model;
                }
                else
                {
                    mModelDictionary.Add(name, model);
                }

                // Repopulate the model list, and select the newest addition
                modelSelectionBox.Items.Clear();
                foreach (String key in mModelDictionary.Keys)
                {
                    modelSelectionBox.Items.Add(key);
                }

                // Add "Load Model..." item
                modelSelectionBox.Items.Add("Load Model...");

                modelSelectionBox.SelectedIndex = modelSelectionBox.Items.IndexOf(name);
            }
        }
Example #2
0
        private void ModelLoaded(String name, PositionedModel model)
        {
            if (this.InvokeRequired)
            {
                ModelLoadedCallback d = new ModelLoadedCallback(ModelLoaded);
                this.Invoke(d, new object[] { name, model });
            }
            else
            {
                // Add the new model
                if (mModelDictionary.ContainsKey(name))
                {
                    mModelDictionary[name] = model;
                }
                else
                {
                    mModelDictionary.Add(name, model);
                }


                SelectModel(model);
            }
        }
Example #3
0
        private void ModelLoaded(String name, PositionedModel model)
        {
            if (this.InvokeRequired)
            {
                ModelLoadedCallback d = new ModelLoadedCallback(ModelLoaded);
                this.Invoke(d, new object[] { name, model });
            }
            else
            {
                // Add the new model
                if (mModelDictionary.ContainsKey(name))
                {
                    mModelDictionary[name] = model;
                }
                else
                {
                    mModelDictionary.Add(name, model);
                }

                // Repopulate the model list, and select the newest addition
                modelSelectionBox.Items.Clear();
                foreach (String key in mModelDictionary.Keys)
                {
                    modelSelectionBox.Items.Add(key);
                }

                // Add "Load Model..." item
                modelSelectionBox.Items.Add("Load Model...");

                modelSelectionBox.SelectedIndex = modelSelectionBox.Items.IndexOf(name);
            }
        }
Example #4
0
        private void ModelLoaded(String name, PositionedModel model)
        {
            if (this.InvokeRequired)
            {
                ModelLoadedCallback d = new ModelLoadedCallback(ModelLoaded);
                this.Invoke(d, new object[] { name, model });
            }
            else
            {
                // Add the new model
                if (mModelDictionary.ContainsKey(name))
                {
                    mModelDictionary[name] = model;
                }
                else
                {
                    mModelDictionary.Add(name, model);
                }


                SelectModel(model);
            }
        }