Beispiel #1
0
 private void Open(string filename)
 {
     using (ReoGridEditor editor = new ReoGridEditor())
     {
         editor.CurrentFilePath = filename;
         editor.ShowDialog();
     }
 }
Beispiel #2
0
        private static void Preload()
        {
            try
            {
                Cursor.Current = Cursors.AppStarting;

                // preload to improve performance when first time to open demo
                object preload = ResourcePoolManager.Instance;
                preload = BorderPainter.Instance;

                unvell.ReoScript.ScriptRunningMachine srm = new ReoScript.ScriptRunningMachine();
                srm.Run("eval('true');");

                ReoGridEditor grid = new ReoGridEditor();
                grid.Dispose();
            }
            catch { }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Beispiel #3
0
        private void snowWhiteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (ReoGridEditor editor = new ReoGridEditor())
            {
                ReoGridControlStyle rgcs = new ReoGridControlStyle(Color.LightSkyBlue, Color.White, false);
                rgcs.SetColor(ReoGridControlColors.SelectionBorder, Color.SkyBlue);
                rgcs.SetColor(ReoGridControlColors.SelectionFill, Color.FromArgb(30, Color.Blue));
                rgcs.SetColor(ReoGridControlColors.GridLine, Color.FromArgb(220, 220, 255));
                rgcs.SetColor(ReoGridControlColors.GridBackground, Color.White);
                editor.Grid.SetControlStyle(rgcs);

                editor.ShowDialog();
            }
        }
Beispiel #4
0
        private void Open(string filename)
        {
            try
            {
                Cursor = Cursors.WaitCursor;

                using (ReoGridEditor editor = new ReoGridEditor())
                {
            #if DEBUG
                    editor.CurrentFilePath = System.IO.Path.Combine("..\\..\\..\\Samples\\", filename);
            #else
                    editor.CurrentFilePath = filename;
            #endif
                    editor.ShowDialog();
                }
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Beispiel #5
0
 private void goldSilverToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (ReoGridEditor editor = new ReoGridEditor())
     {
         ReoGridControlStyle rgcs = new ReoGridControlStyle(Color.White, Color.DarkOrange, false);
         rgcs.SetColor(ReoGridControlColors.GridBackground, Color.DimGray);
         rgcs.SetColor(ReoGridControlColors.GridLine, Color.Gray);
         editor.Grid.SetControlStyle(rgcs);
         editor.ShowDialog();
     }
 }
Beispiel #6
0
        private void button25_Click(object sender, EventArgs e)
        {
            using (ReoGridEditor editor = new ReoGridEditor())
            {
                editor.Grid.Script =
            @"// Joke sample: reoquery

            function reo(cell) {
              this.cell = cell;

              this.val = function(str) {
            if(__args__.length == 0) {
              return this.cell.data;
            } else {
              this.cell.data = str;
              return this;
            }
              };

              this.style = function(key, value) {
            if (__args__.length == 1) {
              return this.cell.style[key];
            } else {
              this.cell.style[key] = value;
              return this;
            }
              };
            }

            script.$ = function(r, c) {
              return new reo( c == null ? grid.getCell(r) : grid.getCell(r, c));
            };

            // call grid like jquery
            $('B4').val('hello').style('backgroundColor', 'yellow');
            $(3, 2).val('world!').style('backgroundColor', 'lightgreen');

            ";
                editor.Grid[1, 1] = "Please see the script editor!";
                editor.NewDocumentOnLoad = false;
                editor.ShowDialog();
            }
        }