Beispiel #1
0
        private void createMenuSG()
        {
            this.itemAround  = new DevComponents.DotNetBar.RadialMenuItem();
            this.itemPano    = new DevComponents.DotNetBar.RadialMenuItem();
            this.itemNextPro = new DevComponents.DotNetBar.RadialMenuItem();
            this.itemPrevPro = new DevComponents.DotNetBar.RadialMenuItem();

            this.menuSG.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
                this.itemAround,
                this.itemPano,
                this.itemNextPro,
                this.itemPrevPro
            });
            //
            // itemAround
            //
            this.itemAround.Name        = "itemAround";
            this.itemAround.Symbol      = "";
            this.itemAround.Text        = "FlyAround";
            this.itemAround.TextVisible = false;
            this.itemAround.Tooltip     = "Fly Around View";
            //
            // itemPano
            //
            this.itemPano.Name        = "itemPano";
            this.itemPano.Symbol      = "57779";
            this.itemPano.SymbolSet   = DevComponents.DotNetBar.eSymbolSet.Material;
            this.itemPano.Text        = "Panorama";
            this.itemPano.TextVisible = false;
            this.itemPano.Tooltip     = "Panorama View";
            //
            // itemNextPro
            //
            this.itemNextPro.Name        = "itemNextPro";
            this.itemNextPro.Symbol      = "";
            this.itemNextPro.Text        = "NextPro";
            this.itemNextPro.TextVisible = false;
            this.itemNextPro.Tooltip     = "Next Project";
            //
            // itemPrevPro
            //
            this.itemPrevPro.Name        = "itemPrevPro";
            this.itemPrevPro.Symbol      = "";
            this.itemPrevPro.Text        = "PrevPro";
            this.itemPrevPro.TextVisible = false;
            this.itemPrevPro.Tooltip     = "Previous Project";
        }
Beispiel #2
0
 /// <summary>
 /// Copies the RadialMenuItem specific properties to new instance of the item.
 /// </summary>
 /// <param name="copy">New ProgressBarItem instance.</param>
 internal void InternalCopyToItem(RadialMenuItem copy)
 {
     CopyToItem(copy);
 }
        private void SetRadialMenu()
        {
            Symbol = "\uf040";
            SymbolSize = 14;
            Diameter = 175;

            RadialMenuItem item;

            item = new RadialMenuItem();
            item.Tag = RadialAction.Accept;
            item.Text = "Chấp nhận";
            item.Symbol = "\uf00c";
            Items.Add(item);

            item = new RadialMenuItem();
            Items.Add(item);

            item = new RadialMenuItem();
            item.Tag = RadialAction.Delete;
            item.Text = "Xóa";
            item.Symbol = "\uf00d";
            Items.Add(item);
        }
Beispiel #4
0
 /// <summary>
 /// Returns copy of the item.
 /// </summary>
 public override BaseItem Copy()
 {
     RadialMenuItem copy = new RadialMenuItem();
     this.CopyToItem(copy);
     return copy;
 }
Beispiel #5
0
    private void inituiparams()
    {
        string s_uname = (string)tools.configmng.instance.getval("username");
            if(s_uname != null){username.Text = s_uname;}
            string s_pw = (string)tools.configmng.instance.getval("passwd");
            if (s_pw != null) { password.Text = s_pw; }

            formationcombo.Items.Clear();
            formationcombo.Items.Add(tools.helper.getformationstring(FleetFormation.OneRow));
            formationcombo.Items.Add(tools.helper.getformationstring(FleetFormation.TwoRow));
            formationcombo.Items.Add(tools.helper.getformationstring(FleetFormation.Cicle));
            formationcombo.Items.Add(tools.helper.getformationstring(FleetFormation.TStyle));
            formationcombo.Items.Add(tools.helper.getformationstring(FleetFormation.OneColume));

            formationcombo.SelectedIndex = 1;

            foreach(GridColumn column1 in shiplist.PrimaryGrid.Columns)
            {
                var ec = column1.EditControl;
                if (column1.EditControl.GetType().Equals( typeof(GridImageEditControl)) )
                {
                    (column1.EditControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
                }
                if (column1.RenderControl.GetType().Equals( typeof(GridImageEditControl)) )
                {
                    (column1.RenderControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
                }

            }
            GridColumn c9 = shiplist.PrimaryGrid.Columns[8];
            if (c9 != null)
            {
                c9.EditorType = typeof(ExplorerCommandButton);
            }
            GridColumn c10 = shiplist.PrimaryGrid.Columns[9];
            if(c10 != null)
            {
                c10.EditorType = typeof(GroupCommandButton);
            }
            GridColumn c11 = shiplist.PrimaryGrid.Columns[10];
            if (c11 != null)
            {
                c11.EditorType = typeof(BattleCommandButton);
            }

            List<RadialMenu> lrm = new List<RadialMenu>();
            lrm.Add(radialMenu1);
            lrm.Add(radialMenu2);
            lrm.Add(radialMenu3);
            lrm.Add(radialMenu4);
            string[] ss = { "读取1", "读取2", "读取3", "读取4",
                                "读取5", "读取6", "读取7", "读取8",
                                "保存1", "保存2", "保存3", "保存4",
                                "保存5", "保存6", "保存7", "保存8"};
            int jjj = 1;
            foreach (var llrm in lrm)
            {
                llrm.Symbol = "\uf018";
                llrm.Diameter = 300;

                llrm.Tag = jjj;
                llrm.ItemClick += new EventHandler(llrm_ItemClick);
                int i = 0;
                foreach (string s in ss)
                {
                    if (llrm != null)
                    {
                        var i1 = new RadialMenuItem();
                        i1.Text = s;
                        i1.Symbol = "\uf018";
                        i1.Tag = jjj;
                        llrm.Items.Add(i1);

                    }

                    i++;
                }
                jjj++;
            }

            GridColumn r1 = repairlist.PrimaryGrid.Columns[3];
            if (r1 != null)
            {
                r1.EditorType = typeof(RepairCommandButton);
            }

            GridColumn cr1 = repairlist.PrimaryGrid.Columns[1];
            if (cr1.EditControl.GetType().Equals(typeof(GridImageEditControl)))
            {
                (cr1.EditControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
            }
            if (cr1.RenderControl.GetType().Equals(typeof(GridImageEditControl)))
            {
                (cr1.RenderControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
            }

            GridColumn b1 = buildlist.PrimaryGrid.Columns[3];
            if (b1 != null)
            {
                b1.EditorType = typeof(BuildCommandButton);
            }

            GridColumn cb1 = buildlist.PrimaryGrid.Columns[1];
            if (cb1.EditControl.GetType().Equals(typeof(GridImageEditControl)))
            {
                (cb1.EditControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
            }
            if (cb1.RenderControl.GetType().Equals(typeof(GridImageEditControl)))
            {
                (cb1.RenderControl as GridImageEditControl).ImageSizeMode = ImageSizeMode.Zoom;
            }

            //buttonX1.Image = tools.helper.getScaleAndCropImage("res/png/big_n/1.png"
            //                    , new Rectangle(128+48, 128, 1024 - 256-96, 1024 -128), new Rectangle(0, 0, 192, 256));

            //init shiplist

            GridPanel panel = shiplist.PrimaryGrid;
            panel.Rows.Clear();

            for(int i=0;i<4;i++)
            {
                object[] vals = new object[12];

                vals[0] = i;
                for (int j = 1; j < 7; j++)
                {
                        vals[j] = "";
                }
                vals[7] = "无";
                vals[8] = "远征";
                vals[9] = "命令";
                vals[10] = "战斗";
                vals[11] = "";
                GridRow gr = new GridRow(vals);
                gr.RowHeight = 35;

                panel.Rows.Add(gr);
            }
    }