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 unsafe void RunStop()
 {
     try
     {
         this.myapp.upapp.runstate = 0;
         this.binpath = null;
         if (this.myapp.upapp.runapptype == runapptype.bianji)
         {
             if (this.myapp.upapp.filesr != null)
             {
                 this.tobjs.Clear();
                 this.selectobjedits.Clear();
                 while (this.allobjedits.Count > 0)
                 {
                     objedit item = this.allobjedits[0];
                     this.allobjedits.Remove(item);
                     item.Dispose();
                 }
                 this.myapp.upapp.filesr.Close();
                 this.myapp.upapp.filesr.Dispose();
                 this.myapp.upapp.filesr = null;
             }
         }
         else if (this.myapp.upapp.runapptype == runapptype.run)
         {
             this.Writedatetimespan();
             this.CloseTimerThread();
             this.ClosemainThread();
             if (this.myapp.upapp.filesr != null)
             {
                 this.myapp.upapp.filesr.Close();
                 this.myapp.upapp.filesr.Dispose();
                 this.myapp.upapp.filesr = null;
             }
         }
         if (this.merrya != null)
         {
             Commake.Comstrbuf      = null;
             this.myapp.mymerry     = null;
             Hmi.Hexstrbuf          = null;
             this.myapp.systimerbuf = null;
             this.myapp.Mycanshus   = null;
             Marshal.FreeHGlobal((IntPtr)this.merrya);
             Commake.Comstrbuf      = null;
             this.myapp.mymerry     = null;
             Hmi.Hexstrbuf          = null;
             this.myapp.systimerbuf = null;
             this.myapp.Mycanshus   = null;
             this.merrya            = null;
         }
         this.Myapp = null;
         this.myapp.upapp.images = null;
     }
     catch (Exception exception)
     {
         MessageOpen.Show(exception.Message);
     }
 }