Exemplo n.º 1
0
Arquivo: WPcs.cs Projeto: burstas/rmps
        private void NewNative(MPcs mPcs)
        {
            var client = new NativeClient();

            TabPage ntp = new TabPage();
            ntp.Text = NativeIndex < 1 ? "本地" : string.Format("本地 ({0})", NativeIndex);
            ntp.ImageKey = CPcs.PCS_TYPE_NATIVE;
            TcMeta.TabPages.Add(ntp);

            var pcs = new PcsView(this, mPcs, client, _UserModel, _DataModel);
            pcs.Init();
            pcs.MetaUri = UcUri;
            pcs.Dock = DockStyle.Fill;
            ntp.Controls.Add(pcs);

            TcMeta.SelectedTab = ntp;
            NativeIndex += 1;
        }
Exemplo n.º 2
0
Arquivo: WPcs.cs Projeto: burstas/rmps
        private void TcMeta_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            int idx = TcMeta.SelectedIndex;
            if (idx < 0)
            {
                return;
            }
            bool isOk = idx != 0;

            var item = _XmlMenu.GetMenuItem("edit");
            if (item != null)
            {
                item.Visible = isOk;
            }

            if (isOk)
            {
                var tab = TcMeta.SelectedTab;
                _CurView = tab.Controls[0] as PcsView;
                _CurView.ShowInfo();
            }
            else
            {
                UcUri.Text = "首页";
                UcUri.Path = "pcs://首页";
                UcUri.Icon = null;

                _CurView = null;
            }
        }
Exemplo n.º 3
0
Arquivo: WPcs.cs Projeto: burstas/rmps
        private void NewKuaipan(MPcs mPcs)
        {
            var client = _PcsList.GetClient(mPcs);

            TabPage ntp = new TabPage();
            ntp.Text = mPcs.UserName;
            ntp.ImageKey = CPcs.PCS_TYPE_KUAIPAN;
            TcMeta.TabPages.Add(ntp);

            var pcs = new PcsView(this, mPcs, client, _UserModel, _DataModel);
            pcs.Init();
            pcs.MetaUri = UcUri;
            pcs.Dock = DockStyle.Fill;
            ntp.Controls.Add(pcs);

            TcMeta.SelectedTab = ntp;
        }