Exemplo n.º 1
0
 public NodeSelectionForm(MainForm mainForm)
 {
     m_mainForm = mainForm;
     this.Font = SystemFonts.MessageBoxFont;
     InitializeComponent();
     DialogResult = DialogResult.Cancel;
 }
Exemplo n.º 2
0
 private void m_mainForm_WorldChanged(object sender, MainForm.WorldChangedEventArgs e)
 {
     m_uploadedRepresentation = null;
     UpdateWorldHandlers(e.OldWorld as SchoolWorld, e.NewWorld as SchoolWorld);
     SelectSchoolWorld(null, EventArgs.Empty);
     UpdateData();
 }
Exemplo n.º 3
0
        public ValidationForm(MainForm mainForm, MyValidator validator)
        {
            InitializeComponent();
            Validator = validator;

            m_mainForm = mainForm;
        }
Exemplo n.º 4
0
        public DebugForm(MainForm mainForm)
        {
            m_mainForm = mainForm;
            InitializeComponent();

            m_mainForm.SimulationHandler.StateChanged += SimulationHandler_StateChanged;
        }
Exemplo n.º 5
0
        public ValidationForm(MainForm mainForm)
        {
            InitializeComponent();
            Validator = new MyValidator();

            m_mainForm = mainForm;
        }
Exemplo n.º 6
0
        public NodeHelpForm(MainForm mainForm)
        {
            InitializeComponent();
            m_mainForm = mainForm;

            //m_style = MyResources.GetTextFromAssembly(Assembly.GetExecutingAssembly(), "help_page.css", "res");
            m_style = Properties.Resources.help_page;
        }
Exemplo n.º 7
0
        public ObserverForm(MainForm mainForm, MyAbstractObserver observer, MyNode declaredOwner)
        {
            InitializeComponent();
            m_mainForm = mainForm;

            Observer = observer;
            observer.TriggerReset();

            Text = observer.GetTargetName(declaredOwner);
        }
Exemplo n.º 8
0
        public ObserverForm(MainForm mainForm, MyAbstractObserver observer, MyNode declaredOwner)
        {
            InitializeComponent();
            m_mainForm = mainForm;

            Observer = observer;
            observer.TriggerReset();

            Text = MyProject.ShortenNodeTypeName(observer.GetType()) + ": " + observer.GetTargetName(declaredOwner);
        }
Exemplo n.º 9
0
        public GraphLayoutForm(MainForm mainForm, MyNodeGroup target)
        {
            InitializeComponent();
            m_mainForm = mainForm;
            Target = target;
            Text = target.Name;

            Desktop.CreateConnection = delegate()
            {
                return new MyNodeViewConnection();
            };
        }
Exemplo n.º 10
0
        public ToyWorldConversation(MainForm mainForm)
        {
            InitializeComponent();

            m_mainForm = mainForm;
            m_mainForm.SimulationHandler.StateChanged += SimulationHandler_StateChanged;

            m_boldFont = new Font(richTextBox_messages.Font, FontStyle.Bold);
            m_normalFont = richTextBox_messages.Font;

            m_displayNodes = new List<ToyWorldGUI>();
            m_interceptNodes = new List<ToyWorldGUI>();
            FindGuiNodes();
        }
Exemplo n.º 11
0
        public ConsoleForm(MainForm mainForm)
        {
            InitializeComponent();
            m_mainForm = mainForm;

            MyLog.Writer = new TextBoxCache(this);
            MyLog.GrabConsole();

            m_mainForm.SimulationHandler.ProgressChanged += SimulationHandler_ProgressChanged;
            m_mainForm.SimulationHandler.StateChanged += SimulationHandler_StateChanged;

            logLevelStripComboBox.Items.AddRange(Enum.GetNames(typeof(MyLogLevel)));
            logLevelStripComboBox.SelectedIndexChanged += logLevelStripComboBox_SelectedIndexChanged;
            logLevelStripComboBox.SelectedIndex = Properties.Settings.Default.LogLevel;
        }
Exemplo n.º 12
0
        internal static IEnumerable<DockContent> GetBrainSimUIExtensions(MainForm mainForm)
        {
            List<DockContent> result = new List<DockContent>();

            foreach (Type test in GetBrainSimUIExtensionTypes())
            {
                ConstructorInfo defaultCtor = test.GetConstructor(Type.EmptyTypes);
                ConstructorInfo mainformCtor = test.GetConstructor(new Type[] { typeof(MainForm) });
                if (mainformCtor != null)
                    result.Add((DockContent)mainformCtor.Invoke(new object[] { mainForm }));
                else if (defaultCtor != null)
                    result.Add((DockContent)defaultCtor.Invoke(new object[] { }));
            }

            return result;
        }
Exemplo n.º 13
0
        public TextEditForm(MainForm mainForm, IScriptableNode target)
        {
            InitializeComponent();

            //Icon = Properties.Resources.TextDoc;

            m_mainForm = mainForm;
            Target = target;
            Text = target.Name;

            SetupEditorStyle();

            scintilla.Text = Target.Script;

            scintilla.TextChanged += scintilla_TextChanged;
            scintilla.HandleDestroyed += scintilla_HandleDestroyed;
            scintilla.HandleCreated += scintilla_HandleCreated;
        }
Exemplo n.º 14
0
 public NodePropertyForm(MainForm mainForm)
 {
     m_mainForm = mainForm;
     InitializeComponent();
     propertyGrid.BrowsableAttributes = new AttributeCollection(new MyBrowsableAttribute());
 }
Exemplo n.º 15
0
 public MemoryBlocksForm(MainForm mainForm)
 {
     InitializeComponent();
     m_mainForm = mainForm;
 }
Exemplo n.º 16
0
        public TaskForm(MainForm mainForm)
        {
            m_mainForm = mainForm;

            InitializeComponent();
        }
Exemplo n.º 17
0
        public SchoolRunForm(MainForm mainForm)
        {
            // school main form //

            m_serializer = new YAXSerializer(typeof(PlanDesign));
            m_mainForm = mainForm;
            //RunView = new SchoolRunForm(m_mainForm);

            InitializeComponent();

            m_model = new TreeModel();
            treeViewLTList.Model = m_model;
            treeViewLTList.Refresh();

            if (!String.IsNullOrEmpty(Properties.School.Default.AutosaveFolder))
                btnAutosave.Checked = Properties.School.Default.AutosaveEnabled;
            else
                btnAutosave.Checked = false;

            m_lastOpenedFile = Properties.School.Default.LastOpenedFile;
            LoadCurriculum(m_lastOpenedFile);

            // school run form //

            // here so it does not interfere with designer generated code
            btnRun.Click += m_mainForm.runToolButton_Click;
            btnStop.Click += m_mainForm.stopToolButton_Click;
            btnPause.Click += m_mainForm.pauseToolButton_Click;
            btnStepOver.Click += m_mainForm.stepOverToolButton_Click;
            btnDebug.Click += m_mainForm.debugToolButton_Click;

            m_mainForm.SimulationHandler.StateChanged += SimulationHandler_StateChanged;
            m_mainForm.SimulationHandler.ProgressChanged += SimulationHandler_ProgressChanged;
            m_mainForm.WorldChanged += m_mainForm_WorldChanged;

            nodeTextBox1.DrawText += nodeTextBox1_DrawText;

            m_model.NodesChanged += ModelChanged;
            m_model.NodesInserted += ModelChanged;
            m_model.NodesRemoved += ModelChanged;

            WorkspaceChanged += SchoolRunForm_WorkspaceChanged;

            SchoolRunForm_WorkspaceChanged(null, EventArgs.Empty);
        }