Beispiel #1
0
 public byte Refpage_Edit(mpage page)
 {
     this.dpage = page;
     this.tobjs.Clear();
     this.selectobjedits.Clear();
     while (this.allobjedits.Count > 0)
     {
         objedit item = this.allobjedits[0];
         this.allobjedits.Remove(item);
         item.Dispose();
     }
     Hmi.Hmi_ClearTimer();
     Hmi.Hmi_Clearredian(0);
     Hmi.Hmi_ClearHexstr();
     this.BackgroundImage = null;
     if ((this.Myapp.pages.Count != 0) && (page != null))
     {
         this.myapp.dpage = (ushort)page.pageid;
         base.Visible     = false;
         this.LoadAllObj();
         base.Visible = true;
         if ((this.tobjs.Count == 0) && this.objpanel.Visible)
         {
             this.objpanel.Visible = false;
             if (this.Objpanelresize != null)
             {
                 this.Objpanelresize(null, null);
             }
         }
     }
     return(1);
 }
Beispiel #2
0
 public pagelock(mpage mypage_)
 {
     this.mypage      = mypage_;
     this.EnableGlass = false;
     this.InitializeComponent();
     this.Language();
     base.Icon = datasize.Myico;
 }
Beispiel #3
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mpage mpage = this.Myapp.Creatnewpage(true);

            this.Myapp.pages.Add(mpage);
            this.Myapp.RefpageID();
            this.RefList();
            this.selectindex(mpage.pageid);
            if (this.pagecheng != null)
            {
                this.pagecheng(null, null);
            }
        }
Beispiel #4
0
        private void jiaohunziku(int index0, int index1)
        {
            mpage value  = this.Myapp.pages[index0];
            mpage value2 = this.Myapp.pages[index1];

            this.Myapp.pages[index0] = value2;
            this.Myapp.pages[index1] = value;
            this.Myapp.RefpageID();
            this.RefList();
            if (this.pagecheng != null)
            {
                this.pagecheng(null, null);
            }
        }
Beispiel #5
0
 private void copypage()
 {
     if (this.colListBox1.SelectItemindex != -1)
     {
         mpage mpage = this.Myapp.Copypage(this.Myapp.pages[this.colListBox1.SelectItemindex]);
         mpage.mypage.pagelei = 0;
         this.Myapp.pages.Add(mpage);
         this.Myapp.RefpageID();
         this.RefList();
         this.selectindex(this.Myapp.pages.Count - 1);
         if (this.pagecheng != null)
         {
             this.pagecheng(null, null);
         }
     }
     else
     {
         MessageOpen.Show("请选择页面".Language());
     }
 }
Beispiel #6
0
        private void insertpage()
        {
            int   num  = this.colListBox1.SelectItemindex;
            mpage item = this.Myapp.Creatnewpage(true);

            if (this.Myapp.pages.Count == 0 || num < 0 || num >= this.Myapp.pages.Count)
            {
                this.Myapp.pages.Add(item);
                num = this.Myapp.pages.Count - 1;
            }
            else
            {
                this.Myapp.pages.Insert(num, item);
            }
            this.Myapp.RefpageID();
            this.RefList();
            this.selectindex(num);
            if (this.pagecheng != null)
            {
                this.pagecheng(null, null);
            }
        }
Beispiel #7
0
 private void Close()
 {
     try
     {
         this.SaveCodes();
         this.dpage = null;
         this.dobj  = null;
         for (int i = 0; i < this.tabControl1.Tabs.Count; i++)
         {
             this.tabControl1.Tabs[i].Tag = null;
         }
         this.textBox1.Visible       = false;
         this.labetextBox1l1.Visible = false;
         this.label2.Visible         = false;
         this.checkBox1.Visible      = false;
         this.tabControl1.Visible    = false;
     }
     catch (Exception ex)
     {
         MessageOpen.Show("clear attoo errer" + ex.Message);
     }
 }
Beispiel #8
0
 public void Refobj(Myapp_inf app, mpage page, mobj obj)
 {
     if (app == null || page == null || obj == null)
     {
         this.Close();
     }
     else
     {
         if (this.Myapp != null && this.dpage != null && this.dobj != null && this.textBox1.Visible)
         {
             if (this.Myapp == app && this.dpage == page && this.dobj == obj)
             {
                 return;
             }
         }
         if (this.textmsg1 == null)
         {
             this.textmsg1 = new textmsg(this.textBox1, 0);
             this.textBox1.Document.DocumentChanged  += new DocumentEventHandler(this.DocumentChanged);
             this.textBox1.Document.TextArea.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Document_KeyDown);
         }
         this.textmsg1.Myapp = app;
         this.textmsg1.dpage = page;
         this.SaveCodes();
         this.issave = false;
         this.Myapp  = app;
         this.dpage  = page;
         this.dobj   = obj;
         this.refhead();
         if (this.tabControl1.SelectedTab != null && this.tabControl1.SelectedTab.Tag != null)
         {
             this.attload(this.tabControl1.SelectedTab.Tag.ToString().Getint());
         }
         this.issave = true;
     }
 }