Пример #1
0
	void CreateControls(System.Drawing.Color color)
	{
			tabctrl = new TabControl();
			tabctrl.Dock = DockStyle.Fill;
			tabctrl.Parent = panel2;
			tabctrl.Show();

		using (StreamReader sReader = new StreamReader(playlist_dir+"list.txt"))
        {
			int length = File.ReadAllLines(playlist_dir+"list.txt").Length;
				
			tabpage = new TabPage[length];
			ListView[] listview = new ListView[length];
			ListViewItem[] listviewitem = new ListViewItem[length];
			
          string line;
          int i = 0;
          
          while ((line = sReader.ReadLine()) != null)
                {
          	string[] values = line.Split('|');
          	
          	tabpage[i] = new TabPage(values[0]);
          	tabpage[i].Name = i.ToString();
          	tabpage[i].Parent = tabctrl;
          	tabpage[i].BackColor = color;

          	listview[i] = new ListView();
          	listview[i].Name = "listview"+i.ToString();
          	listview[i].DoubleClick += (lv_DoubleClick);
          	listview[i].Dock = DockStyle.Fill;
          	listview[i].GridLines = true;
          	listview[i].View = View.Details;
          	listview[i].Parent = tabpage[i];
          	listview[i].BackColor = color;
          	listview[i].Columns.Add("Станция",175);
          	LoadLlaylist(values[1],listview[i]);
          	 i = i+1;
             	}
         
           }		
	}
Пример #2
0
        private void showTabPage(TabControl tabcontrol)
        {
            tabcontrol.Location = new Point(-10, -10);
            tabcontrol.Size = new System.Drawing.Size(3000, 3000);
            foreach (Control x in tabcontrol.Controls)
            {
                if (typeof(Label).Equals(x))
                {

                }
            }
            tabcontrol.Show();
        }
Пример #3
0
 public void AddDesigner(string FormFileName)
 {
     FirstCodeGeneration = FormFileName == null;
     if (DesignerAndCodeTabs != null) return;
     DesignerAndCodeTabs = new TabControl();
     DesignerAndCodeTabs.Visible = false;
     Controls.Add(DesignerAndCodeTabs);
     DesignerAndCodeTabs.Dock = DockStyle.Fill;
     DesignerAndCodeTabs.TabPages.Add(PascalABCCompiler.StringResources.Get("VP_MF_M_FORM_TAB"));
     DesignerAndCodeTabs.TabPages.Add(PascalABCCompiler.StringResources.Get("VP_MF_M_PROGRAM_TAB"));
     DesignerPage = DesignerAndCodeTabs.TabPages[0];
     TextPage = DesignerAndCodeTabs.TabPages[1];
     Controls.Remove(basePanel);
     TextPage.Controls.Add(basePanel);
     MainForm.AddToolBox();
     MainForm.AddPropertiesWindow();
     Designer = new FormsDesignerViewContent(this);
     Designer.LoadDesigner(FormFileName);
     DesignerAndCodeTabs.SelectedIndexChanged += tabControl_SelectedIndexChanged;
     Designer.Modify += SetDocumentChanged;
     Control designerSurface = Designer.DesignSurface.View as Control;
     designerSurface.Dock = DockStyle.Fill;
     DesignerPage.Controls.Add(designerSurface);
     FormsDesignerViewContent.PropertyPad.SetActiveContainer(Designer.PropertyContainer);
     DesignerAndCodeTabs.Show();
     MainForm.UpdateDesignerIsActive();
     //MainForm.UpdateUndoRedoEnabled(); //roman//
 }