Beispiel #1
0
        private void FormExplorerTree_Refresh()
        {
            foreach (Client.Core.Forms.Control currentControl in EditorForm.GetAllControls())
            {
                Telerik.Web.UI.RadTreeNode controlNode = FormExplorerTree.FindNodeByValue(currentControl.ControlId.ToString());

                if (controlNode != null)
                {
                    String nodeText = currentControl.Name;

                    if ((currentControl.ReadOnly) || (!currentControl.Visible) || (currentControl.Required))
                    {
                        if (currentControl.Required)
                        {
                            nodeText = nodeText + " { Required }";
                        }

                        if (currentControl.ReadOnly)
                        {
                            nodeText = nodeText + " { Read Only }";
                        }

                        if (!currentControl.Visible)
                        {
                            nodeText = nodeText + " { Not Visible }";
                        }
                    }

                    controlNode.Text = nodeText;
                }
            }

            return;
        }
        protected override void SaveAndClose(EditorForm form, TextureFile textureFile, File file)
        {
            using (new WaitCursor(form))
            {
                var resourceFile = new ResourceFile();
                using (var ms = new MemoryStream(file.GetData()))
                {
                    resourceFile.Read(ms);
                }

                var msSystem = new MemoryStream(resourceFile.SystemMemData);
                var msGraphics = new MemoryStream(resourceFile.GraphicsMemData);

                try
                {
                    textureFile.Save(msSystem, msGraphics);
                }
                finally
                {
                    msSystem.Close();
                    msGraphics.Close();
                }

                using (var resMS = new MemoryStream())
                {
                    resourceFile.Write(resMS);
                    file.SetData(resMS.ToArray());
                }
            }

            form.Close();

        }
Beispiel #3
0
        private void InsertElementText(EditorForm padForm, string name, string diagContent)
        {
            try
            {
                ArrayList al = new ArrayList();
                padForm.CurrentEditorControl.EMRDoc.GetAllSpecElement(al, padForm.CurrentEditorControl.EMRDoc.RootDocumentElement, ElementType.Text, name);

                if (al.Count > 0)
                {
                    ZYText find = al[0] as ZYText;
                    if (find != null)
                    {
                        padForm.CurrentEditorControl.EMRDoc.Content.MoveSelectStart(find.FirstElement);
                        padForm.CurrentEditorControl.DeleteElement(find);
                    }
                }

                //ZYTextBlock newvalue = new ZYTextBlock();
                //newvalue.Name = name;
                //newvalue.Text = diagContent;
                //newvalue.Attributes.SetValue(ZYTextConst.c_FontSize, "五号");
                //padForm.CurrentEditorControl.EMRDoc._InsertBlock(newvalue);

                ZYText value = new ZYText();
                value.Name = name;
                value.Text = diagContent;

                value.Attributes.SetValue(ZYTextConst.c_FontSize, "小四");
                padForm.CurrentEditorControl.EMRDoc._InsertBlock(value);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #4
0
        public void colorTextTest()
        {
            EditorForm test = new EditorForm(5, 5);
            Button     b    = new Button();

            b.ForeColor = Color.Black;
            test.ColorText(1, b);
            Assert.AreEqual(Color.Blue, b.ForeColor);
            test.ColorText(2, b);
            Assert.AreEqual(Color.ForestGreen, b.ForeColor);
            test.ColorText(3, b);
            Assert.AreEqual(Color.DarkRed, b.ForeColor);
            test.ColorText(4, b);
            Assert.AreEqual(Color.Purple, b.ForeColor);
            test.ColorText(5, b);
            Assert.AreEqual(Color.Orange, b.ForeColor);
            test.ColorText(6, b);
            Assert.AreEqual(Color.DarkBlue, b.ForeColor);
            test.ColorText(7, b);
            Assert.AreEqual(Color.Goldenrod, b.ForeColor);
            test.ColorText(8, b);
            Assert.AreEqual(Color.Brown, b.ForeColor);
            test.ColorText(0, b);
            Assert.AreEqual(Color.Black, b.ForeColor);
        }
Beispiel #5
0
        private void btnViewCFGOnly_Click(object sender, EventArgs e)
        {
            if (PassesListBox.SelectedIndex == -1)
            {
                MessageBox.Show("Select a pass first");
                return;
            }
            TextSection section = (TextSection)PassesListBox.SelectedItem;

            var source = EditorForm.CreateBlobForText(this.Library, section.Text);

            source = this.Library.GetBlobAstUf8(source);

            string[] options = new string [1];
            options[0] = "-view-cfg-only";
            EditorForm.OptimizeResult opt = EditorForm.RunOptimize(this.Library, options, source);
            if (!opt.Succeeded)
            {
                MessageBox.Show("Failed to optimize: " + opt.ResultText);
                return;
            }

            string dotText = opt.ResultText.Substring(opt.ResultText.IndexOf("digraph"));

            EditorForm.LogContextMenuHelper.ShowDot(dotText);
        }
Beispiel #6
0
        public void FormLoadTest()
        {
            int testmapx = 0;
            int testmapy = 0;
            //mapx = 0, mapy = 0
            EditorForm testEditor1 = new EditorForm(0, 0);

            Assert.AreEqual(testmapx, testEditor1.mapX);
            Assert.AreEqual(testmapy, testEditor1.mapY);

            //mapx = 0, mapy > 0
            EditorForm testEditor2 = new EditorForm(0, 10);

            testmapy = 10;
            Assert.AreEqual(testmapx, testEditor2.mapX);
            Assert.AreEqual(testmapy, testEditor2.mapY);

            //mapx > 0, mapy = 0
            EditorForm testEditor3 = new EditorForm(10, 0);

            testmapx = 10;
            testmapy = 0;
            Assert.AreEqual(testmapx, testEditor3.mapX);
            Assert.AreEqual(testmapy, testEditor3.mapY);

            //mapx > 0, mapy > 0
            EditorForm testEditor4 = new EditorForm(10, 10);

            testmapx = 10;
            testmapy = 10;
            Assert.AreEqual(testmapx, testEditor4.mapX);
            Assert.AreEqual(testmapy, testEditor4.mapY);
        }
Beispiel #7
0
        protected override void SaveAndClose(EditorForm form, TextureFile textureFile, File file)
        {
            using (new WaitCursor(form))
            {
                var resourceFile = new ResourceFile();
                using (var ms = new MemoryStream(file.GetData()))
                {
                    resourceFile.Read(ms);
                }

                var msSystem   = new MemoryStream(resourceFile.SystemMemData);
                var msGraphics = new MemoryStream(resourceFile.GraphicsMemData);

                try
                {
                    textureFile.Save(msSystem, msGraphics);
                }
                finally
                {
                    msSystem.Close();
                    msGraphics.Close();
                }

                using (var resMS = new MemoryStream())
                {
                    resourceFile.Write(resMS);
                    file.SetData(resMS.ToArray());
                }
            }

            form.Close();
        }
Beispiel #8
0
        private void CopyContainerButton_Click(object sender, EventArgs e)
        {
            // The intent is to copy compiled code (possibly customized) into the
            // clipboard so it can be pasted into an XML file to be run interactively.

            var text           = this.CodeBox.Text;
            var source         = EditorForm.CreateBlobForText(this.Library, text);
            var assembler      = HlslDxcLib.CreateDxcAssembler();
            var assembleResult = assembler.AssembleToContainer(source);

            if (assembleResult.GetStatus() < 0)
            {
                var errors = assembleResult.GetErrors();
                MessageBox.Show(EditorForm.GetStringFromBlob(this.Library, errors));
                return;
            }
            var container = assembleResult.GetResult();

            // Now copy that to the clipboard.
            var bytes   = ContainerData.BlobToBytes(container);
            var stream  = new System.IO.MemoryStream(bytes);
            var dataObj = new DataObject();

            dataObj.SetData(ContainerData.DataFormat.Name, stream);
            dataObj.SetText(text);
            Clipboard.SetDataObject(dataObj, true);
        }
Beispiel #9
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Editor = new EditorForm();
     Application.Run(Editor);
 }
Beispiel #10
0
        private void ApplyChangesButton_Click(object sender, EventArgs e)
        {
            // Turn the text into the expected encoding.
            IDxcBlobEncoding sourceBlob = EditorForm.CreateBlobForText(this.Library, this.CodeBox.Text);

            sourceBlob = this.Library.GetBlobAstUf8(sourceBlob);
            IDxcBlob bitcodeBlob = sourceBlob;

            List <string> passes = new List <string>();

            passes.Add("hlsl-passes-resume");
            for (int i = PassesListBox.SelectedIndex; i < PassesListBox.Items.Count; ++i)
            {
                passes.Add(((TextSection)PassesListBox.Items[i]).Title);
            }
            string[] options = EditorForm.CreatePassOptions(passes, false, true);
            EditorForm.OptimizeResult opt = EditorForm.RunOptimize(this.Library, options, bitcodeBlob);
            if (!opt.Succeeded)
            {
                MessageBox.Show("Failed to optimize: " + opt.ResultText);
                return;
            }

            OptEditorForm form = new OptEditorForm();

            form.CodeFont        = this.CodeBox.Font;
            form.Library         = this.Library;
            form.HighLevelSource = this.HighLevelSource;
            form.Sections        = TextSection.EnumerateSections(new string[] { "MODULE-PRINT", "Phase:" }, opt.ResultText).ToArray();
            form.StartPosition   = FormStartPosition.CenterParent;
            form.Show(this);
        }
Beispiel #11
0
        /// <summary>
        ///
        ///     Click trigger function for the new editor button.
        ///     This will take the user to the editor form.
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_NewEditor_Click(object sender, EventArgs e)
        {
            Hide();
            EditorForm instance_EditorForm = new EditorForm();

            instance_EditorForm.Show();
        }
        private bool ShowModal(Control owner)
        {
            if (Handler != null)
            {
                EditorFactory factory = EditorFactory;
                if (factory == null)
                {
                    factory = new DefaultEditorFactory();
                }
                EditorForm form = factory.CreateEditor(Handler, true, true, true);

                if (owner != null)
                {
                    form.StartPosition = FormStartPosition.CenterParent;
                    DialogResult dialog = form.ShowDialog(owner);
                    return(dialog == DialogResult.OK);
                }
                else
                {
                    DialogResult dialog = form.ShowDialog();
                    return(dialog == DialogResult.OK);
                }
            }
            return(false);
        }
        private bool ShowNonModal(Control owner)
        {
            if (Handler != null)
            {
                EditorFactory factory = EditorFactory;
                if (factory == null)
                {
                    factory = new DefaultEditorFactory();
                }
                EditorForm form = factory.CreateEditor(Handler, true, false, true);
                form.ValuesAdopted  += OnValuesAdopted;
                form.ValuesCommited += OnValuesCommitted;
                form.Disposed       += OnEditorDisposed;

                if (owner != null)
                {
                    form.StartPosition = FormStartPosition.CenterParent;
                    form.Show(owner);
                    return(true);
                }
                else
                {
                    form.Show(owner);
                    return(true);
                }
            }
            return(false);
        }
Beispiel #14
0
 public ProjectileViewerPanel(EditorForm editor)
 {
     _editorForm         = editor;
     _projectileData     = null;
     _iconSheetImage     = null;
     this.DoubleBuffered = true;
 }
Beispiel #15
0
        protected string GetGameFolderPathFromFolderBrowserDialog(EditorForm view)
        {
            // Configure folder browser dialog
            if (Directory.Exists(Settings.Default.MruGameFolderPath))
            {
                view.SetFolderBrowserDialogSelectedPath(Settings.Default.MruGameFolderPath);
            }
            else
            {
                view.SetFolderBrowserDialogRootFolder(Environment.SpecialFolder.Desktop);
            }

            // Get folder from user
            var dialogResult = view.ShowFolderBrowserDialog();

            // Return if no folder was selected
            if (dialogResult != DialogResult.OK)
            {
                return(null);
            }

            var result = view.GetFolderBrowserDialogSelectedPath();

            // Save selected folder
            Settings.Default.MruGameFolderPath = result;
            Settings.Default.Save();

            return(result);
        }
Beispiel #16
0
        public void GetDiag(EditorForm padForm)
        {
            try
            {
                //此处根据配置,判断返回的诊断内容是结构化元素还是自由文本
                //add by ywk 2013年2月19日15:46:13
                string diagContentType = BasicSettings.GetStringConfig("IsSetDiagContentStr") == "" ? "1" : BasicSettings.GetStringConfig("IsSetDiagContentStr");

                if (m_Form is DiagForm)
                {
                    string diagContent = m_DiagForm.GetDiag().Trim();
                    //edti by ywk 2013年2月19日15:50:39
                    if (diagContentType == "1")//插入结构化元素
                    {
                        InsertElementText(padForm, m_Name, diagContent);
                    }
                    else
                    {
                        InsertString(padForm, m_Name, diagContent);
                    }
                }
                else if (m_Form is DiagLibForm)
                {
                    string diagContent = m_DiagLibForm.GetDiag().Trim();
                    InsertString(padForm, m_Name, diagContent);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #17
0
        /// <summary>
        /// .ctor
        /// </summary>
        //public ChangeMacroFrom(IEmrHost app, PadForm padForm, Inpatient inpatient)
        //{
        //    InitializeComponent();
        //    m_App = app;
        //    m_CurrentPadForm = padForm;
        //    m_CurrentInpatient = inpatient;
        //}

        /// <summary>
        /// 适用新版
        /// edit by ywk 2013年9月5日 09:15:31
        /// </summary>
        /// <param name="app"></param>
        /// <param name="padForm"></param>
        /// <param name="inpatient"></param>
        public ChangeMacroFrom(IEmrHost app, EditorForm editForm, Inpatient inpatient)
        {
            InitializeComponent();
            m_App              = app;
            m_CurEditForm      = editForm;
            m_CurrentInpatient = inpatient;
        }
Beispiel #18
0
 private void InitializeForm()
 {
     _form = new EditorForm
     {
         dataGridView1 = {DataSource = _bindingSource},
         bindingNavigator1 = {BindingSource = _bindingSource}
     };
 }
Beispiel #19
0
    public FindDialog(EditorForm ef)
    {
        this.Text = "Find";
        this.ef   = ef;

        label.Text  = "Find what:";
        btn_ok.Text = "Find:";
    }
Beispiel #20
0
        public LoadMapForm(EditorForm editor)
        {
            InitializeComponent();

            _editor = editor;

            MapSelection.Items.AddRange(Genus2D.GameData.MapInfo.GetMapInfoStrings().ToArray());
            MapSelection.SelectedIndex = 0;
        }
Beispiel #21
0
        private void initFPForm()
        {
            //_fpEditorForm = createFPForm();
            _editorForm = createEditorForm();

            //_panelForm = createPanelForm();

            showFPForm();
        }
Beispiel #22
0
        private static void Update()
        {
            if (Core.Utility.IsPauseMenuActive)
            {
                // with ShouldTickInPauseMenu set the spotlight is still visible in the pause menu
                // without needing to do anything else, so if the pause menu is active don't do anything
                return;
            }

            while (PluginState.HasAnySpotlightRequest())
            {
                Vehicle v = PluginState.PopSpotlightRequest();
                if (v)
                {
                    GetVehicleSpotlight(v);
                }
            }

            if (InputControllers.Any(c => c.ShouldToggleSpotlight()))
            {
                VehicleSpotlight s = GetPlayerCurrentVehicleSpotlight();

                if (s != null)
                {
                    s.IsActive = !s.IsActive;
                }
            }

            for (int i = Spotlights.Count - 1; i >= 0; i--)
            {
                VehicleSpotlight s = Spotlights[i];
                if (!s.Vehicle || s.Vehicle.IsDead)
                {
                    s.IsActive = false;
                    s.OnRemoved();
                    Spotlights.RemoveAt(i);
                    continue;
                }

                s.Update(InputControllers);
            }


            if ((Editor == null || !Editor.Window.IsVisible) && Game.IsKeyDown(Settings.EditorKey))
            {
                if (Editor != null)
                {
                    Editor?.Window?.Close();
                    Editor = null;
                }

                Editor = new EditorForm();
                Editor.Show();
                Editor.Position = new System.Drawing.Point(300, 300);
            }
        }
Beispiel #23
0
    public Program()
    {
        Application.EnableVisualStyles();

        LoadForms();

        e           = new EditorForm();
        e.OnUpdate += Update;
        e.Run();
    }
Beispiel #24
0
 public EditorScene() : base()
 {
     currentTool = new MapObj();
     map         = new GameObject[100, 100];
     objList     = new List <GameObject>();
     spawnList   = new List <SpawnObj>();
     form        = new EditorForm(this);
     form.Show();
     showLines = true;
 }
Beispiel #25
0
        private void createEditor()
        {
            DataForms.FMain         = this;
            DataForms.FMain.Visible = false;
            DataConfig.ProgramClose = false;

            EditorForm editor = new EditorForm();

            editor.Show();
        }
Beispiel #26
0
        private void FormControlPropertiesGrid_Refresh()
        {
            Telerik.Web.UI.RadTreeNode activeNode = FormExplorerTree.SelectedNode;

            System.Data.DataTable propertiesTable = new System.Data.DataTable();

            propertiesTable.Columns.Add("Name");

            propertiesTable.Columns.Add("Value");

            propertiesTable.Columns.Add("Type");

            if (activeNode != null)
            {
                Client.Core.Forms.Control selectedControl = EditorForm.FindControlById(new Guid(activeNode.Value));

                if (selectedControl != null)
                {
                    foreach (System.Reflection.PropertyInfo currentPropertyInfo in selectedControl.GetType().GetProperties())
                    {
                        propertiesTable.Rows.Add(

                            currentPropertyInfo.Name,

                            (currentPropertyInfo.CanRead) ?

                            ((currentPropertyInfo.GetValue(selectedControl, null) != null) ?  currentPropertyInfo.GetValue(selectedControl, null).ToString() : "null")

                                : " < complex type >",

                            currentPropertyInfo.PropertyType.ToString()

                            );
                    }
                }
            }

            FormControlPropertiesGrid.DataSource = propertiesTable;

            FormControlPropertiesGrid.AutoGenerateColumns = true;

            Telerik.Web.UI.GridSortExpression propertiesSort = new Telerik.Web.UI.GridSortExpression();

            propertiesSort.FieldName = "Name";

            propertiesSort.SortOrder = Telerik.Web.UI.GridSortOrder.Ascending;

            FormControlPropertiesGrid.MasterTableView.SortExpressions.Clear();

            FormControlPropertiesGrid.MasterTableView.SortExpressions.Add(propertiesSort);

            FormControlPropertiesGrid.Rebind();

            return;
        }
Beispiel #27
0
        protected bool CloseFormConfirmation(EditorForm view, bool isModified, string message)
        {
            // Return true if there are no unsaved changes
            if (!isModified)
            {
                return(true);
            }

            // Prompt user whether to close form with unsaved changes
            return(view.ShowConfirmationBox(message));
        }
Beispiel #28
0
        private EditorForm createEditorForm()
        {
            EditorForm result = new EditorForm();

            //........................

            result.MdiParent = this;

            //........................

            return(result);
        }
Beispiel #29
0
        public EditMapForm(EditorForm editor, Genus2D.GameData.MapData mapData)
        {
            InitializeComponent();
            _editor  = editor;
            _mapData = mapData;

            NameField.Text           = mapData.GetMapName();
            WidthField.Value         = mapData.GetWidth();
            HeightField.Value        = mapData.GetHeight();
            PvpCheck.Checked         = mapData.PvpEnabled;
            MultiCombatCheck.Checked = mapData.MultiCombat;
        }
Beispiel #30
0
        private IDockContent GetContentFromPersistString(string persistString)
        {
            string[] items = persistString.Split(',');

            persistString = items[0];

            if (persistString == typeof(TerminalForm).ToString())
            {
                if (this.TerminalForm != null)
                {
                    return(this.TerminalForm);
                }
                this.TerminalForm          = new TerminalForm();
                this.TerminalForm.IsHidden = false;
                if (this.TerminalForm.DockState == DockState.Document)
                {
                    this.TerminalForm.DockState = DockState.DockRight;
                }
                return(this.TerminalForm);
            }

            //else if (persistString == typeof(ErrorListForm).ToString())
            //{
            //    if (this.ErrorListForm != null)
            //        return this.ErrorListForm;
            //    this.ErrorListForm = new ErrorListForm();
            //    this.ErrorListForm.IsHidden = false;
            //    return this.ErrorListForm;
            //}

            else if (persistString == typeof(EditorForm).ToString())
            {
                if (items.Length == 3 && File.Exists(items[1]))
                {
                    if (this.FindDocument(items[1]) == null)
                    {
                        EditorForm editor = new EditorForm(this);
                        editor.LoadFromFile(items[1]);
                        editor.scintilla.GotoPosition(int.Parse(items[2]));
                        editor.scintilla.SetSavePoint();
                        editor.IsHidden = false;
                        editor.Focus();
                        return(editor);
                    }
                    return(null);
                }
                else
                {
                    return(null);
                }
            }
            return(null);
        }
Beispiel #31
0
 private void InsertString(EditorForm padForm, string name, string diagContent)
 {
     try
     {
         padForm.CurrentEditorControl.EMRDoc._MoveRight();
         padForm.CurrentEditorControl.EMRDoc._InserString(diagContent);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #32
0
        static int Main(string[] args)
        {
            string firstArg = (args.Length < 1) ? "-w" : args[0];

            if (firstArg == "-?" || firstArg == "/?" || firstArg == "-help")
            {
                ShowHelp();
                return(1);
            }

            int  width = -1, height = -1;
            bool showWindow = args.Length == 0;

            for (int i = 0; i < args.Length;)
            {
                if (args[i] == "-w")
                {
                    showWindow = true;
                    i++;
                    continue;
                }
                if (args[i] == "-s")
                {
                    i++;
                    string widthText  = TakeNextArg(args, ref i);
                    string heightText = TakeNextArg(args, ref i);
                    if (widthText == null || heightText == null ||
                        !Int32.TryParse(widthText, out width) ||
                        !Int32.TryParse(heightText, out height))
                    {
                        ShowHelp();
                        return(1);
                    }
                }
            }

            if (showWindow)
            {
                var form = new EditorForm();
                if (width > 0)
                {
                    //form.ClientSize = new System.Drawing.Size(width, height);
                    form.Size = new System.Drawing.Size(width, height);
                }
                form.ShowDialog();
                return(0);
            }

            PrintOutTokenColors(args[0]);

            return(0);
        }
Beispiel #33
0
        public SearchPanel(EditorForm editorForm, IconMenuItem editMenu)
        {
            this.editorForm = editorForm;
            this.editMenu = editMenu;

            cancelMenuItem = new IconMenuItem();
            cancelMenuItem.Text = "Cancel Find";
            cancelMenuItem.Click += new EventHandler(cancelMenuItem_Click);
            cancelMenuItem.Shortcut = Shortcut.CtrlC;
            cancelMenuItem.ShowShortcut = true;

            InitializeComponent();
        }
Beispiel #34
0
        protected void ShowForm(File file, TextureFile textureFile)
        {
            var view = new TextureEditView();
            
            var controller = new TextureEditController(view);
            controller.TextureFile = textureFile;

            using (var form = new EditorForm())
            {
                form.SetFilename(file.Name);
                form.SetControl(view);

                controller.SaveAndClose += ((sender, e) => SaveAndClose(form, textureFile, file));

                form.ShowDialog();
            }

            textureFile.Dispose();
        }
Beispiel #35
0
        protected virtual void SaveAndClose(EditorForm form, TextureFile textureFile, File file)
        {
            using (new WaitCursor(form))
            {
                var msSave = new MemoryStream();
                try
                {
                    textureFile.Save(msSave);

                    file.SetData(msSave.ToArray());
                }
                finally
                {
                    msSave.Close();
                }
            }

            form.Close();
        }
Beispiel #36
0
        public OutputPanel(EditorForm editorForm, IconMenuItem buildMenu)
        {
            this.editorForm = editorForm;
            this.buildMenu = buildMenu;

            TabStop = true;

            outputTextBox = new OutputTextbox();

            outputTextBox.Dock = DockStyle.Fill;
            outputTextBox.ScrollBars = RichTextBoxScrollBars.Both;
            outputTextBox.WordWrap = WixEditSettings.Instance.WordWrapInResultsPanel;
            outputTextBox.AllowDrop = false;

            Controls.Add(outputTextBox);

            outputTextBox.TabStop = true;
            outputTextBox.HideSelection = false;

            outputTextBox.MouseUp += new MouseEventHandler(outputTextBox_MouseDown);

            doubleClickTimer.Interval = 100;
            doubleClickTimer.Tick += new EventHandler(doubleClickTimer_Tick);

            cancelMenuItem = new IconMenuItem();
            cancelMenuItem.Text = "Cancel Action";
            cancelMenuItem.Click += new EventHandler(cancelMenuItem_Click);
            cancelMenuItem.Shortcut = Shortcut.CtrlC;
            cancelMenuItem.ShowShortcut = true;

            invokeClearRTF = new DelegateClearRtf(ClearRtf);
            invokeOutput = new DelegateOutput(Output);
            invokeOutputLine = new DelegateOutputLine(OutputLine);
            invokeOutputStart = new DelegateOutputStart(OutputStart);
            invokeOutputDone = new DelegateOutputDone(OutputDone);
            invokeProcessDone = new DelegateProcessDone(ProcessDone);
        }
        //-----------------------------------------------------------------------------
        // Constructors
        //-----------------------------------------------------------------------------
        public EditorControl(EditorForm editorForm)
        {
            this.editorForm		= editorForm;

            //this.propertyGridControl	= null;
            this.worldFilePath	= String.Empty;
            this.worldFileName	= "untitled";
            this.world			= null;
            this.level			= null;
            this.tileset		= null;
            this.zone			= null;
            this.rewardManager	= null;
            this.inventory		= null;
            this.timer			= null;
            this.ticks			= 0;
            this.roomSpacing	= 1;
            this.playAnimations	= false;
            this.isInitialized	= false;
            this.hasMadeChanges	= false;
            this.needsRecompiling	= false;
            this.compileTask		= null;
            this.compileCallback	= null;

            this.currentLayer				= 0;
            this.currentToolIndex			= 0;
            this.aboveTileDrawMode			= TileDrawModes.Fade;
            this.belowTileDrawMode			= TileDrawModes.Fade;
            this.showRewards				= true;
            this.showGrid					= false;
            this.showEvents					= false;
            this.highlightMouseTile			= true;
            this.selectedRoom				= -Point2I.One;
            this.selectedTilesetTile		= Point2I.Zero;
            this.selectedTilesetTileData	= null;
            this.playerPlaceMode			= false;
        }
Beispiel #38
0
        private void InnerStart()
        {
            EditorForm newForm = new EditorForm(argument);

            Application.Run(newForm);
        }