static void Main(string[] args)
    {
        GArray <int>    ga1 = new GArray <int>(1, 2, 3, 4, 5);
        GArray <double> ga2 = new GArray <double>(1.1, 2.2, 3.3, 4.4, 5.5);

        Console.WriteLine(ga1 + ga2); // [2.1, 4.2, 6.3, 8.4, 10.5]
    }
Beispiel #2
0
        public unsafe NGameVariablesEditor(ArrayList toolwindows)
        {
            this.PUnitChanged = null;
            this.InitializeComponent();
            Toolbar toolbar = new Toolbar((GToolbarItem *)(& < Module >.?items@?1 ???0NGameVariablesEditor@NWorkshop@@Q$AAM@P$AAVArrayList@Collections@System@@@Z@4PAUGToolbarItem@NControls@@A), 24);

            this.tbMain              = toolbar;
            toolbar.Dock             = DockStyle.Top;
            this.tbMain.ButtonClick += new Toolbar.__Delegate_ButtonClick(this.tbGameVariablesEditor_ButtonClick);
            base.Controls.Add(this.tbMain);
            PropertyTree propertyTree = new PropertyTree(2, NewAssetPicker.ObjectType.GameVariablesEditor, null);

            this.GameVarsPropTree = propertyTree;
            this.panel1.Controls.Add(propertyTree);
            this.GameVarsPropTree.Dock = DockStyle.Fill;
            Point location = new Point(0, 0);

            this.GameVarsPropTree.Location = location;
            this.GameVarsPropTree.Name     = "GameVarsPropTree";
            Size size = new Size(250, 435);

            this.GameVarsPropTree.Size         = size;
            this.GameVarsPropTree.TabIndex     = 0;
            this.GameVarsPropTree.Text         = "GameVarsPropTree";
            this.GameVarsPropTree.ItemChanged += new PropertyTree.__Delegate_ItemChanged(this.GameVarsPropTree_ItemChanged);
            this.ToolWindows = toolwindows;
            toolwindows.Add(this);
            this.Modified = false;
            this.UpdateWindowText();
            this.tbMain.SetItemEnable(202, false);
            this.tbMain.SetItemEnable(203, false);
            this.tbMain.SetItemEnable(204, false);
            this.tbMain.SetItemEnable(205, false);
            this.tbMain.SetItemEnable(206, false);
            this.tbMain.SetItemEnable(207, false);
            this.tbMain.SetItemEnable(208, false);
            this.menuEditUndo.Enabled = false;
            this.menuEditRedo.Enabled = false;
            this.menuFileSave.Enabled = false;
            GArray <GStreamBuffer> *ptr = < Module >.@new(12u);
            GArray <GStreamBuffer> *undoArray;

            try
            {
                if (ptr != null)
                {
                    *(int *)ptr = 0;
                    *(int *)(ptr + 4 / sizeof(GArray <GStreamBuffer>)) = 0;
                    *(int *)(ptr + 8 / sizeof(GArray <GStreamBuffer>)) = 0;
                    undoArray = ptr;
                }
                else
                {
                    undoArray = 0;
                }
            }
            catch
            {