Ejemplo n.º 1
0
        private void 创建主边框ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmMainSet fc = new frmMainSet();

            fc.ShowDialog();
            if (cm.newnode != null)
            {
                trvTemperture.SelectedNode.Nodes.Add((TreeNode)cm.newnode.Clone());

                ClsMainFrame tem = (ClsMainFrame)cm.newnode.Tag;
                cm.MaxWidth  = tem.Twidth;
                cm.MaxHeight = tem.Theight;
                this.picTemperatureShow.Width  = tem.Twidth;
                this.picTemperatureShow.Height = tem.Theight;

                cm.UpdateXml(0, cm.newnode, cm.XmlDoc, trvTemperture);
                picTemperatureShow.Refresh();
            }
        }
Ejemplo n.º 2
0
 private void btnSure_Click(object sender, System.EventArgs e)
 {
     try
     {
         ClsMainFrame mainfram = new ClsMainFrame();
         mainfram.Twidth    = Convert.ToInt16(numD_Width.Value);
         mainfram.Theight   = Convert.ToInt16(numD_Width.Height);
         mainfram.Day_x     = 0;
         mainfram.Day_y     = 0;
         mainfram.Daywidth  = 72;
         mainfram.Timewidth = 12;
         TreeNode tn = new TreeNode();
         tn.Tag     = mainfram;
         tn.Text    = "主区域";
         tn.Name    = "m1";
         cm.newnode = tn;
         this.Close();
     }
     catch
     {
         cm.newnode = null;
     }
 }