public bool GetEnableVS2012Style(ToolStrip strip)
    {
        if (strips.ContainsKey(strip))
                return strips[strip].EnableVS2012Style;

            return false;
    }
Esempio n. 2
0
	public MainForm ()
	{
		// 
		// _eventsText
		// 
		_eventsText = new TextBox ();
		_eventsText.Dock = DockStyle.Top;
		_eventsText.Height = 150;
		_eventsText.Multiline = true;
		_eventsText.ScrollBars = ScrollBars.Vertical;
		Controls.Add (_eventsText);
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Dock = DockStyle.Top;
		_toolStrip.Click += new EventHandler (ToolStrip_Click);
		_toolStrip.ItemClicked += ToolStrip_ItemClicked;
		Controls.Add (_toolStrip);
		// 
		// _fileMenuItem
		// 
		_fileMenuItem = new ToolStripMenuItem ();
		_fileMenuItem.Text = "&File";
		_fileMenuItem.Click += FileMenuItem_Click;
		_toolStrip.Items.Add (_fileMenuItem);
		// 
		// _newFileMenuItem
		// 
		_newFileMenuItem = new ToolStripMenuItem ();
		_newFileMenuItem.Text = "&New";
		_newFileMenuItem.Click += NewFileMenuItem_Click;
		_fileMenuItem.DropDownItems.Add (_newFileMenuItem);
		// 
		// _editMenuItem
		// 
		_editMenuItem = new ToolStripMenuItem ();
		_editMenuItem.Text = "&Edit";
		_editMenuItem.Click += EditMenuItem_Click;
		_toolStrip.Items.Add (_editMenuItem);
		// 
		// _clearButton
		// 
		_clearButton = new Button ();
		_clearButton.Location = new Point (110, 185);
		_clearButton.Text = "Clear";
		_clearButton.Click += ClearButton_Click;
		Controls.Add (_clearButton);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 220);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82775";
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 3
0
        public ConnectionView(ITimeAdvanceToolStripButton timeAdvanceButton)
        {
            InitializeComponent();

            toolBar = new ToolStrip(toolStrip);

            timeAdvanceButton.Name = "timeAdvanceButton";
            timeAdvanceButton.Name = "toolStripButton1";
            timeAdvanceButton.Text = "timeAdvanceButton";

            toolBar.Items.Add(timeAdvanceButton);
        }
    public ToolStripExam()
    {
        this.Text = "ToolStrip 예제";

        // 이미지리스트 초기화
        ImageList imglst = new ImageList();
        imglst.TransparentColor = Color.Black;
        imglst.Images.Add("Copy", new Bitmap(GetType(), "ToolStripExam.CopyHS.bmp"));
        imglst.Images.Add("CopyFolder", new Bitmap(GetType(), "ToolStripExam.CopyFolderHS.bmp"));
        imglst.Images.Add("Cut", new Bitmap(GetType(), "ToolStripExam.CutHS.bmp"));

        // 툴바 생성
        ToolStrip tool = new ToolStrip();
        tool.Parent = this;     // 부모
        tool.ImageList = imglst;// 이미지 리스트 설정

        // 1. 툴바에 버튼 생성
        copy_btn = new ToolStripButton();
        copy_btn.ToolTipText = "복사";
        copy_btn.Image = imglst.Images[0];  // 이미지 설정1
        copy_btn.Click += EventProc;
        tool.Items.Add(copy_btn);

        // 2. 툴바에 버튼 생성
        copyfolder_btn = new ToolStripButton();
        copyfolder_btn.ToolTipText = "디렉토리 복사";
        copyfolder_btn.ImageKey = "CopyFolder"; //이미지설정2
        copyfolder_btn.Click += EventProc;
        tool.Items.Add(copyfolder_btn);

        // 3. 메뉴 구분선 넣기
        ToolStripSeparator item_sep = new ToolStripSeparator();
        tool.Items.Add(item_sep);

        // 4. 툴바에 버튼 생성
        cut_btn = new ToolStripButton();
        cut_btn.ToolTipText = "오려두기";
        cut_btn.ImageIndex = 2;         // 이미지설정3
        cut_btn.Click += EventProc;
        tool.Items.Add(cut_btn);

        // 5. 툴바에 콤보박스 추가
        txt_box = new ToolStripComboBox();
        txt_box.ToolTipText = "글꼴 선택";
        txt_box.Text = "글꼴 선택";
        txt_box.Items.Add("궁서체");
        txt_box.Items.Add("돋움체");
        txt_box.Items.Add("바탕체");
        txt_box.Click += FontDrawProc;
        tool.Items.Add(txt_box);
    }
Esempio n. 5
0
	public MainForm ()
	{
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.AllowItemReorder = true;
		_toolStrip.Dock = DockStyle.Top;
		_toolStrip.Height = 100;
		_toolStrip.Margin = new Padding (5);
		_toolStrip.Stretch = true;
		_toolStrip.TabStop = true;
		Controls.Add (_toolStrip);
		// 
		// _textBox1
		// 
		_textBox1 = new ToolStripTextBox ();
		_textBox1.Margin = new Padding (5);
		_textBox1.Size = new Size(130, 60);
		_textBox1.Text = "1";
		_textBox1.ToolTipText = "Mono";
		_toolStrip.Items.Add (_textBox1);
		// 
		// _textBox2
		// 
		_textBox2 = new ToolStripTextBox ();
		_textBox2.Margin = new Padding (5);
		_textBox2.Size = new Size(130, 60);
		_textBox2.Text = "2";
		_toolStrip.Items.Add (_textBox2);
		// 
		// _autoToolTipCheckBox
		// 
		_autoToolTipCheckBox = new CheckBox ();
		_autoToolTipCheckBox.Checked = false;
		_autoToolTipCheckBox.Location = new Point (8, 35);
		_autoToolTipCheckBox.Size = new Size (100, 20);
		_autoToolTipCheckBox.Text = "AutoToolTip";
		_autoToolTipCheckBox.CheckedChanged += new EventHandler (AutoToolTipCheckBox_CheckedChanged);
		Controls.Add (_autoToolTipCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 60);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82750";
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 6
0
	public MainForm ()
	{
		ComponentResourceManager resources = new ComponentResourceManager (typeof (MainForm));
		SuspendLayout ();
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Location = new Point (0, 24);
		_toolStrip.Name = "_toolStrip";
		_toolStrip.Size = new Size (632, 25);
		_toolStrip.TabIndex = 1;
		_toolStrip.Text = "ToolStrip";
		Controls.Add (_toolStrip);
		// 
		// _newButton
		// 
		_newButton = new ToolStripButton ();
		_newButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		_newButton.Image = ((Image) (resources.GetObject ("_newButton.Image")));
		_newButton.ImageTransparentColor = Color.Black;
		_newButton.Text = "New";
		_toolStrip.Items.Add (_newButton);
		// 
		// _openButton
		// 
		_openButton = new ToolStripButton ();
		_openButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		_openButton.Image = ((Image) (resources.GetObject ("_openButton.Image")));
		_openButton.ImageTransparentColor = Color.Black;
		_openButton.Text = "Open";
		_openButton.Click += new System.EventHandler (OpenFile);
		_toolStrip.Items.Add (_openButton);
		// 
		// MainForm
		// 
		AutoScaleDimensions = new SizeF (6F, 13F);
		AutoScaleMode = AutoScaleMode.Font;
		ClientSize = new Size (300, 300);
		IsMdiContainer = true;
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #81568";
		Load += new EventHandler (MainForm_Load);
		ResumeLayout (false);
		PerformLayout ();
	}
Esempio n. 7
0
	public MainForm ()
	{
#if NET_2_0
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Location = new Point (0, 24);
		_toolStrip.Size = new Size (632, 25);
		_toolStrip.TabIndex = 1;
		_toolStrip.Text = "ToolStrip";
		Controls.Add (_toolStrip);
		// 
		// _toolStripComboBox
		// 
		_toolStripComboBox = new ToolStripComboBox ();
		_toolStripComboBox.Text = "ComboBox";
		_toolStrip.Items.Add (_toolStripComboBox);
#endif
		// 
		// _comboBox
		// 
		_comboBox = new ComboBox ();
		_comboBox.Location = new Point (8, 40);
		_comboBox.Size = new Size (100, 20);
		_comboBox.Text = "ComboBox";
		Controls.Add (_comboBox);
		// 
		// _enabledCheckBox
		// 
		_enabledCheckBox = new CheckBox ();
		_enabledCheckBox.Checked = true;
		_enabledCheckBox.Location = new Point (8, 75);
		_enabledCheckBox.Size = new Size (70, 20);
		_enabledCheckBox.Text = "Enabled";
		_enabledCheckBox.CheckedChanged += new EventHandler (EnabledCheckBox_CheckedChanged);
		Controls.Add (_enabledCheckBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 100);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82654";
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 8
0
	public MainForm ()
	{
		//
		// _table
		//
		_table = new TableLayoutPanel ();
		_table.ColumnCount = 1;
		_table.ColumnStyles.Add (new ColumnStyle (SizeType.Percent, 100F));
		_table.Dock = DockStyle.Fill;
		_table.RowCount = 1;
		_table.RowStyles.Add (new RowStyle ());
		Controls.Add (_table);
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.AllowItemReorder = true;
		_toolStrip.Dock = DockStyle.Fill;
		_toolStrip.Margin = new Padding (5);
		_toolStrip.Stretch = true;
		_toolStrip.TabStop = false;
		_table.Controls.Add (_toolStrip, 0, 0);
		// 
		// _textBox
		// 
		_textBox = new ToolStripTextBox ();
		_textBox.AcceptsReturn = true;
		_textBox.AcceptsTab = true;
		_textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
		_textBox.AutoCompleteSource = AutoCompleteSource.RecentlyUsedList;
		_textBox.AutoSize = false;
		_textBox.AutoToolTip = true;
		_textBox.Multiline = true;
		_textBox.Margin = new Padding (5);
		_textBox.Size = new Size(265, 60);
		_textBox.Text = "1";
		_toolStrip.Items.Add (_textBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (270, 165);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #325969";
		Load += new EventHandler (MainForm_Load);
	}
    public void SetEnableVS2012Style(ToolStrip strip, bool enable)
    {
        var apply = false;
            ToolStripProperties properties = null;

            if (!strips.ContainsKey(strip))
            {
                properties = new ToolStripProperties(strip) { EnableVS2012Style = enable };
                strips.Add(strip, properties);
                apply = true;
            }
            else
            {
                properties = strips[strip];
                apply = properties.EnableVS2012Style != enable;
            }

            if (apply)
            {
                //ToolStripManager.Renderer = enable ? VS2012Renderer : DefaultRenderer;
                strip.Renderer = enable ? VS2012Renderer : DefaultRenderer;
                properties.EnableVS2012Style = enable;
            }
    }
Esempio n. 10
0
 static public void ResizeObject(ref ResizeInfo R, ToolStrip ts, float sngRow, float sngCol, float sngNRows, float sngNCols, float adjustFont = 1)
 {
     ts.Location = getLocation(R, ts, sngRow, sngCol);
     ts.Size     = new System.Drawing.Size((int)(sngNCols * R.W), (int)(sngNRows * R.H));
 }
Esempio n. 11
0
	public MainForm ()
	{
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Renderer = new ToolStripSystemRenderer ();
		Controls.Add (_toolStrip);
		// 
		// _toolStripButton1
		// 
		_toolStripButton1 = new ToolStripButton ();
		_toolStripButton1.Text = "1";
		_toolStrip.Items.Add (_toolStripButton1);
		// 
		// _toolStripButton2
		// 
		_toolStripButton2 = new ToolStripButton ();
		_toolStripButton2.Checked = true;
		_toolStripButton2.Text = "2";
		_toolStrip.Items.Add (_toolStripButton2);
		// 
		// _toolStripButton3
		// 
		_toolStripButton3 = new ToolStripButton ();
		_toolStripButton3.Text = "3";
		_toolStrip.Items.Add (_toolStripButton3);
		// 
		// _checkedGroupBox
		// 
		_checkedGroupBox = new GroupBox ();
		_checkedGroupBox.Location = new Point (20, 35);
		_checkedGroupBox.Size = new Size (260, 85);
		_checkedGroupBox.Text = "Checked";
		Controls.Add (_checkedGroupBox);
		// 
		// _button1CheckBox
		// 
		_button1CheckBox = new CheckBox ();
		_button1CheckBox.Checked = _toolStripButton1.Checked;
		_button1CheckBox.Location = new Point (8, 16);
		_button1CheckBox.Text = "1";
		_checkedGroupBox.Controls.Add (_button1CheckBox);
		_button1CheckBox.CheckedChanged += delegate (object sender, EventArgs e) {
			_toolStripButton1.Checked = _button1CheckBox.Checked;
		};
		// 
		// _button2CheckBox
		// 
		_button2CheckBox = new CheckBox ();
		_button2CheckBox.Checked = _toolStripButton2.Checked;
		_button2CheckBox.Location = new Point (8, 35);
		_button2CheckBox.Text = "2";
		_checkedGroupBox.Controls.Add (_button2CheckBox);
		_button2CheckBox.CheckedChanged += delegate (object sender, EventArgs e) {
			_toolStripButton2.Checked = _button2CheckBox.Checked;
		};
		// 
		// _button3CheckBox
		// 
		_button3CheckBox = new CheckBox ();
		_button3CheckBox.Checked = _toolStripButton3.Checked;
		_button3CheckBox.Location = new Point (8, 55);
		_button3CheckBox.Text = "3";
		_checkedGroupBox.Controls.Add (_button3CheckBox);
		_button3CheckBox.CheckedChanged += delegate (object sender, EventArgs e) {
			_toolStripButton3.Checked = _button3CheckBox.Checked;
		};
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 140);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82151";
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 12
0
                private void AddToolStripItems()
                {
                    try
                    {
                        ToolStrip customToolStrip = new ToolStrip();
                        customToolStrip.Items.Add(btnShowProperties);
                        customToolStrip.Items.Add(btnShowInheritance);
                        customToolStrip.Items.Add(btnShowDefaultProperties);
                        customToolStrip.Items.Add(btnShowDefaultInheritance);
                        customToolStrip.Items.Add(btnHostStatus);
                        customToolStrip.Items.Add(btnIcon);
                        customToolStrip.Show();

                        ToolStrip propertyGridToolStrip = new ToolStrip();

                        ToolStrip toolStrip = default(ToolStrip);
                        foreach (Control control in pGrid.Controls)
                        {
                            toolStrip = control as ToolStrip;

                            if (toolStrip != null)
                            {
                                propertyGridToolStrip = toolStrip;
                                break; // TODO: might not be correct. Was : Exit For
                            }
                        }

                        if (toolStrip == null)
                        {
                            Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, Language.strCouldNotFindToolStripInFilteredPropertyGrid, true);
                            return;
                        }

                        if (!_originalPropertyGridToolStripItemCountValid)
                        {
                            _originalPropertyGridToolStripItemCount = propertyGridToolStrip.Items.Count;
                            _originalPropertyGridToolStripItemCountValid = true;
                        }
                        Debug.Assert(_originalPropertyGridToolStripItemCount == 5);

                        // Hide the "Property Pages" button
                        propertyGridToolStrip.Items[_originalPropertyGridToolStripItemCount - 1].Visible = false;

                        int expectedToolStripItemCount = _originalPropertyGridToolStripItemCount + customToolStrip.Items.Count;
                        if (propertyGridToolStrip.Items.Count != expectedToolStripItemCount)
                        {
                            propertyGridToolStrip.AllowMerge = true;
                            ToolStripManager.Merge(customToolStrip, propertyGridToolStrip);
                        }
                    }
                    catch (Exception ex)
                    {
                        Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, Language.strConfigUiLoadFailed + Constants.vbNewLine + ex.Message, true);
                    }
                }
 public void Join(ToolStrip toolStripToDrag, System.Drawing.Point location)
 {
 }
Esempio n. 14
0
    public MainIDE(Splash splash)
    {
        BackColor = Color.FromArgb(255, 230, 230, 230);
        ForeColor = Color.Black;

        Icon = Icons.GetIcon("icons.logo", 32);
        Text = "OS Development Studio";

        //trigger initialization of the text editor core
        TextEditor.Initialize();

        //once the form has loaded, send a signal to the
        //splash screen to close.
        Load += delegate(object sender, EventArgs e) {
            splash.Ready();
            Focus();
        };

        //load the size and location of the window the last time the application
        //was running.
        if (RuntimeState.ObjectExists("mainIDE.windowRect")) {
            RuntimeState.RECTANGLE rect = (RuntimeState.RECTANGLE)RuntimeState.GetObject(
                "mainIDE.windowRect",
                typeof(RuntimeState.RECTANGLE));
            //StartPosition = FormStartPosition.Manual;
            Location = new Point(rect.X, rect.Y);
            Size = new Size(rect.Width, rect.Height);

            //restore the window state
            if (RuntimeState.ObjectExists("mainIDE.windowState")) {
                WindowState = (FormWindowState)(byte)RuntimeState.GetObject(
                    "mainIDE.windowState",
                    typeof(byte));
            }
        }
        else {
            //set the initial size of the window to 75% of the current screen
            Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
            Size = new Size(
                    (int)(screenSize.Width * 0.75),
                    (int)(screenSize.Height * 0.75));
            StartPosition = FormStartPosition.CenterScreen;
        }

        #region Create the initial panels
        p_StatusStrip = new StatusStrip { BackColor = BackColor };
        p_WorkingArea = new Panel { Dock = DockStyle.Fill };
        ToolStrip menu = new ToolStrip {
            GripStyle = ToolStripGripStyle.Hidden,
            Renderer = new toolStripRenderer(),
            BackColor = BackColor,
            ForeColor = ForeColor
        };
        p_Menu = menu;
        Controls.Add(menu);
        Controls.Add(p_StatusStrip);
        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();
        #endregion

        #region Menu
        /*Build the main menu items*/
        menu.Items.Add(new ToolStripMenuItem("File", null, getFileMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Edit", null, getEditMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Build", null, getBuildMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Tools", null, getToolsMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Help", null, getHelpMenuItems()));

        /*Build shortcuts*/
        menu.Items.Add(new ToolStripSeparator());
        p_MenuStripRunButton = menu.Items.Add(null, Icons.GetBitmap("tools.run", 16), menu_build_run);
        menu.Items.Add(null, Icons.GetBitmap("tools.stop", 16), menu_build_stop);
        menu.Items.Add(new ToolStripSeparator());
        menu.Items.Add(null, Icons.GetBitmap("tools.build", 16), menu_build_build);
        #endregion

        //initialize the components
        initializeComponentSkeleton();
        initializeSolutionBrowser();
        initializeFileEditor();
        initializeOutputWindow();
        initializeStatusStrip();

        //create a UI update timer
        Timer updTimer = new Timer() {
            Interval = 30,
            Enabled = true
        };
        updTimer.Tick += uiUpdate;

        //clean up
        p_WorkingArea.BringToFront();
        p_SaveStateEnabled = true;
    }
Esempio n. 15
0
	public MainForm()
	{
		// 
		// _rightPanel
		// 
		_rightPanel = new ToolStripPanel ();
		_rightPanel.Dock = DockStyle.Right;
		Controls.Add (_rightPanel);
		// 
		// _leftPanel
		// 
		_leftPanel = new ToolStripPanel ();
		_leftPanel.Dock = DockStyle.Left;
		Controls.Add (_leftPanel);
		// 
		// _bottomPanel
		// 
		_bottomPanel = new ToolStripPanel ();
		_bottomPanel.Dock = DockStyle.Bottom;
		Controls.Add (_bottomPanel);
		// 
		// _topPanel
		// 
		_topPanel = new ToolStripPanel ();
		_topPanel.Dock = DockStyle.Top;
		Controls.Add (_topPanel);
		// 
		// _topStrip
		// 
		_topStrip = new ToolStrip ();
		_topStrip.Items.Add ("Top");
		_topPanel.Join (_topStrip);
		// 
		// _bottomStrip
		// 
		_bottomStrip = new ToolStrip ();
		_bottomStrip.Items.Add ("Bottom");
		_bottomPanel.Join (_bottomStrip);
		// 
		// _leftStrip
		// 
		_leftStrip = new ToolStrip ();
		_leftStrip.Items.Add ("Left");
		_leftPanel.Join (_leftStrip);
		// 
		// _leftStrip
		// 
		_rightStrip = new ToolStrip();
		_rightStrip.Items.Add ("Right");
		_rightPanel.Join (_rightStrip);
		// 
		// _menuStrip
		// 
		_menuStrip = new MenuStrip ();
		_menuStrip.Dock = DockStyle.Top;
		Controls.Add (_menuStrip);
		// 
		// _windowMenu
		// 
		_windowMenu = new ToolStripMenuItem ("Window");
		_menuStrip.MdiWindowListItem = _windowMenu;
		((ToolStripDropDownMenu) (_windowMenu.DropDown)).ShowImageMargin = false;
		((ToolStripDropDownMenu) (_windowMenu.DropDown)).ShowCheckMargin = true;
		_menuStrip.Items.Add (_windowMenu);
		// 
		// _newWindowMenu
		// 
		_newWindowMenu = new ToolStripMenuItem ("New", null, new EventHandler (NewWindowMenu_Click));
		_windowMenu.DropDownItems.Add (_newWindowMenu);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 300);
		IsMdiContainer = true;
		Location = new Point (250, 100);
		MainMenuStrip = _menuStrip;
		StartPosition = FormStartPosition.Manual;
		Text = "bug #341998";
		Load += new EventHandler (MainForm_Load);
	}
        // **************
        // Public Methods
        // **************

        /// <summary>
        /// Creates a new instance of the MenuToolStripCustomizer class and uses it to modernize the selected
        /// Drop Down Menus and all their child drop downs.
        /// </summary>
        /// <param name="backColor">The background color of the menus.</param>
        /// <param name="selectedColor">The background color of selected menus.</param>
        /// <param name="foreColor">The foreground (text) color of the menus.</param>
        /// <param name="addedHeight">The extra height to add to each menu.</param>
        /// <param name="opacity">The opacity of the menus.</param>
        /// <param name="menuStrip">A main menu to modernize.</param>
        /// <param name="dropDowns">The list of drop down menus to modernize.</param>
        /// <returns>The MenuToolStripCustomizer object that was used to modernize the menus.</returns>
        public static MenuToolStripCustomizer Modernize(
            Color backColor,
            Color selectedColor,
            Color foreColor,
            int addedHeight,
            double opacity,
            ToolStrip menuStrip,
            params ToolStripDropDown[] dropDowns)
        {
            MenuToolStripCustomizer customizer = new MenuToolStripCustomizer(backColor, selectedColor, foreColor, addedHeight);

            // Use a stack to navigate through all-level children dropdowns
            Stack <ToolStripDropDown> dropDownsStack = new Stack <ToolStripDropDown>();

            foreach (ToolStripDropDown dropDown in dropDowns)
            {
                dropDownsStack.Push(dropDown);
            }

            if (menuStrip != null)
            {
                menuStrip.Renderer = customizer;
                if (addedHeight > 0)
                {
                    menuStrip.AutoSize = false;
                    menuStrip.Height  += addedHeight;
                }

                foreach (ToolStripItem item in menuStrip.Items)
                {
                    ToolStripMenuItem menuItem = item as ToolStripMenuItem;
                    if (menuItem != null)
                    {
                        dropDownsStack.Push(menuItem.DropDown);
                    }
                }
            }

            while (dropDownsStack.Count > 0)
            {
                ToolStripDropDown currentDropDown = dropDownsStack.Pop();

                currentDropDown.Renderer = customizer;

                if (opacity < 1)
                {
                    currentDropDown.AllowTransparency = true;
                    currentDropDown.Opacity           = opacity;
                }

                foreach (ToolStripItem item in currentDropDown.Items)
                {
                    if (addedHeight > 0)
                    {
                        item.AutoSize = false;
                        item.Height  += addedHeight;
                    }

                    ToolStripMenuItem menuItem = item as ToolStripMenuItem;
                    if (menuItem != null)
                    {
                        if (menuItem.HasDropDownItems)
                        {
                            dropDownsStack.Push(menuItem.DropDown);
                        }
                    }
                }
            }

            return(customizer);
        }
Esempio n. 17
0
    public MainIDE(Splash splash)
    {
        BackColor = Color.FromArgb(255, 200, 200, 200);
        Icon      = Icons.GetIcon("icons.logo", 32);
        Text      = "OS Development Studio";

        //once the form has loaded, send a signal to the
        //splash screen to close.
        Load += delegate(object sender, EventArgs e) {
            splash.Ready();
            Focus();
        };

        //set the minimum size of the window to 75% of the current screen
        Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;

        MinimumSize = new Size(
            (int)(screenSize.Width * 0.75),
            (int)(screenSize.Height * 0.75));

        //create the initial panels
        StatusStrip status = new StatusStrip();

        p_WorkingArea = new Panel {
            Dock = DockStyle.Fill
        };
        ToolStrip menu = new ToolStrip {
            GripStyle = ToolStripGripStyle.Hidden,
            Renderer  = new ToolStripProfessionalRenderer()
            {
                RoundedEdges = false
            }
        };

        //add the controls
        Controls.Add(menu);
        Controls.Add(status);
        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();

        /*Build the main menu items*/
        ToolStripItem fileMenu = menu.Items.Add("File");

        fileMenu.Click += delegate(object sender, EventArgs e) {
            buildSplitContainer(
                null,
                new Control()
            {
                BackColor = Color.Red
            },
                p_SolutionExplorer);
        };
        ToolStripItem editMenu  = menu.Items.Add("Edit");
        ToolStripItem buildMenu = menu.Items.Add("Build");
        ToolStripItem helpMenu  = menu.Items.Add("Help");

        menu.Items.Add(new ToolStripSeparator());
        ToolStripItem run = menu.Items.Add(Icons.GetBitmap("tools.run", 16));

        run.ToolTipText = "Run";

        /*Test code*/
        Solution solution = new Solution("./testsolution/solution.ossln");

        //initialize the components
        p_SolutionExplorer = new SolutionBrowserControl();
        p_TextEditor       = new TextEditor();
        p_SolutionExplorer.AddSolution(solution);

        //create the components to seperate the different working area
        //components.
        buildSplitContainer(null, null, p_SolutionExplorer);
    }
Esempio n. 18
0
        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(OptionEpicDestinyForm));

            this.NameLbl         = new Label();
            this.NameBox         = new TextBox();
            this.Pages           = new TabControl();
            this.DetailsPage     = new TabPage();
            this.ImmortalityPage = new TabPage();
            this.ImmortalityBox  = new TextBox();
            this.LevelPage       = new TabPage();
            this.LevelList       = new ListView();
            this.LevelHdr        = new ColumnHeader();
            this.LevelToolbar    = new ToolStrip();
            this.LevelEditBtn    = new ToolStripButton();
            this.OKBtn           = new Button();
            this.CancelBtn       = new Button();
            this.PrereqBox       = new TextBox();
            this.PrereqLbl       = new Label();
            this.QuoteBox        = new TextBox();
            this.QuoteLbl        = new Label();
            this.DetailsBox      = new TextBox();
            this.Pages.SuspendLayout();
            this.DetailsPage.SuspendLayout();
            this.ImmortalityPage.SuspendLayout();
            this.LevelPage.SuspendLayout();
            this.LevelToolbar.SuspendLayout();
            base.SuspendLayout();
            this.NameLbl.AutoSize = true;
            this.NameLbl.Location = new Point(12, 15);
            this.NameLbl.Name     = "NameLbl";
            this.NameLbl.Size     = new System.Drawing.Size(38, 13);
            this.NameLbl.TabIndex = 0;
            this.NameLbl.Text     = "Name:";
            this.NameBox.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            this.NameBox.Location = new Point(88, 12);
            this.NameBox.Name     = "NameBox";
            this.NameBox.Size     = new System.Drawing.Size(273, 20);
            this.NameBox.TabIndex = 1;
            this.Pages.Anchor     = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.Pages.Controls.Add(this.DetailsPage);
            this.Pages.Controls.Add(this.ImmortalityPage);
            this.Pages.Controls.Add(this.LevelPage);
            this.Pages.Location      = new Point(12, 64);
            this.Pages.Name          = "Pages";
            this.Pages.SelectedIndex = 0;
            this.Pages.Size          = new System.Drawing.Size(349, 265);
            this.Pages.TabIndex      = 4;
            this.DetailsPage.Controls.Add(this.QuoteBox);
            this.DetailsPage.Controls.Add(this.QuoteLbl);
            this.DetailsPage.Controls.Add(this.DetailsBox);
            this.DetailsPage.Location = new Point(4, 22);
            this.DetailsPage.Name     = "DetailsPage";
            this.DetailsPage.Padding  = new System.Windows.Forms.Padding(3);
            this.DetailsPage.Size     = new System.Drawing.Size(341, 239);
            this.DetailsPage.TabIndex = 0;
            this.DetailsPage.Text     = "Details";
            this.DetailsPage.UseVisualStyleBackColor = true;
            this.ImmortalityPage.Controls.Add(this.ImmortalityBox);
            this.ImmortalityPage.Location = new Point(4, 22);
            this.ImmortalityPage.Name     = "ImmortalityPage";
            this.ImmortalityPage.Padding  = new System.Windows.Forms.Padding(3);
            this.ImmortalityPage.Size     = new System.Drawing.Size(341, 239);
            this.ImmortalityPage.TabIndex = 4;
            this.ImmortalityPage.Text     = "Immortality";
            this.ImmortalityPage.UseVisualStyleBackColor = true;
            this.ImmortalityBox.AcceptsReturn            = true;
            this.ImmortalityBox.AcceptsTab = true;
            this.ImmortalityBox.Dock       = DockStyle.Fill;
            this.ImmortalityBox.Location   = new Point(3, 3);
            this.ImmortalityBox.Multiline  = true;
            this.ImmortalityBox.Name       = "ImmortalityBox";
            this.ImmortalityBox.ScrollBars = ScrollBars.Vertical;
            this.ImmortalityBox.Size       = new System.Drawing.Size(335, 233);
            this.ImmortalityBox.TabIndex   = 1;
            this.LevelPage.Controls.Add(this.LevelList);
            this.LevelPage.Controls.Add(this.LevelToolbar);
            this.LevelPage.Location = new Point(4, 22);
            this.LevelPage.Name     = "LevelPage";
            this.LevelPage.Padding  = new System.Windows.Forms.Padding(3);
            this.LevelPage.Size     = new System.Drawing.Size(341, 239);
            this.LevelPage.TabIndex = 2;
            this.LevelPage.Text     = "Levels";
            this.LevelPage.UseVisualStyleBackColor = true;
            this.LevelList.Columns.AddRange(new ColumnHeader[] { this.LevelHdr });
            this.LevelList.Dock          = DockStyle.Fill;
            this.LevelList.FullRowSelect = true;
            this.LevelList.HeaderStyle   = ColumnHeaderStyle.Nonclickable;
            this.LevelList.HideSelection = false;
            this.LevelList.Location      = new Point(3, 28);
            this.LevelList.MultiSelect   = false;
            this.LevelList.Name          = "LevelList";
            this.LevelList.Size          = new System.Drawing.Size(335, 208);
            this.LevelList.TabIndex      = 1;
            this.LevelList.UseCompatibleStateImageBehavior = false;
            this.LevelList.View         = View.Details;
            this.LevelList.DoubleClick += new EventHandler(this.LevelEditBtn_Click);
            this.LevelHdr.Text          = "Level";
            this.LevelHdr.Width         = 300;
            this.LevelToolbar.Items.AddRange(new ToolStripItem[] { this.LevelEditBtn });
            this.LevelToolbar.Location              = new Point(3, 3);
            this.LevelToolbar.Name                  = "LevelToolbar";
            this.LevelToolbar.Size                  = new System.Drawing.Size(335, 25);
            this.LevelToolbar.TabIndex              = 0;
            this.LevelToolbar.Text                  = "toolStrip1";
            this.LevelEditBtn.DisplayStyle          = ToolStripItemDisplayStyle.Text;
            this.LevelEditBtn.Image                 = (Image)componentResourceManager.GetObject("LevelEditBtn.Image");
            this.LevelEditBtn.ImageTransparentColor = Color.Magenta;
            this.LevelEditBtn.Name                  = "LevelEditBtn";
            this.LevelEditBtn.Size                  = new System.Drawing.Size(31, 22);
            this.LevelEditBtn.Text                  = "Edit";
            this.LevelEditBtn.Click                += new EventHandler(this.LevelEditBtn_Click);
            this.OKBtn.Anchor                      = AnchorStyles.Bottom | AnchorStyles.Right;
            this.OKBtn.DialogResult                = System.Windows.Forms.DialogResult.OK;
            this.OKBtn.Location                    = new Point(205, 335);
            this.OKBtn.Name                        = "OKBtn";
            this.OKBtn.Size                        = new System.Drawing.Size(75, 23);
            this.OKBtn.TabIndex                    = 5;
            this.OKBtn.Text                        = "OK";
            this.OKBtn.UseVisualStyleBackColor     = true;
            this.OKBtn.Click                      += new EventHandler(this.OKBtn_Click);
            this.CancelBtn.Anchor                  = AnchorStyles.Bottom | AnchorStyles.Right;
            this.CancelBtn.DialogResult            = System.Windows.Forms.DialogResult.Cancel;
            this.CancelBtn.Location                = new Point(286, 335);
            this.CancelBtn.Name                    = "CancelBtn";
            this.CancelBtn.Size                    = new System.Drawing.Size(75, 23);
            this.CancelBtn.TabIndex                = 6;
            this.CancelBtn.Text                    = "Cancel";
            this.CancelBtn.UseVisualStyleBackColor = true;
            this.PrereqBox.Anchor                  = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            this.PrereqBox.Location                = new Point(88, 38);
            this.PrereqBox.Name                    = "PrereqBox";
            this.PrereqBox.Size                    = new System.Drawing.Size(273, 20);
            this.PrereqBox.TabIndex                = 3;
            this.PrereqLbl.AutoSize                = true;
            this.PrereqLbl.Location                = new Point(12, 41);
            this.PrereqLbl.Name                    = "PrereqLbl";
            this.PrereqLbl.Size                    = new System.Drawing.Size(70, 13);
            this.PrereqLbl.TabIndex                = 2;
            this.PrereqLbl.Text                    = "Prerequisites:";
            this.QuoteBox.Anchor                   = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.QuoteBox.Location                 = new Point(51, 213);
            this.QuoteBox.Name                     = "QuoteBox";
            this.QuoteBox.Size                     = new System.Drawing.Size(284, 20);
            this.QuoteBox.TabIndex                 = 5;
            this.QuoteLbl.Anchor                   = AnchorStyles.Bottom | AnchorStyles.Left;
            this.QuoteLbl.AutoSize                 = true;
            this.QuoteLbl.Location                 = new Point(6, 216);
            this.QuoteLbl.Name                     = "QuoteLbl";
            this.QuoteLbl.Size                     = new System.Drawing.Size(39, 13);
            this.QuoteLbl.TabIndex                 = 4;
            this.QuoteLbl.Text                     = "Quote:";
            this.DetailsBox.AcceptsReturn          = true;
            this.DetailsBox.AcceptsTab             = true;
            this.DetailsBox.Anchor                 = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.DetailsBox.Location               = new Point(6, 6);
            this.DetailsBox.Multiline              = true;
            this.DetailsBox.Name                   = "DetailsBox";
            this.DetailsBox.ScrollBars             = ScrollBars.Vertical;
            this.DetailsBox.Size                   = new System.Drawing.Size(329, 201);
            this.DetailsBox.TabIndex               = 3;
            base.AcceptButton                      = this.OKBtn;
            base.AutoScaleDimensions               = new SizeF(6f, 13f);
            base.AutoScaleMode                     = System.Windows.Forms.AutoScaleMode.Font;
            base.CancelButton                      = this.CancelBtn;
            base.ClientSize                        = new System.Drawing.Size(373, 370);
            base.Controls.Add(this.PrereqBox);
            base.Controls.Add(this.PrereqLbl);
            base.Controls.Add(this.CancelBtn);
            base.Controls.Add(this.OKBtn);
            base.Controls.Add(this.Pages);
            base.Controls.Add(this.NameBox);
            base.Controls.Add(this.NameLbl);
            base.MaximizeBox   = false;
            base.MinimizeBox   = false;
            base.Name          = "OptionEpicDestinyForm";
            base.ShowIcon      = false;
            base.ShowInTaskbar = false;
            base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text          = "Epic Destiny";
            this.Pages.ResumeLayout(false);
            this.DetailsPage.ResumeLayout(false);
            this.DetailsPage.PerformLayout();
            this.ImmortalityPage.ResumeLayout(false);
            this.ImmortalityPage.PerformLayout();
            this.LevelPage.ResumeLayout(false);
            this.LevelPage.PerformLayout();
            this.LevelToolbar.ResumeLayout(false);
            this.LevelToolbar.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Esempio n. 19
0
        private void InitializeForm()
        {
            webBrowser1 = new WebBrowser();

            menuStrip1                    = new MenuStrip();
            fileToolStripMenuItem         = new ToolStripMenuItem();
            saveAsToolStripMenuItem       = new ToolStripMenuItem();
            toolStripSeparator1           = new ToolStripSeparator();
            printToolStripMenuItem        = new ToolStripMenuItem();
            printPreviewToolStripMenuItem = new ToolStripMenuItem();
            toolStripSeparator2           = new ToolStripSeparator();
            exitToolStripMenuItem         = new ToolStripMenuItem();
            pageSetupToolStripMenuItem    = new ToolStripMenuItem();
            propertiesToolStripMenuItem   = new ToolStripMenuItem();
            AsyncNavigationItem           = new ToolStripMenuItem();
            SyncNavigationItem            = new ToolStripMenuItem();

            toolStrip1    = new ToolStrip();
            goButton      = new ToolStripButton();
            backButton    = new ToolStripButton();
            forwardButton = new ToolStripButton();
            stopButton    = new ToolStripButton();
            refreshButton = new ToolStripButton();
            homeButton    = new ToolStripButton();
            searchButton  = new ToolStripButton();
            printButton   = new ToolStripButton();
            AsyncButton   = new ToolStripButton();
            SyncButton    = new ToolStripButton();

            toolStrip2        = new ToolStrip();
            toolStripTextBox1 = new ToolStripTextBox();

            statusStrip1          = new StatusStrip();
            toolStripStatusLabel1 = new ToolStripStatusLabel();

            menuStrip1.Items.Add(fileToolStripMenuItem);

            fileToolStripMenuItem.DropDownItems.AddRange(
                new ToolStripItem[] {
                saveAsToolStripMenuItem, toolStripSeparator1,
                pageSetupToolStripMenuItem, printToolStripMenuItem,
                printPreviewToolStripMenuItem, toolStripSeparator2,
                propertiesToolStripMenuItem, exitToolStripMenuItem,
                AsyncNavigationItem, SyncNavigationItem
            }
                );

            fileToolStripMenuItem.Text         = "&Archivo";
            saveAsToolStripMenuItem.Text       = "Save &As...";
            pageSetupToolStripMenuItem.Text    = "Page Set&up...";
            printToolStripMenuItem.Text        = "&Print...";
            printPreviewToolStripMenuItem.Text = "Print Pre&view...";
            propertiesToolStripMenuItem.Text   = "Properties";
            exitToolStripMenuItem.Text         = "E&xit";
            AsyncNavigationItem.Text           = "Navegacion Asyn&cronica";
            SyncNavigationItem.Text            = "Navegacion Syncro&nica";

            printToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.P;

            saveAsToolStripMenuItem.Click +=
                new System.EventHandler(saveAsToolStripMenuItem_Click);
            pageSetupToolStripMenuItem.Click +=
                new System.EventHandler(pageSetupToolStripMenuItem_Click);
            printToolStripMenuItem.Click +=
                new System.EventHandler(printToolStripMenuItem_Click);
            printPreviewToolStripMenuItem.Click +=
                new System.EventHandler(printPreviewToolStripMenuItem_Click);
            propertiesToolStripMenuItem.Click +=
                new System.EventHandler(propertiesToolStripMenuItem_Click);
            exitToolStripMenuItem.Click +=
                new System.EventHandler(exitToolStripMenuItem_Click);
            AsyncNavigationItem.Click +=
                new System.EventHandler(propertiesToolStripMenuItem_Click);
            SyncNavigationItem.Click +=
                new System.EventHandler(propertiesToolStripMenuItem_Click);

            toolStrip1.Items.AddRange(new ToolStripItem[] {
                goButton, backButton, forwardButton, stopButton,
                refreshButton, homeButton, searchButton, printButton, AsyncButton, SyncButton
            });

            goButton.Text      = "Go";
            backButton.Text    = "Back";
            forwardButton.Text = "Forward";
            stopButton.Text    = "Stop";
            refreshButton.Text = "Refresh";
            homeButton.Text    = "Home";
            searchButton.Text  = "Search";
            printButton.Text   = "Print";
            AsyncButton.Text   = "Navegacion Asyncronica";
            SyncButton.Text    = "Navegacion Syncronica";

            backButton.Enabled    = false;
            forwardButton.Enabled = false;

            goButton.Click      += new System.EventHandler(goButton_Click);
            backButton.Click    += new System.EventHandler(backButton_Click);
            forwardButton.Click += new System.EventHandler(forwardButton_Click);
            stopButton.Click    += new System.EventHandler(stopButton_Click);
            refreshButton.Click += new System.EventHandler(refreshButton_Click);
            homeButton.Click    += new System.EventHandler(homeButton_Click);
            searchButton.Click  += new System.EventHandler(searchButton_Click);
            printButton.Click   += new System.EventHandler(printButton_Click);
            AsyncButton.Click   += new System.EventHandler(goAsyncButton_Click);
            SyncButton.Click    += new System.EventHandler(goSyncButton_Click);


            toolStrip2.Items.Add(toolStripTextBox1);
            toolStripTextBox1.Size     = new System.Drawing.Size(250, 25);
            toolStripTextBox1.KeyDown +=
                new KeyEventHandler(toolStripTextBox1_KeyDown);
            toolStripTextBox1.Click +=
                new System.EventHandler(toolStripTextBox1_Click);

            statusStrip1.Items.Add(toolStripStatusLabel1);

            webBrowser1.Dock       = DockStyle.Fill;
            webBrowser1.Navigated +=
                new WebBrowserNavigatedEventHandler(webBrowser1_Navigated);

            Controls.AddRange(new Control[] {
                webBrowser1, toolStrip2, toolStrip1,
                menuStrip1, statusStrip1, menuStrip1
            });
        }
        public void Remove_Owned()
        {
            ToolStrip toolStrip           = CreateToolStrip();
            ToolStripItemCollection items = toolStrip.Items;

            MockToolStripButton buttonA = new MockToolStripButton("A");
            MockToolStripButton buttonB = new MockToolStripButton("B");
            MockToolStripButton buttonC = new MockToolStripButton("B");

            items.Insert(0, buttonA);
            items.Insert(0, buttonB);

            items.Remove(buttonB);
            Assert.AreEqual(1, items.Count, "#A1");
            Assert.AreEqual(1, itemsRemoved.Count, "#A2");
            Assert.AreSame(buttonA, items [0], "#A3");
            Assert.AreSame(buttonB, itemsRemoved [0], "#A4");
            Assert.IsNull(buttonB.Owner, "#A5");
            Assert.IsNull(buttonB.ParentToolStrip, "#A6");

            // remove null item
            items.Remove((ToolStripItem)null);
            Assert.AreEqual(1, items.Count, "#B1");
            Assert.AreEqual(2, itemsRemoved.Count, "#B2");
            Assert.AreSame(buttonA, items [0], "#B3");
            Assert.IsNull(itemsRemoved [1], "#B4");

            // remove item not owner by toolstrip
            items.Remove(buttonC);
            Assert.AreEqual(1, items.Count, "#C1");
            Assert.AreEqual(3, itemsRemoved.Count, "#C2");
            Assert.AreSame(buttonA, items [0], "#C3");
            Assert.AreSame(buttonC, itemsRemoved [2], "#C4");
            Assert.IsNull(buttonC.Owner, "#C5");
            Assert.IsNull(buttonC.ParentToolStrip, "#C6");

            items.Remove(buttonA);
            Assert.AreEqual(0, items.Count, "#D1");
            Assert.AreEqual(4, itemsRemoved.Count, "#D2");
            Assert.AreSame(buttonA, itemsRemoved [3], "#D3");
            Assert.IsNull(buttonC.Owner, "#D4");
            Assert.IsNull(buttonC.ParentToolStrip, "#D5");

            // remove item which is no longer in the collection
            items.Remove(buttonA);
            Assert.AreEqual(0, items.Count, "#E1");
            Assert.AreEqual(5, itemsRemoved.Count, "#E2");
            Assert.AreSame(buttonA, itemsRemoved [4], "#E3");

            // remove item owned by other toolstrip
            ToolStrip           otherToolStrip = new ToolStrip();
            MockToolStripButton buttonD        = new MockToolStripButton("B");

            otherToolStrip.Items.Add(buttonD);
            Assert.AreSame(otherToolStrip, buttonD.Owner, "#F1");
            Assert.IsNull(buttonD.ParentToolStrip, "#F2");
            items.Remove(buttonD);
            Assert.AreEqual(0, items.Count, "#F3");
            Assert.AreEqual(6, itemsRemoved.Count, "#F4");
            Assert.IsNull(buttonD.Owner, "#F5");
            Assert.IsNull(buttonD.ParentToolStrip, "#F6");
        }
Esempio n. 21
0
        public FDMenus(IMainForm mainForm)
        {
            // modify the file menu
            ToolStripMenuItem fileMenu = (ToolStripMenuItem)mainForm.FindMenuItem("FileMenu");

            RecentProjects = new RecentProjectsMenu();
            fileMenu.DropDownItems.Insert(5, RecentProjects);

            // modify the view menu
            ToolStripMenuItem viewMenu = (ToolStripMenuItem)mainForm.FindMenuItem("ViewMenu");

            View       = new ToolStripMenuItem(TextHelper.GetString("Label.MainMenuItem"));
            View.Image = Icons.Project.Img;
            viewMenu.DropDownItems.Add(View);
            PluginBase.MainForm.RegisterShortcutItem("ViewMenu.ShowProject", View);

            // modify the tools menu - add a nice GUI classpath editor
            ToolStripMenuItem toolsMenu = (ToolStripMenuItem)mainForm.FindMenuItem("ToolsMenu");

            GlobalClasspaths = new ToolStripMenuItem(TextHelper.GetString("Label.GlobalClasspaths"));
            GlobalClasspaths.ShortcutKeys = Keys.F9 | Keys.Control;
            GlobalClasspaths.Image        = Icons.Classpath.Img;
            toolsMenu.DropDownItems.Insert(toolsMenu.DropDownItems.Count - 4, GlobalClasspaths);
            PluginBase.MainForm.RegisterShortcutItem("ToolsMenu.GlobalClasspaths", GlobalClasspaths);

            ProjectMenu = new ProjectMenu();

            MenuStrip mainMenu = mainForm.MenuStrip;

            mainMenu.Items.Insert(5, ProjectMenu);

            ToolStrip toolBar = mainForm.ToolStrip;

            toolBar.Items.Add(new ToolStripSeparator());

            toolBar.Items.Add(RecentProjects.ToolbarSelector);

            BuildProject             = new ToolStripButton(Icons.Gear.Img);
            BuildProject.Name        = "BuildProject";
            BuildProject.ToolTipText = TextHelper.GetStringWithoutMnemonics("Label.BuildProject");
            PluginBase.MainForm.RegisterSecondaryItem("ProjectMenu.BuildProject", BuildProject);
            toolBar.Items.Add(BuildProject);

            TestMovie             = new ToolStripButton(Icons.GreenCheck.Img);
            TestMovie.Name        = "TestMovie";
            TestMovie.ToolTipText = TextHelper.GetStringWithoutMnemonics("Label.TestMovie");
            PluginBase.MainForm.RegisterSecondaryItem("ProjectMenu.TestMovie", TestMovie);
            toolBar.Items.Add(TestMovie);

            ConfigurationSelector             = new ToolStripComboBoxEx();
            ConfigurationSelector.Name        = "ConfigurationSelector";
            ConfigurationSelector.ToolTipText = TextHelper.GetString("ToolTip.SelectConfiguration");
            ConfigurationSelector.Items.AddRange(new string[] { TextHelper.GetString("Info.Debug"), TextHelper.GetString("Info.Release") });
            ConfigurationSelector.DropDownStyle = ComboBoxStyle.DropDownList;
            ConfigurationSelector.AutoSize      = false;
            ConfigurationSelector.Enabled       = false;
            ConfigurationSelector.Width         = ScaleHelper.Scale(GetThemeWidth("ProjectManager.TargetBuildSelectorWidth", 85));
            ConfigurationSelector.Margin        = new Padding(1, 0, 0, 0);
            ConfigurationSelector.FlatStyle     = PluginBase.MainForm.Settings.ComboBoxFlatStyle;
            ConfigurationSelector.Font          = PluginBase.Settings.DefaultFont;
            toolBar.Items.Add(ConfigurationSelector);
            PluginBase.MainForm.RegisterShortcutItem("ProjectMenu.ConfigurationSelectorToggle", Keys.Control | Keys.F5);
            PluginBase.MainForm.RegisterSecondaryItem("ProjectMenu.ConfigurationSelectorToggle", ConfigurationSelector);

            TargetBuildSelector             = new ToolStripComboBoxEx();
            TargetBuildSelector.Name        = "TargetBuildSelector";
            TargetBuildSelector.ToolTipText = TextHelper.GetString("ToolTip.TargetBuild");
            TargetBuildSelector.AutoSize    = false;
            TargetBuildSelector.Width       = ScaleHelper.Scale(GetThemeWidth("ProjectManager.ConfigurationSelectorWidth", 120));
            TargetBuildSelector.Margin      = new Padding(1, 0, 0, 0);
            TargetBuildSelector.FlatStyle   = PluginBase.MainForm.Settings.ComboBoxFlatStyle;
            TargetBuildSelector.Font        = PluginBase.Settings.DefaultFont;
            toolBar.Items.Add(TargetBuildSelector);
            PluginBase.MainForm.RegisterShortcutItem("ProjectMenu.TargetBuildSelector", Keys.Control | Keys.F7);
            PluginBase.MainForm.RegisterSecondaryItem("ProjectMenu.TargetBuildSelector", TargetBuildSelector);
            EnableTargetBuildSelector(false);
        }
Esempio n. 22
0
        public static void AddNewContentMenuItems(EventHandler onClickEvent, ToolStripMenuItem pluginsMenuItem, ToolStrip toolStrip)
        {
            pluginsMenuItem.DropDownItems.Clear();
            List <ToolStripItem> itemsToRemove = new List <ToolStripItem>();

            foreach (ToolStripItem tsi in toolStrip.Items)
            {
                if (tsi.Name.Contains("ContentPlugin"))
                {
                    itemsToRemove.Add(tsi);
                }
            }
            foreach (ToolStripItem itr in itemsToRemove)
            {
                toolStrip.Items.Remove(itr);
            }

            int pluginCount = 0;

            if (PluginManager.ContentManagers.Count > 0)
            {
                pluginsMenuItem.Visible = true;
                int i = 0;
                foreach (IContentManager cm in PluginManager.ContentManagers.Values)
                {
                    pluginCount++;
                    string            id   = "ContentPlugin" + (++i).ToString();
                    ToolStripMenuItem item = new ToolStripMenuItem(cm.Name, cm.MenuImage, onClickEvent, "toolStripItem" + id);
                    item.ToolTipText           = cm.Name;
                    item.ImageTransparentColor = Color.Magenta;
                    item.Tag = typeof(IContentManager);
                    pluginsMenuItem.DropDownItems.Add(item);

                    if ((cm.MenuImage != null) && cm.AddToolbarIcon)
                    {
                        ToolStripButton b = new ToolStripButton(null, cm.MenuImage, onClickEvent, "toolStripButton" + id);
                        b.ImageTransparentColor = Color.Magenta;
                        b.ToolTipText           = cm.Name;
                        b.Tag = typeof(IContentManager);
                        toolStrip.Items.Add(b);
                    }
                }
            }

            if (PluginManager.SimplePluginManagers.Count > 0)
            {
                pluginsMenuItem.Visible = true;
                int i = 0;
                foreach (ISimplePluginManager spm in PluginManager.SimplePluginManagers.Values)
                {
                    pluginCount++;
                    string            id   = "SimplePlugin" + (++i).ToString();
                    ToolStripMenuItem item = new ToolStripMenuItem(spm.Name, spm.MenuImage, onClickEvent, "toolStripItem" + id);
                    item.ToolTipText           = spm.Name;
                    item.ImageTransparentColor = Color.Magenta;
                    item.Tag = typeof(ISimplePluginManager);
                    pluginsMenuItem.DropDownItems.Add(item);

                    if ((spm.MenuImage != null) && spm.AddToolbarIcon)
                    {
                        ToolStripButton b = new ToolStripButton(null, spm.MenuImage, onClickEvent, "toolStripButton" + id);
                        b.ImageTransparentColor = Color.Magenta;
                        b.ToolTipText           = spm.Name;
                        b.Tag = typeof(ISimplePluginManager);
                        toolStrip.Items.Add(b);
                    }
                }
            }

            if (pluginCount == 0)
            {
                pluginsMenuItem.Visible = false;
            }
        }
Esempio n. 23
0
	public MainForm ()
	{
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Dock = DockStyle.Top;
		_toolStrip.Height = 25;
		Controls.Add (_toolStrip);
		// 
		// _statusStrip;
		// 
		_statusStrip = new StatusStrip ();
		Controls.Add (_statusStrip);
		// 
		// _toolStripLabel1
		// 
		_toolStripLabel1 = new ToolStripLabel ();
		_toolStripLabel1.Text = "Mono";
		_statusStrip.Items.Add (_toolStripLabel1);
		// 
		// _toolStripLabel2
		// 
		_toolStripLabel2 = new ToolStripLabel ();
		_toolStripLabel2.Text = "Mono";
		_toolStrip.Items.Add (_toolStripLabel2);
		// 
		// _menuStrip
		// 
		_menuStrip = new MenuStrip ();
		_menuStrip.Dock = DockStyle.Left;
		_menuStrip.LayoutStyle = ToolStripLayoutStyle.Flow;
		_menuStrip.Location = new Point (0, 0);
		_menuStrip.Size = new Size (303, 23);
		Controls.Add (_menuStrip);
		// 
		// _fileToolStripMenuItem
		// 
		_fileToolStripMenuItem = new ToolStripMenuItem ();
		_fileToolStripMenuItem.Text = "&File";
		_menuStrip.Items.Add (_fileToolStripMenuItem);
		// 
		// _newToolStripMenuItem
		// 
		_newToolStripMenuItem = new ToolStripMenuItem ();
		_newToolStripMenuItem.Text = "&New";
		_fileToolStripMenuItem.DropDownItems.Add (_newToolStripMenuItem);
		// 
		// _openToolStripMenuItem
		// 
		_openToolStripMenuItem = new ToolStripMenuItem ();
		_openToolStripMenuItem.Text = "&Open";
		_fileToolStripMenuItem.DropDownItems.Add (_openToolStripMenuItem);
		// 
		// _editToolStripMenuItem
		// 
		_editToolStripMenuItem = new ToolStripMenuItem ();
		_editToolStripMenuItem.Text = "&Edit";
		_menuStrip.Items.Add (_editToolStripMenuItem);
		// 
		// _undoToolStripMenuItem
		// 
		_undoToolStripMenuItem = new ToolStripMenuItem ();
		_undoToolStripMenuItem.Text = "&Undo";
		_editToolStripMenuItem.DropDownItems.Add (_undoToolStripMenuItem);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 250);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82739";
		Load += new EventHandler (MainForm_Load);
	}
        protected override void Init()
        {
            toolStrip = new ToolStrip()
                        .Button("Rename", "Переименовать (F2)")
                        .Button("Объединить (F3)", ShowJoinView)
                        .Button("Delete", "Удалить (Delete)")
                        .Separator()
                        .Button("Продукты (Enter)", ShowProductsAndProducersOrOffers)
                        .Button("Показать в ассортименте", ShowAssortmentForProducer)
                        .Separator()
                        .Button("Создать эквивалент", ShowCreateEquivalentForProducer)
                        .Button("Обновить (F11)", Reload);
            toolStrip.Tag = "Searchable";

            var bookmarksToolStrip = new ToolStrip()
                                     .Button("К закаладке", MoveToBookmark)
                                     .Button("Установить закладку", SetBookmark);

            producerTable = new VirtualTable(new TemplateManager <ProducerDto>(
                                                 () => Row.Headers(new Header("Проверен").AddClass("CheckBoxColumn1"), "Производитель"),
                                                 producer => {
                var row = Row.Cells(new CheckBoxInput(producer.Checked).Attr("Name", "Checked"), producer.Name);
                if (producer.HasOffers)
                {
                    row.AddClass("WithoutOffers");
                }
                if (producer.Id == BookmarkProducerId)
                {
                    ((IDomElementWithChildren)row.Children.Last()).Prepend(new TextBlock {
                        Class = "BookmarkGlyph"
                    });
                }
                return(row);
            }));
            producerTable.RegisterBehavior(new InputController());
            producerTable.Host.Name     = "Producers";
            producerTable.Host.KeyDown += (sender, args) => {
                if (args.KeyCode == Keys.Enter && String.IsNullOrEmpty(searchText.Text))
                {
                    ShowProductsAndProducersOrOffers();
                }
                else if (args.KeyCode == Keys.Enter)
                {
                    Search(searchText.Text);
                }
                else if (args.KeyCode == Keys.Escape && !String.IsNullOrEmpty(searchText.Text))
                {
                    searchText.Text = "";
                }
                else if (args.KeyCode == Keys.Escape && String.IsNullOrEmpty(searchText.Text))
                {
                    ReseteFilter();
                }
                else if (args.KeyCode == Keys.Tab)
                {
                    synonymsTable.Host.Focus();
                }
                else if (args.KeyCode == Keys.F3)
                {
                    ShowJoinView();
                }
            };
            producerTable.Host.KeyPress += (sender, args) => {
                if (Char.IsLetterOrDigit(args.KeyChar))
                {
                    searchText.Text += args.KeyChar;
                }
            };
            producerTable.Host.InputMap()
            .KeyDown(Keys.F11, Reload);

            synonymsTable = new VirtualTable(new TemplateManager <ProducerSynonymDto>(
                                                 () => {
                var row    = Row.Headers();
                var header = new Header("Синоним").Sortable("Name");
                row.Append(header);

                header = new Header("Поставщик").Sortable("Supplier");
                row.Append(header);

                header = new Header("Регион").Sortable("Region");
                row.Append(header);

                return(row);
            },
                                                 synonym => {
                var row = Row.Cells(synonym.Name,
                                    synonym.Supplier,
                                    synonym.Region);
                if (synonym.HaveOffers)
                {
                    row.AddClass("WithoutOffers");
                }
                return(row);
            }));

            synonymsTable.Host.Name = "ProducerSynonyms";
            synonymsTable.Host
            .InputMap()
            .KeyDown(Keys.Enter, ShowProductsAndProducersOrOffers)
            .KeyDown(Keys.Escape, () => producerTable.Host.Focus());

            equivalentTable = new VirtualTable(new TemplateManager <ProducerEquivalentDto>(
                                                   () => Row.Headers("Эквивалент"),
                                                   e => Row.Cells(e.Name)));
            equivalentTable.Host.Name = "ProducerEquivalents";

            var producersToSynonymsSplit = new SplitContainer {
                Dock        = DockStyle.Fill,
                Orientation = Orientation.Horizontal
            };
            var producersToEquivalentsSplit = new SplitContainer {
                Dock = DockStyle.Fill,
            };

            producersToEquivalentsSplit.Panel1.Controls.Add(producerTable.Host);
            producersToEquivalentsSplit.Panel2.Controls.Add(equivalentTable.Host);

            producersToSynonymsSplit.Panel1.Controls.Add(producersToEquivalentsSplit);
            producersToSynonymsSplit.Panel2.Controls.Add(synonymsTable.Host);
            Controls.Add(producersToSynonymsSplit);
            Controls.Add(new Legend("WithoutOffers"));
            Controls.Add(bookmarksToolStrip);
            Controls.Add(toolStrip);
            producersToSynonymsSplit.SplitterDistance    = (int)(0.5 * Height);
            producersToEquivalentsSplit.SplitterDistance = (int)(0.7 * producersToEquivalentsSplit.Width);
            Shown += (sender, args) => producerTable.Host.Focus();
            synonymsTable.TemplateManager.ResetColumns();
        }
 // Methods
 public bool CanMove(ToolStrip toolStripToDrag)
 {
 }
Esempio n. 26
0
        /// <summary>
        /// Constructor - Build UI
        /// </summary>
        public Visualizer(string filename)
        {
            //valueTable = new Dictionary<string,List<decimal>>();
            visFileList = new Dictionary <string, VisFileContainer>();

            grapher = new Grapher(this);

            this.SuspendLayout();

            this.Size = new Size(1100, 500);
            this.Text = "DRAMVis     University Of Maryland";

            //
            //menu bar at top of the screen
            //
            menuStrip = new MenuStrip();

            file  = new ToolStripMenuItem("File");
            about = new ToolStripMenuItem("About");
            menuStrip.Items.Add(file);
            menuStrip.Items.Add(about);

            fileOpen        = new ToolStripMenuItem("Open .vis File");
            fileOpen.Click += new System.EventHandler(this.OpenFileButton_Click);
            file.DropDownItems.Add(fileOpen);

            help = new ToolStripMenuItem("Help");
            about.DropDownItems.Add(help);

            //
            //tool strip stuff
            //
            toolStrip = new ToolStrip();

            pointerButton             = new ToolStripButton(new Bitmap("../../pointer.png"));
            pointerButton.Click      += new EventHandler(this.PointerButton_Click);
            pointerButton.ToolTipText = "Pointer";
            pointerButton.Size        = new Size(32, 32);
            zoomButton             = new ToolStripButton(new Bitmap("../../zoom.png"));
            zoomButton.Click      += new EventHandler(this.ZoomButton_Click);
            zoomButton.ToolTipText = "Zoom";
            handButton             = new ToolStripButton(new Bitmap("../../pan.png"));
            handButton.Click      += new EventHandler(this.HandButton_Click);
            handButton.ToolTipText = "Pan";

            saveGraphButton             = new ToolStripButton(new Bitmap("../../savegraph.png"));
            saveGraphButton.ToolTipText = "Save graphs to file";
            saveGraphButton.Click      += new EventHandler(this.SaveGraphButton_Click);
            openFileButton             = new ToolStripButton(new Bitmap("../../open.png"));
            openFileButton.Click      += new EventHandler(this.OpenFileButton_Click);
            openFileButton.ToolTipText = "Open .vis file";
            playButton                 = new ToolStripButton(new Bitmap("../../play.png"));
            playButton.Click          += new EventHandler(this.PlayButton_Click);
            playButton.ToolTipText     = "Run simulation";
            playButton.Name            = "Play";
            playPlusButton             = new ToolStripButton(new Bitmap("../../playplus.png"));
            playPlusButton.Click      += new EventHandler(this.PlayButton_Click);
            playPlusButton.ToolTipText = "Run and Add";
            playPlusButton.Name        = "PlayPlus";

            ToolStripItem runFor = new ToolStripLabel("Run For:");

            cycleCount      = new ToolStripTextBox();
            cycleCount.Size = new Size(70, 0);
            cycleCount.Text = "500000";
            ToolStripItem cyclesLabel = new ToolStripLabel("cycles");

            ToolStripItem displayAsLabel = new ToolStripLabel("Display As:");

            displayAs = new ToolStripComboBox();
            displayAs.Items.AddRange(new string[] { "Total", "Total Average", "Per Rank", "Per Bank" });
            displayAs.SelectedIndex         = 0;
            displayAs.SelectedIndexChanged += new EventHandler(this.DataDisplayCombo_IndexChanged);

            toolStrip.Items.AddRange(new ToolStripItem[] { openFileButton, saveGraphButton,
                                                           new ToolStripSeparator(), pointerButton, zoomButton, handButton,
                                                           new ToolStripSeparator(), playButton, playPlusButton,
                                                           new ToolStripSeparator(), runFor, cycleCount, cyclesLabel,
                                                           new ToolStripSeparator(), displayAsLabel, displayAs });

            //
            //control panel tab page
            //
            controlPanel           = new TabControl();
            controlPanel.Dock      = DockStyle.Fill;
            controlPanel.Alignment = TabAlignment.Bottom;


            //
            //system property page stuff
            //
            systemPropertyPage             = new TabPage("System");
            systemPropertyPage.BorderStyle = BorderStyle.Fixed3D;
            systemPropertyPage.Anchor      = AnchorStyles.Top;

            TableLayoutPanel systemtlp = new TableLayoutPanel();

            systemtlp.Margin      = new Padding(0, 0, 0, 0);
            systemtlp.RowCount    = 3;
            systemtlp.ColumnCount = 2;

            //trace
            Label traceLabel = new Label();

            traceLabel.Text      = "Trace File";
            traceLabel.TextAlign = ContentAlignment.MiddleCenter;
            traceLabel.Dock      = DockStyle.Fill;
            traceLabel.Font      = new Font(traceLabel.Font, FontStyle.Bold);
            systemtlp.Controls.Add(traceLabel, 0, 0);
            systemtlp.SetColumnSpan(traceLabel, 2);

            traceSelectionButton        = new Button();
            traceSelectionButton.Image  = new Bitmap(new Bitmap("../../open.png"), new Size(16, 16));
            traceSelectionButton.Click += new EventHandler(this.TraceSelectionButton_Click);
            systemtlp.Controls.Add(traceSelectionButton, 0, 1);

            traceNameDisplay             = new TextBox();
            traceNameDisplay.BorderStyle = BorderStyle.Fixed3D;
            traceNameDisplay.TextAlign   = HorizontalAlignment.Center;
            traceNameDisplay.BackColor   = Color.White;
            traceNameDisplay.Dock        = DockStyle.Fill;
            traceNameDisplay.ReadOnly    = true;
            systemtlp.Controls.Add(traceNameDisplay, 1, 1);

            systemPropertyGrid                = new PropertyGrid();
            systemPropertyGrid.Dock           = DockStyle.Fill;
            systemPropertyGrid.SelectedObject = systemParameters;

            systemtlp.Controls.Add(systemPropertyGrid, 0, 2);
            systemtlp.SetColumnSpan(systemPropertyGrid, 2);

            systemtlp.Dock = DockStyle.Fill;
            systemtlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 35));
            systemtlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 185));

            systemPropertyPage.Controls.Add(systemtlp);
            systemPropertyPage.Resize += delegate(object sender, EventArgs e) {
                TabPage x = (TabPage)sender;
                systemPropertyGrid.Height = x.Height - 150;
            };
            //
            //Device Property page stuff
            //
            devicePropertyPage             = new TabPage("Device");
            devicePropertyPage.BorderStyle = BorderStyle.Fixed3D;

            TableLayoutPanel devicetlp = new TableLayoutPanel();

            devicetlp.RowCount    = 3;
            devicetlp.ColumnCount = 1;

            devicePropertyGrid      = new PropertyGrid();
            devicePropertyGrid.Dock = DockStyle.Fill;

            Label deviceComboLabel = new Label();

            deviceComboLabel.Text      = "Device Name";
            deviceComboLabel.TextAlign = ContentAlignment.MiddleCenter;
            deviceComboLabel.Font      = new Font(deviceComboLabel.Font, FontStyle.Bold);
            deviceComboLabel.Dock      = DockStyle.Fill;

            deviceComboBox      = new ComboBox();
            deviceComboBox.Dock = DockStyle.Fill;
            FillDeviceComboBox();
            deviceComboBox.SelectedIndexChanged += new EventHandler(this.DeviceComboBox_IndexChanged);
            deviceComboBox.SelectedIndex         = 0;

            devicetlp.Controls.Add(deviceComboLabel, 0, 0);
            devicetlp.Controls.Add(deviceComboBox, 0, 1);
            devicetlp.Controls.Add(devicePropertyGrid, 0, 2);
            devicetlp.Dock = DockStyle.Fill;
            devicetlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 35));
            devicetlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 185));

            devicePropertyPage.Resize += delegate(object sender, EventArgs e) {
                TabPage x = (TabPage)sender;
                devicePropertyGrid.Height = x.Height - 150;
            };
            devicePropertyPage.Controls.Add(devicetlp);

            //
            //previous results page
            //
            TableLayoutPanel resultstlp = new TableLayoutPanel();

            resultstlp.ColumnCount = 1;
            resultstlp.RowCount    = 2;

            resultsPage      = new TabPage();
            resultsPage.Text = "Results";

            Label resultsLabel = new Label();

            resultsLabel.Text      = "Previous Results";
            resultsLabel.TextAlign = ContentAlignment.MiddleCenter;
            resultsLabel.Font      = new Font(resultsLabel.Font, FontStyle.Bold);
            resultsLabel.Dock      = DockStyle.Fill;
            resultstlp.Controls.Add(resultsLabel, 0, 0);

            resultstlp.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 222));
            resultstlp.Dock = DockStyle.Fill;
            resultsPage.Controls.Add(resultstlp);

            previousResults              = new TreeView();
            previousResults.Dock         = DockStyle.Fill;
            previousResults.AfterCheck  += new TreeViewEventHandler(this.PreviousResults_AfterCheck);
            previousResults.AfterSelect += new TreeViewEventHandler(this.PreviousResults_AfterSelect);
            previousResults.CheckBoxes   = true;

            resultstlp.Controls.Add(previousResults, 0, 1);

            //add pages to control panel
            controlPanel.Controls.AddRange(new TabPage[] { systemPropertyPage, devicePropertyPage, resultsPage });
            controlPanel.SelectedIndex = 0;

            //
            //main window stuff
            //
            mainWindow      = new TabControl();
            mainWindow.Dock = DockStyle.Fill;

            NPlot.Windows.PlotSurface2D plotBandwidth = new NPlot.Windows.PlotSurface2D();
            NPlot.Windows.PlotSurface2D plotLatency   = new NPlot.Windows.PlotSurface2D();

            gBandwidth = new LineGrapher(plotBandwidth, "bandwidth", "Bandwidth (GB/s)", "Time (ms)", "Bandwidth (GB/s)");
            gLatency   = new LineGrapher(plotLatency, "latency", "Average Latency", "Time (ms)", "Latency (nanoseconds)");

            //click handlers for right click to zoom out behavior

/*
 *                      plotBandwidth.MouseClick += new MouseEventHandler(TriggerZoomOut);
 *                      plotLatency.MouseClick += new MouseEventHandler(TriggerZoomOut);
 *                      plotLatencyHistogram.MouseClick += new MouseEventHandler(TriggerZoomOut);
 *                      plotPower.MouseClick += new MouseEventHandler(TriggerZoomOut);
 */
            bandwidthPage           = new TabPage("Bandwidth");
            bandwidthPage.BackColor = Color.Transparent;

            /*
             * bandwidthPage.MouseEnter += (this.mainWindow_MouseEnter);
             * bandwidthPage.MouseLeave += (this.mainWindow_MouseLeave);
             */
            latencyPage           = new TabPage("Latency");
            latencyPage.BackColor = Color.Transparent;

            /*
             * latencyPage.MouseEnter += (this.mainWindow_MouseEnter);
             * latencyPage.MouseLeave += (this.mainWindow_MouseLeave);
             */

            latencyHistogramPage           = new TabPage("Histogram");
            latencyHistogramPage.BackColor = Color.Transparent;

            /*
             * latencyHistogramPage.MouseEnter += (this.mainWindow_MouseEnter);
             * latencyHistogramPage.MouseLeave += (this.mainWindow_MouseLeave);
             */

            powerPage           = new TabPage("Power");
            powerPage.BackColor = Color.Transparent;

            /*
             * powerPage.MouseEnter += (this.mainWindow_MouseEnter);
             * powerPage.MouseLeave += (this.mainWindow_MouseLeave);
             */
            mainWindow.MouseEnter += this.mainWindow_MouseEnter;
            mainWindow.MouseLeave += this.mainWindow_MouseLeave;

            gPower     = new BarGrapher(powerPage, "power");
            gHistogram = new BarGrapher(latencyHistogramPage, "histogram");

            latencyPage.Controls.Add(plotLatency);
            bandwidthPage.Controls.Add(plotBandwidth);

            mainWindow.TabPages.AddRange(new TabPage[] { bandwidthPage, latencyPage, latencyHistogramPage, powerPage });

            SplitContainer sc = new SplitContainer();

            sc.Dock = DockStyle.Fill;
            sc.Panel1.Controls.Add(controlPanel);
            sc.Panel1.Padding = new Padding(3, 3, 3, 5);
            sc.Panel1MinSize  = 250;
            sc.Panel2.Controls.Add(mainWindow);
            sc.Panel2.Padding = new Padding(3, 3, 3, 3);
            sc.Orientation    = Orientation.Vertical;

            //add everythign to window
            Controls.AddRange(new Control[] { sc, toolStrip, menuStrip });

            this.ResumeLayout();

            sc.SplitterDistance = 250;
        }
 public void Join(ToolStrip toolStripToDrag, int row)
 {
 }
Esempio n. 28
0
    public void RunApsim(ToolStrip Strip, BaseController Controller)//ApsimFile.ApsimFile F, StringCollection SelectedPaths)
    {
        // ----------------------------------------------------------
        // Run APSIM for the specified file and simulation paths.
        // This method will also locate and look after the various
        // run button states.
        // ----------------------------------------------------------

        // JKB 14/02/11
        // changed function call as Controller reference was needed for factorial mode
        // was - RunApsim(ToolStrip Strip, ApsimFile.ApsimFile F, StringCollection SelectedPaths)
        _F             = Controller.ApsimData;
        _SelectedPaths = Controller.SelectedPaths;
        _Strip         = Strip;
        _Strip.Visible = true;

        ToolStripButton      RunButton    = (ToolStripButton)_Strip.Items["RunButton"];
        ToolStripButton      StopButton   = (ToolStripButton)_Strip.Items["StopButton"];
        ToolStripButton      ErrorsButton = (ToolStripButton)_Strip.Items["ErrorsButton"];
        ToolStripLabel       PercentLabel = (ToolStripLabel)_Strip.Items["PercentLabel"];
        ToolStripProgressBar ProgressBar  = (ToolStripProgressBar)_Strip.Items["RunProgress"];

        RunButton.Enabled    = false;
        StopButton.Enabled   = true;
        ErrorsButton.Visible = false;
        PercentLabel.Text    = "";
        ProgressBar.Value    = 0;

        // Get a list of simulations to run.
        List <String> SimsToRun = new List <String>();
        List <String> simNames  = new List <String>();
        List <String> simList   = new List <String>();

        foreach (String SimulationPath in _SelectedPaths)
        {
            ApsimFile.ApsimFile.ExpandSimsToRun(_F.Find(SimulationPath), ref SimsToRun);
        }
        // JF 061211 - Added check for duplicate simulation names in different folders.
        //Create a list of sim names
        simList.AddRange(ApsimFile.ApsimFile.GetSimsInApsimFile(_F.FileName));
        List <String> duplicates = new List <String>();

        for (int i = 0; i < simList.Count; i++)
        {
            String[] split = simList[i].Split('/');
            simNames.Add(split[split.Length - 1]);
        }

        //compare them
        simNames.Sort();
        for (int i = 0; i < simNames.Count - 1; i++)
        {
            if (simNames[i].ToLower().Equals(simNames[i + 1].ToLower()))
            {
                if (!duplicates.Contains(simNames[i]))
                {
                    duplicates.Add(simNames[i]);
                }
            }
        }

        //if duplicates are found, return with error message
        if (duplicates.Count > 0)
        {
            simNames.Clear();
            foreach (String dupe in duplicates)
            {
                foreach (String list in simList)
                {
                    String[] name = list.Split('/');
                    if (name[name.Length - 1].Equals(dupe))
                    {
                        simNames.Add(list);
                    }
                }
            }
            String output = "";
            foreach (String s in simNames)
            {
                output += s + "\n";
            }
            MessageBox.Show("Error: The following simulations have the same name: \n" + output);

            //reset the menu bar
            RunButton.Enabled    = true;
            StopButton.Enabled   = false;
            ErrorsButton.Visible = false;
            PercentLabel.Text    = "";
            return;
        }
        if (SimsToRun.Count >= 1)
        {
            //See if the factorial component is "active" - whether the user wants just one or all simulations
            bool doAllFactors = true;
            if (_F.FactorComponent != null)
            {
                XmlNode varNode = _F.FactorComponent.ContentsAsXML.SelectSingleNode("//active");
                if (varNode != null)
                {
                    doAllFactors = XmlHelper.Value(_F.FactorComponent.ContentsAsXML, "active") == "1";
                }
            }
            Timer.Enabled = true;
            Apsim.Start(new List <RunApsim.apsimRunFileSims> {
                new RunApsim.apsimRunFileSims {
                    fileName = _F.FileName, simulationPaths = SimsToRun
                }
            }, doAllFactors);
        }
    }
Esempio n. 29
0
    public MainIDE(Splash splash)
    {
        BackColor = Color.FromArgb(255, 200, 200, 200);
        Icon = Icons.GetIcon("icons.logo", 32);
        Text = "OS Development Studio";

        //once the form has loaded, send a signal to the
        //splash screen to close.
        Load += delegate(object sender, EventArgs e) {
            splash.Ready();
            Focus();
        };

        //set the minimum size of the window to 75% of the current screen
        Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
        MinimumSize = new Size(
                (int)(screenSize.Width * 0.75),
                (int)(screenSize.Height * 0.75));

        //create the initial panels
        StatusStrip status = new StatusStrip();
        p_WorkingArea = new Panel { Dock = DockStyle.Fill };
        ToolStrip menu = new ToolStrip {
            GripStyle = ToolStripGripStyle.Hidden,
            Renderer = new ToolStripProfessionalRenderer() {
                RoundedEdges = false
            }
        };

        //add the controls
        Controls.Add(menu);
        Controls.Add(status);
        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();

        /*Build the main menu items*/
        ToolStripItem fileMenu = menu.Items.Add("File");
        fileMenu.Click += delegate(object sender, EventArgs e) {
            buildSplitContainer(
                null,
                new Control() { BackColor = Color.Red },
                p_SolutionExplorer);
        };
        ToolStripItem editMenu = menu.Items.Add("Edit");
        ToolStripItem buildMenu = menu.Items.Add("Build");
        ToolStripItem helpMenu = menu.Items.Add("Help");
        menu.Items.Add(new ToolStripSeparator());
        ToolStripItem run = menu.Items.Add(Icons.GetBitmap("tools.run", 16));
        run.ToolTipText = "Run";

        /*Test code*/
        Solution solution = new Solution("./testsolution/solution.ossln");

        //initialize the components
        p_SolutionExplorer = new SolutionBrowserControl();
        p_TextEditor = new TextEditor();
        p_SolutionExplorer.AddSolution(solution);

        //create the components to seperate the different working area
        //components.
        buildSplitContainer(null, null, p_SolutionExplorer);
    }
Esempio n. 30
0
        //private ToolStripComboBox tscb;
        //private ToolStripComboBox font_combo;
        //private MenuStrip ms;

        public ToolStripSample()
        {
            this.Text = "ToolStrip Notepad Sample";
            this.Size = new Size(750, 450);
            //this.StartPosition = FormStartPosition.CenterScreen;

            image_path = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "images");

            rtb             = new TextBox();
            rtb.Multiline   = true;
            rtb.Size        = this.Size;
            rtb.Dock        = DockStyle.Fill;
            rtb.BorderStyle = BorderStyle.FixedSingle;
            rtb.MouseUp    += new MouseEventHandler(rtb_MouseUp);
            this.Controls.Add(rtb);

            ts = new ToolStrip();
            this.Controls.Add(ts);

            Image           image1 = Image.FromFile(Path.Combine(image_path, "document-new.png"));
            ToolStripButton tb1    = new ToolStripButton("&New Document", image1, new EventHandler(New_Document_Clicked));

            tb1.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ts.Items.Add(tb1);

            Image           image2 = Image.FromFile(Path.Combine(image_path, "document-open.png"));
            ToolStripButton tb2    = new ToolStripButton("&Open Document", image2, new EventHandler(Open_Document_Clicked));

            tb2.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ts.Items.Add(tb2);

            Image           image3 = Image.FromFile(Path.Combine(image_path, "document-save.png"));
            ToolStripButton tb3    = new ToolStripButton("&Save Document", image3, new EventHandler(Save_Document_Clicked));

            tb3.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ts.Items.Add(tb3);

            //ts.Items.Add (new ToolStripSeparator ());

            Image           image5 = Image.FromFile(Path.Combine(image_path, "edit-cut.png"));
            ToolStripButton tb5    = new ToolStripButton("Cut", image5, new EventHandler(Cut_Clicked), "Cut");

            tb5.DisplayStyle = ToolStripItemDisplayStyle.Image;
            tb5.Enabled      = false;
            ts.Items.Add(tb5);

            Image           image6 = Image.FromFile(Path.Combine(image_path, "edit-copy.png"));
            ToolStripButton tb6    = new ToolStripButton("Copy", image6, new EventHandler(Copy_Clicked), "Copy");

            tb6.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ts.Items.Add(tb6);

            Image           image7 = Image.FromFile(Path.Combine(image_path, "edit-paste.png"));
            ToolStripButton tb7    = new ToolStripButton("Paste", image7, new EventHandler(Paste_Clicked));

            tb7.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ts.Items.Add(tb7);

            //ts.Items.Add (new ToolStripSeparator ());

            //ToolStripLabel tsl = new ToolStripLabel ("Font:");
            //ts.Items.Add (tsl);

            //font_combo = new ToolStripComboBox ();
            //font_combo.DropDownStyle = ComboBoxStyle.DropDownList;
            //font_combo.AutoSize = false;
            //font_combo.Width = 150;
            //InstalledFontCollection ifc = new InstalledFontCollection ();

            //foreach (FontFamily f in ifc.Families) {
            //	if (f.IsStyleAvailable (FontStyle.Regular))
            //		font_combo.Items.Add (f.Name);
            //}

            //font_combo.SelectedIndexChanged += new EventHandler (font_combo_SelectedIndexChanged);
            //ts.Items.Add (font_combo);

            //tscb = new ToolStripComboBox ();
            //tscb.DropDownStyle = ComboBoxStyle.DropDownList;
            //tscb.Items.Add ("6");
            //tscb.Items.Add ("8");
            //tscb.Items.Add ("10");
            //tscb.Items.Add ("12");
            //tscb.Items.Add ("14");
            //tscb.Items.Add ("16");
            //tscb.Items.Add ("18");
            //tscb.SelectedIndexChanged += new EventHandler (tscb_SelectedIndexChanged);
            //tscb.AutoSize = false;
            //tscb.Width = 45;

            //ts.Items.Add (tscb);

            Image image10 = Image.FromFile(Path.Combine(image_path, "image-x-generic.png"));

            //font_combo.SelectedIndex = font_combo.FindStringExact (rtb.Font.Name);
            //tscb.SelectedIndex = tscb.FindStringExact (rtb.Font.Size.ToString ());

            //ms = new MenuStrip ();
            //ms.Dock = DockStyle.Top;
            //this.Controls.Add (ms);

            // Top level menu
            //ToolStripMenuItem mi = new ToolStripMenuItem ("File");
            //ToolStripMenuItem mi2 = new ToolStripMenuItem ("Edit");
            //ToolStripMenuItem mi3 = new ToolStripMenuItem ("View");
            //ToolStripMenuItem mi4 = new ToolStripMenuItem ("Tools");
            //ToolStripMenuItem mi5 = new ToolStripMenuItem ("Help");
            //ms.Items.Add (mi);
            //ms.Items.Add (mi2);
            //ms.Items.Add (mi3);
            //ms.Items.Add (mi4);
            //ms.Items.Add (mi5);

            /*
             * // File menu items
             * mi.DropDownItems.Add ("New", image1, new EventHandler (New_Document_Clicked));
             * mi.DropDownItems.Add ("Open", image2, new EventHandler (Open_Document_Clicked));
             * mi.DropDownItems.Add ("Save", image3, new EventHandler (Save_Document_Clicked));
             * mi.DropDownItems.Add ("-");
             * mi.DropDownItems.Add ("Exit", null, new EventHandler (Exit_Clicked));
             *
             * // Edit menu items
             * mi2.DropDownItems.Add ("Undo", null, new EventHandler (Undo_Clicked));
             * mi2.DropDownItems.Add ("-");
             * mi2.DropDownItems.Add ("Cut", image5, new EventHandler (Cut_Clicked)).Name = "Cut";
             * mi2.DropDownItems.Add ("Copy", image6, new EventHandler (Copy_Clicked)).Name = "Copy";
             * mi2.DropDownItems.Add ("Paste", image7, new EventHandler (Paste_Clicked));
             *
             * // View menu items
             * ToolStripMenuItem WordWrapMenuItem = (ToolStripMenuItem)mi3.DropDownItems.Add ("Word Wrap");
             * WordWrapMenuItem.CheckOnClick = true;
             * WordWrapMenuItem.CheckedChanged += new EventHandler (WordWrap_CheckStateChanged);
             * WordWrapMenuItem.Checked = true;
             *
             * ToolStripMenuItem ToolStripStyleMenuItem = (ToolStripMenuItem)mi3.DropDownItems.Add ("ToolStrip Style", image10);
             *
             * // ToolStripStyle sub menu items
             * ToolStripStyleMenuItem.DropDownItems.Add ("Image", null, new EventHandler (Change_Style_Clicked));
             * ToolStripStyleMenuItem.DropDownItems.Add ("Image and Text", null, new EventHandler (Change_Style_Clicked));
             * ToolStripStyleMenuItem.DropDownItems.Add ("Text", null, new EventHandler (Change_Style_Clicked));
             * ToolStripStyleMenuItem.DropDownItems.Add ("None", null, new EventHandler (Change_Style_Clicked));
             *
             * (ToolStripStyleMenuItem.DropDownItems[0] as ToolStripMenuItem).Checked = true;
             *
             * // Help menu items
             * mi5.DropDownItems.Add ("Contents", null, new EventHandler (NotImplemented));
             * mi5.DropDownItems.Add ("Search", null, new EventHandler (NotImplemented));
             * mi5.DropDownItems.Add ("-");
             * mi5.DropDownItems.Add ("About", null, new EventHandler (NotImplemented));
             *
             * rtb_MouseUp (null, null);
             */
        }
 // Constructors
 public ToolStripItemCollection(ToolStrip owner, ToolStripItem[] value)
 {
 }
Esempio n. 32
0
 /// <summary>
 /// Gets a rounded rectangle representing the hole area of the toolstrip
 /// </summary>
 /// <param name="toolStrip"></param>
 /// <returns></returns>
 private GraphicsPath GetToolStripRectangle(ToolStrip toolStrip)
 {
     return(GraphicsTools.CreateRoundRectangle(
                new Rectangle(0, 0, toolStrip.Width - 1, toolStrip.Height - 1), ToolStripRadius));
 }
Esempio n. 33
0
 public SearchDynamixels(Mpu6050 mpu6050, List <int> baudNumList, TreeView treeView, ToolStripProgressBar progressBar, ToolStrip toolStrip, ToolStripLabel percentLabel, ToolStripLabel stateLabel)
 {
     _treeView         = treeView;
     _progressBar      = progressBar;
     _toolStrip        = toolStrip;
     _toolStripPercent = percentLabel;
     _searchThread     = new Thread(Search)
     {
         Interval = 0
     };
     _mpu6050     = mpu6050;
     _baudNumList = baudNumList;
     _stateLabel  = stateLabel;
 }
Esempio n. 34
0
 /// <summary>
 /// Draws the glossy effect on the toolbar
 /// </summary>
 /// <param name="g"></param>
 /// <param name="t"></param>
 /// <returns></returns>
 private void DrawGlossyEffect(Graphics g, ToolStrip t)
 {
     DrawGlossyEffect(g, t, 0);
 }
Esempio n. 35
0
 private void InitializeComponent()
 {
     this.icontainer_0 = new Container();
     this.toolStrip1 = new ToolStrip();
     this.btnState = new ToolStripDropDownButton();
     this.监听消息ToolStripMenuItem = new ToolStripMenuItem();
     this.停止监听ToolStripMenuItem = new ToolStripMenuItem();
     this.btnExport = new ToolStripDropDownButton();
     this.btnExportText = new ToolStripMenuItem();
     this.btnExportXml = new ToolStripMenuItem();
     this.toolStripMenuItem1 = new ToolStripSeparator();
     this.btnImportXml = new ToolStripMenuItem();
     this.btnDelete = new ToolStripDropDownButton();
     this.删除选定项ToolStripMenuItem = new ToolStripMenuItem();
     this.删除全部ToolStripMenuItem = new ToolStripMenuItem();
     this.toolStripSeparator2 = new ToolStripSeparator();
     this.btnTopMost = new ToolStripButton();
     this.toolStripSeparator1 = new ToolStripSeparator();
     this.btnExit = new ToolStripButton();
     this.txtExecuteInfo = new TextBox();
     this.splitter1 = new Splitter();
     this.listView1 = new ListView();
     this.columnHeader_5 = new ColumnHeader();
     this.columnHeader_0 = new ColumnHeader();
     this.columnHeader_1 = new ColumnHeader();
     this.columnHeader_2 = new ColumnHeader();
     this.columnHeader_3 = new ColumnHeader();
     this.columnHeader_4 = new ColumnHeader();
     this.imageList_0 = new ImageList(this.icontainer_0);
     this.toolStrip1.SuspendLayout();
     base.SuspendLayout();
     this.toolStrip1.Items.AddRange(new ToolStripItem[]
     {
         this.btnState,
         this.btnExport,
         this.btnDelete,
         this.toolStripSeparator2,
         this.btnTopMost,
         this.toolStripSeparator1,
         this.btnExit
     });
     this.toolStrip1.Location = new Point(0, 0);
     this.toolStrip1.Name = "toolStrip1";
     this.toolStrip1.Size = new Size(881, 25);
     this.toolStrip1.TabIndex = 0;
     this.toolStrip1.Text = "toolStrip1";
     this.btnState.DropDownItems.AddRange(new ToolStripItem[]
     {
         this.监听消息ToolStripMenuItem,
         this.停止监听ToolStripMenuItem
     });
     //this.btnState.Image = Resources.ball3;
     this.btnState.Name = "btnState";
     this.btnState.Size = new Size(84, 22);
     this.btnState.Text = "监听消息";
     //this.监听消息ToolStripMenuItem.Image = Resources.ball3;
     this.监听消息ToolStripMenuItem.Name = "监听消息ToolStripMenuItem";
     this.监听消息ToolStripMenuItem.Size = new Size(122, 22);
     this.监听消息ToolStripMenuItem.Text = "监听消息";
     this.监听消息ToolStripMenuItem.Click += new EventHandler(this.监听消息ToolStripMenuItem_Click);
     //this.停止监听ToolStripMenuItem.Image = Resources.ball2;
     this.停止监听ToolStripMenuItem.Name = "停止监听ToolStripMenuItem";
     this.停止监听ToolStripMenuItem.Size = new Size(122, 22);
     this.停止监听ToolStripMenuItem.Text = "停止监听";
     this.停止监听ToolStripMenuItem.Click += new EventHandler(this.停止监听ToolStripMenuItem_Click);
     this.btnExport.DropDownItems.AddRange(new ToolStripItem[]
     {
         this.btnExportText,
         this.btnExportXml,
         this.toolStripMenuItem1,
         this.btnImportXml
     });
     //this.btnExport.Image = Resources.grid7;
     this.btnExport.Name = "btnExport";
     this.btnExport.Size = new Size(108, 22);
     this.btnExport.Text = "消息导入导出";
     this.btnExportText.Name = "btnExportText";
     this.btnExportText.Size = new Size(182, 22);
     this.btnExportText.Text = "以普通文本格式导出";
     this.btnExportText.Click += new EventHandler(this.btnExportText_Click);
     this.btnExportXml.Name = "btnExportXml";
     this.btnExportXml.Size = new Size(182, 22);
     this.btnExportXml.Text = "以XML格式导出";
     this.btnExportXml.Click += new EventHandler(this.btnExportXml_Click);
     this.toolStripMenuItem1.Name = "toolStripMenuItem1";
     this.toolStripMenuItem1.Size = new Size(179, 6);
     this.btnImportXml.Name = "btnImportXml";
     this.btnImportXml.Size = new Size(182, 22);
     this.btnImportXml.Text = "导入XML格式消息";
     this.btnImportXml.Click += new EventHandler(this.btnImportXml_Click);
     this.btnDelete.DropDownItems.AddRange(new ToolStripItem[]
     {
         this.删除选定项ToolStripMenuItem,
         this.删除全部ToolStripMenuItem
     });
     //this.btnDelete.Image = Resources.dele2;
     this.btnDelete.Name = "btnDelete";
     this.btnDelete.Size = new Size(84, 22);
     this.btnDelete.Text = "删除消息";
     this.删除选定项ToolStripMenuItem.Name = "删除选定项ToolStripMenuItem";
     this.删除选定项ToolStripMenuItem.Size = new Size(158, 22);
     this.删除选定项ToolStripMenuItem.Text = "删除选定项";
     this.删除选定项ToolStripMenuItem.Click += new EventHandler(this.删除选定项ToolStripMenuItem_Click);
     this.删除全部ToolStripMenuItem.Name = "删除全部ToolStripMenuItem";
     this.删除全部ToolStripMenuItem.Size = new Size(158, 22);
     this.删除全部ToolStripMenuItem.Text = "删除全部列表项";
     this.删除全部ToolStripMenuItem.Click += new EventHandler(this.删除全部ToolStripMenuItem_Click);
     this.toolStripSeparator2.Name = "toolStripSeparator2";
     this.toolStripSeparator2.Size = new Size(6, 25);
     this.btnTopMost.CheckOnClick = true;
     //this.btnTopMost.Image = Resources.unlockWnd;
     this.btnTopMost.Name = "btnTopMost";
     this.btnTopMost.Size = new Size(75, 22);
     this.btnTopMost.Text = "窗口置顶";
     this.btnTopMost.CheckStateChanged += new EventHandler(this.btnTopMost_CheckStateChanged);
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new Size(6, 25);
     //this.btnExit.Image = Resources.exit2;
     this.btnExit.Name = "btnExit";
     this.btnExit.Size = new Size(75, 22);
     this.btnExit.Text = "退出程序";
     this.btnExit.Click += new EventHandler(this.btnExit_Click);
     this.txtExecuteInfo.AcceptsReturn = true;
     this.txtExecuteInfo.Dock = DockStyle.Bottom;
     this.txtExecuteInfo.Font = new Font("Courier New", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.txtExecuteInfo.Location = new Point(0, 303);
     this.txtExecuteInfo.Multiline = true;
     this.txtExecuteInfo.Name = "txtExecuteInfo";
     this.txtExecuteInfo.ReadOnly = true;
     this.txtExecuteInfo.ScrollBars = ScrollBars.Both;
     this.txtExecuteInfo.Size = new Size(881, 201);
     this.txtExecuteInfo.TabIndex = 1;
     this.txtExecuteInfo.WordWrap = false;
     this.splitter1.Dock = DockStyle.Bottom;
     this.splitter1.Location = new Point(0, 296);
     this.splitter1.Name = "splitter1";
     this.splitter1.Size = new Size(881, 7);
     this.splitter1.TabIndex = 2;
     this.splitter1.TabStop = false;
     this.listView1.Columns.AddRange(new ColumnHeader[]
     {
         this.columnHeader_5,
         this.columnHeader_0,
         this.columnHeader_1,
         this.columnHeader_2,
         this.columnHeader_3,
         this.columnHeader_4
     });
     this.listView1.Dock = DockStyle.Fill;
     this.listView1.FullRowSelect = true;
     this.listView1.HideSelection = false;
     this.listView1.Location = new Point(0, 25);
     this.listView1.Name = "listView1";
     this.listView1.Size = new Size(881, 271);
     this.listView1.SmallImageList = this.imageList_0;
     this.listView1.TabIndex = 3;
     this.listView1.UseCompatibleStateImageBehavior = false;
     this.listView1.View = View.Details;
     this.listView1.SelectedIndexChanged += new EventHandler(this.listView1_SelectedIndexChanged);
     this.columnHeader_5.Text = "序号";
     this.columnHeader_5.Width = 54;
     this.columnHeader_0.Text = "命令文本";
     this.columnHeader_0.Width = 196;
     this.columnHeader_1.Text = "命令参数";
     this.columnHeader_1.Width = 210;
     this.columnHeader_2.Text = "开始时间";
     this.columnHeader_2.Width = 115;
     this.columnHeader_3.Text = "完成时间";
     this.columnHeader_3.Width = 168;
     this.columnHeader_4.Text = "应用程序标识";
     this.columnHeader_4.Width = 110;
     this.imageList_0.ColorDepth = ColorDepth.Depth8Bit;
     this.imageList_0.ImageSize = new Size(16, 16);
     this.imageList_0.TransparentColor = Color.Transparent;
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(881, 504);
     base.Controls.Add(this.listView1);
     base.Controls.Add(this.splitter1);
     base.Controls.Add(this.txtExecuteInfo);
     base.Controls.Add(this.toolStrip1);
     base.Name = "SQLProfilerForm";
     this.Text = "FastDBEngineSQLProfiler";
     base.Load += new EventHandler(this.SQLProfilerForm_Load);
     base.Shown += new EventHandler(this.SQLProfilerForm_Shown);
     base.FormClosing += new FormClosingEventHandler(this.SQLProfilerForm_FormClosing);
     this.toolStrip1.ResumeLayout(false);
     this.toolStrip1.PerformLayout();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Esempio n. 36
0
        /// <summary>
        /// Builds ands returns a context menu for files
        /// </summary>
        public ToolStripItemCollection GetContextMenu(ToolStrip owner)
        {
            ToolStripMenuItem mUpdate = new ToolStripMenuItem("Update Changelist", null, MenuViewUpdateChangelistClick);
            ToolStripMenuItem mRevert = new ToolStripMenuItem("Revert", null, MenuViewRevertClick);

            // Build the "Diff vs" submenu
            ToolStripMenuItem mDiffIndex = new ToolStripMenuItem("Index", null, MenuViewDiffClick)
            {
                ShortcutKeys = Keys.Control | Keys.D, Tag = ""
            };
            ToolStripMenuItem mDiffHead = new ToolStripMenuItem("Repository HEAD", null, MenuViewDiffClick)
            {
                ShortcutKeys = Keys.Control | Keys.Shift | Keys.D, Tag = "HEAD"
            };
            ToolStripMenuItem mDiff = new ToolStripMenuItem("Diff vs");

            mDiff.DropDownItems.Add(mDiffIndex);
            mDiff.DropDownItems.Add(mDiffHead);

            // Build the "Edit Using" submenus
            // The default option is to open the file using the OS-associated editor,
            // after which all the user-specified programs are listed
            ToolStripMenuItem mEditAssoc = new ToolStripMenuItem("Associated Editor", null, MenuViewEditClick)
            {
                ShortcutKeys = Keys.Control | Keys.Enter
            };                                                                                                                                               // Enter on it's own is better, but is not supported
            ToolStripMenuItem mEdit = new ToolStripMenuItem("Edit Using");

            mEdit.DropDownItems.Add(mEditAssoc);
            string values = Properties.Settings.Default.EditViewPrograms;

            string[] progs = values.Split(("\0").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            if (progs.Any())
            {
                mEdit.DropDownItems.Add(new ToolStripMenuItem(Path.GetFileName(progs[0]), null, MenuViewEditClick)
                {
                    Tag = progs[0], ShortcutKeys = Keys.Control | Keys.Shift | Keys.Enter
                });
                foreach (string s in progs.Skip(1))
                {
                    mEdit.DropDownItems.Add(new ToolStripMenuItem(Path.GetFileName(s), null, MenuViewEditClick)
                    {
                        Tag = s
                    });
                }
            }

            ToolStripMenuItem mRevHist = new ToolStripMenuItem("Revision History...", null, MenuViewRevHistClick)
            {
                ShortcutKeys = Keys.Control | Keys.H
            };
            ToolStripMenuItem mRename = new ToolStripMenuItem("Move/Rename...", null, MenuViewRenameClick);
            ToolStripMenuItem mDelete = new ToolStripMenuItem("Open for Delete", null, MenuViewOpenForDeleteClick);
            ToolStripMenuItem mRemove = new ToolStripMenuItem("Remove from File System", null, MenuViewRemoveFromFsClick);

            ToolStripMenuItem mExplore = new ToolStripMenuItem("Explore...", null, MenuViewExploreClick);
            ToolStripMenuItem mCommand = new ToolStripMenuItem("Command Prompt...", null, MenuViewCommandClick);

            ToolStripItemCollection menu = new ToolStripItemCollection(owner, new ToolStripItem[] {
                mUpdate,
                mRevert,
                mDiff,
                mEdit,
                mRevHist,
                new ToolStripSeparator(),
                mRename,
                mDelete,
                mRemove,
                new ToolStripSeparator(),
                mExplore, mCommand
            });

            // Enable only menu items which match the selected file conditions
            // This is a translation dictionary for our menu items
            Dictionary <FileOps, ToolStripMenuItem> menus = new Dictionary <FileOps, ToolStripMenuItem> {
                { FileOps.Update, mUpdate },
                { FileOps.Revert, mRevert },
                { FileOps.Diff, mDiff },
                { FileOps.Edit, mEdit },
                { FileOps.Rename, mRename },
                { FileOps.Delete, mDelete },
                { FileOps.DeleteFs, mRemove },
            };

            // First disable all tracked menu items);
            foreach (var toolStripMenuItem in menus)
            {
                toolStripMenuItem.Value.Enabled = false;
            }

            // If there is no current repo, disable every remaining menu in this collection
            if (App.Repos.Current == null)
            {
                mRevHist.Enabled = mExplore.Enabled = mCommand.Enabled = false;
            }
            else
            {
                // Enable all items which are allowed according to our latest selection
                foreach (var allowedOp in allowedOps.Where(menus.ContainsKey))
                {
                    menus[allowedOp].Enabled = true;
                }

                // A bit of a hack, but revision history on a file is enabled when the edit on a file is enabled
                mRevHist.Enabled = mEdit.Enabled;
            }
            return(menu);
        }
Esempio n. 37
0
        public ToolStripProperties(ToolStrip toolstrip)
        {
            if (toolstrip == null) throw new ArgumentNullException("toolstrip");
                strip = toolstrip;

                if (strip is MenuStrip)
                    SaveMenuStripText();
        }
Esempio n. 38
0
 public MyRenderer(ToolStrip toolstrip)
 {
     this.ToolStrip = toolstrip;
 }
Esempio n. 39
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AutoListForm));
     this.tooltip          = new System.Windows.Forms.ToolTip(this.components);
     this.toolBox          = new System.Windows.Forms.ToolStrip();
     this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
     this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
     this.LB = new Fireball.Windows.Forms.CodeEditor.TabListBox();
     this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
     this.toolBox.SuspendLayout();
     this.SuspendLayout();
     //
     // tooltip
     //
     this.tooltip.AutoPopDelay = 5000;
     this.tooltip.InitialDelay = 100;
     this.tooltip.ReshowDelay  = 100;
     this.tooltip.Popup       += new System.Windows.Forms.PopupEventHandler(this.tooltip_Popup);
     //
     // toolBox
     //
     this.toolBox.Dock      = System.Windows.Forms.DockStyle.Bottom;
     this.toolBox.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.toolBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.toolStripButton1,
         this.toolStripButton2,
         this.toolStripButton3
     });
     this.toolBox.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
     this.toolBox.Location    = new System.Drawing.Point(0, 239);
     this.toolBox.Name        = "toolBox";
     this.toolBox.RenderMode  = System.Windows.Forms.ToolStripRenderMode.Professional;
     this.toolBox.Size        = new System.Drawing.Size(221, 23);
     this.toolBox.TabIndex    = 1;
     this.toolBox.Text        = "toolStrip1";
     //
     // toolStripButton1
     //
     this.toolStripButton1.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.toolStripButton1.Image                 = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
     this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButton1.Name = "toolStripButton1";
     this.toolStripButton1.Size = new System.Drawing.Size(23, 20);
     this.toolStripButton1.Text = "toolStripButton1";
     //
     // toolStripButton2
     //
     this.toolStripButton2.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.toolStripButton2.Image                 = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
     this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButton2.Name = "toolStripButton2";
     this.toolStripButton2.Size = new System.Drawing.Size(23, 20);
     this.toolStripButton2.Text = "toolStripButton2";
     //
     // LB
     //
     this.LB.BorderStyle           = System.Windows.Forms.BorderStyle.None;
     this.LB.DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.LB.Font                  = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.LB.IntegralHeight        = false;
     this.LB.ItemHeight            = 16;
     this.LB.Location              = new System.Drawing.Point(5, 4);
     this.LB.Name                  = "LB";
     this.LB.Size                  = new System.Drawing.Size(213, 212);
     this.LB.Sorted                = true;
     this.LB.TabIndex              = 0;
     this.LB.DrawItem             += new System.Windows.Forms.DrawItemEventHandler(this.LB_DrawItem);
     this.LB.SelectedIndexChanged += new System.EventHandler(this.LB_SelectedIndexChanged);
     this.LB.DoubleClick          += new System.EventHandler(this.LB_DoubleClick);
     this.LB.MouseMove            += new System.Windows.Forms.MouseEventHandler(this.LB_MouseMove);
     this.LB.MouseDown            += new System.Windows.Forms.MouseEventHandler(this.LB_MouseDown);
     this.LB.KeyPress             += new System.Windows.Forms.KeyPressEventHandler(this.LB_KeyPress);
     this.LB.KeyUp                += new System.Windows.Forms.KeyEventHandler(this.LB_KeyUp);
     this.LB.KeyDown              += new System.Windows.Forms.KeyEventHandler(this.LB_KeyDown);
     this.LB.HandleDestroyed      += new System.EventHandler(this.OnHandleDestroyed);
     //
     // toolStripButton3
     //
     this.toolStripButton3.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.toolStripButton3.Image                 = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
     this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButton3.Name = "toolStripButton3";
     this.toolStripButton3.Size = new System.Drawing.Size(23, 20);
     this.toolStripButton3.Text = "toolStripButton3";
     //
     // AutoListForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize        = new System.Drawing.Size(221, 262);
     this.Controls.Add(this.toolBox);
     this.Controls.Add(this.LB);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "AutoListForm";
     this.ShowInTaskbar   = false;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.Manual;
     this.VisibleChanged += new System.EventHandler(this.AutoListForm_VisibleChanged);
     this.FormClosing    += new System.Windows.Forms.FormClosingEventHandler(this.AutoListForm_FormClosing);
     this.Resize         += new System.EventHandler(this.AutoListForm_Resize);
     this.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.AutoListForm_KeyDown);
     this.toolBox.ResumeLayout(false);
     this.toolBox.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 // Constructors
 public ToolStripRenderEventArgs(System.Drawing.Graphics g, ToolStrip toolStrip)
 {
 }
Esempio n. 41
0
		// ToolStrips use the same FlowLayout, but is made up of ToolStripItems which
		// are Components instead of Controls, so we have to duplicate this login for
		// ToolStripItems.
		private bool LayoutToolStrip (ToolStrip parent)
		{
			FlowLayoutSettings settings;
			settings = (FlowLayoutSettings)parent.LayoutSettings;

			// Nothing to layout, exit method
			if (parent.Items.Count == 0) return false;

			foreach (ToolStripItem tsi in parent.Items)
				tsi.SetPlacement (ToolStripItemPlacement.Main);
				
			// Use DisplayRectangle so that parent.Padding is honored.
			Rectangle parentDisplayRectangle = parent.DisplayRectangle;
			Point currentLocation;

			// Set our starting point based on flow direction
			switch (settings.FlowDirection) {
				case FlowDirection.BottomUp:
					currentLocation = new Point (parentDisplayRectangle.Left, parentDisplayRectangle.Bottom);
					break;
				case FlowDirection.LeftToRight:
				case FlowDirection.TopDown:
				default:
					currentLocation = parentDisplayRectangle.Location;
					break;
				case FlowDirection.RightToLeft:
					currentLocation = new Point (parentDisplayRectangle.Right, parentDisplayRectangle.Top);
					break;
			}

			bool forceFlowBreak = false;

			List<ToolStripItem> rowControls = new List<ToolStripItem> ();

			foreach (ToolStripItem c in parent.Items) {
				// Only apply layout to visible controls.
				if (!c.Available) { continue; }

				// Resize any AutoSize controls to their preferred size
				if (c.AutoSize == true)
					c.SetBounds (new Rectangle (c.Location, c.GetPreferredSize (c.Size)));

				switch (settings.FlowDirection) {
					case FlowDirection.BottomUp:
						// Decide if it's time to start a new column
						// - Our settings must be WrapContents, and we ran out of room or the previous control's FlowBreak == true
						if (settings.WrapContents)
							if ((currentLocation.Y) < (c.Height + c.Margin.Top + c.Margin.Bottom) || forceFlowBreak) {

								currentLocation.X = FinishColumn (rowControls);
								currentLocation.Y = parentDisplayRectangle.Bottom;

								forceFlowBreak = false;
								rowControls.Clear ();
							}

						// Offset the right margin and set the control to our point
						currentLocation.Offset (0, c.Margin.Bottom * -1);
						c.Location = new Point (currentLocation.X + c.Margin.Left, currentLocation.Y - c.Height);

						// Update our location pointer
						currentLocation.Y -= (c.Height + c.Margin.Top);
						break;
					case FlowDirection.LeftToRight:
					default:
						// Decide if it's time to start a new row
						// - Our settings must be WrapContents, and we ran out of room or the previous control's FlowBreak == true
						if (settings.WrapContents)
							if ((parentDisplayRectangle.Width - currentLocation.X) < (c.Width + c.Margin.Left + c.Margin.Right) || forceFlowBreak) {

								currentLocation.Y = FinishRow (rowControls);
								currentLocation.X = parentDisplayRectangle.Left;

								forceFlowBreak = false;
								rowControls.Clear ();
							}

						// Offset the left margin and set the control to our point
						currentLocation.Offset (c.Margin.Left, 0);
						c.Location = new Point (currentLocation.X, currentLocation.Y + c.Margin.Top);

						// Update our location pointer
						currentLocation.X += c.Width + c.Margin.Right;
						break;
					case FlowDirection.RightToLeft:
						// Decide if it's time to start a new row
						// - Our settings must be WrapContents, and we ran out of room or the previous control's FlowBreak == true
						if (settings.WrapContents)
							if ((currentLocation.X) < (c.Width + c.Margin.Left + c.Margin.Right) || forceFlowBreak) {

								currentLocation.Y = FinishRow (rowControls);
								currentLocation.X = parentDisplayRectangle.Right;

								forceFlowBreak = false;
								rowControls.Clear ();
							}

						// Offset the right margin and set the control to our point
						currentLocation.Offset (c.Margin.Right * -1, 0);
						c.Location = new Point (currentLocation.X - c.Width, currentLocation.Y + c.Margin.Top);

						// Update our location pointer
						currentLocation.X -= (c.Width + c.Margin.Left);
						break;
					case FlowDirection.TopDown:
						// Decide if it's time to start a new column
						// - Our settings must be WrapContents, and we ran out of room or the previous control's FlowBreak == true
						if (settings.WrapContents)
							if ((parentDisplayRectangle.Height - currentLocation.Y) < (c.Height + c.Margin.Top + c.Margin.Bottom) || forceFlowBreak) {

								currentLocation.X = FinishColumn (rowControls);
								currentLocation.Y = parentDisplayRectangle.Top;

								forceFlowBreak = false;
								rowControls.Clear ();
							}

						// Offset the top margin and set the control to our point
						currentLocation.Offset (0, c.Margin.Top);
						c.Location = new Point (currentLocation.X + c.Margin.Left, currentLocation.Y);

						// Update our location pointer
						currentLocation.Y += c.Height + c.Margin.Bottom;
						break;
				}
				// Add it to our list of things to adjust the second dimension of
				rowControls.Add (c);

				// If user set a flowbreak on this control, it will be the last one in this row/column
				if (settings.GetFlowBreak (c))
					forceFlowBreak = true;
			}

			int final_height = 0;
			
			// Set the control heights/widths for the last row/column
			if (settings.FlowDirection == FlowDirection.LeftToRight || settings.FlowDirection == FlowDirection.RightToLeft)
				final_height = FinishRow (rowControls);
			else
				FinishColumn (rowControls);

			if (final_height > 0)
				parent.SetBoundsInternal (parent.Left, parent.Top, parent.Width, final_height + parent.Padding.Bottom, BoundsSpecified.None);
				
			return false;

		}
 public ToolStripRenderEventArgs(System.Drawing.Graphics g, ToolStrip toolStrip, System.Drawing.Rectangle affectedBounds, System.Drawing.Color backColor)
 {
 }
Esempio n. 43
0
	public MainForm ()
	{
		// 
		// _toolStrip
		// 
		_toolStrip = new ToolStrip ();
		_toolStrip.Location = new Point (0, 24);
		_toolStrip.Size = new Size (632, 25);
		_toolStrip.TabIndex = 1;
		_toolStrip.Text = "ToolStrip";
		Controls.Add (_toolStrip);
		// 
		// _textBox
		// 
		_textBox = new ToolStripTextBox ();
		_toolStrip.Items.Add (_textBox);
		// 
		// _borderStyleGroupBox
		// 
		_borderStyleGroupBox = new GroupBox ();
		_borderStyleGroupBox.Dock = DockStyle.Bottom;
		_borderStyleGroupBox.Height = 85;
		_borderStyleGroupBox.Text = "BorderStyle";
		Controls.Add (_borderStyleGroupBox);
		// 
		// _fixed3DBorderStyleRadioButton
		// 
		_fixed3DBorderStyleRadioButton = new RadioButton ();
		_fixed3DBorderStyleRadioButton.Checked = true;
		_fixed3DBorderStyleRadioButton.Location = new Point (8, 16);
		_fixed3DBorderStyleRadioButton.Text = "Fixed3D";
		_fixed3DBorderStyleRadioButton.Size = new Size (95, 20);
		_fixed3DBorderStyleRadioButton.CheckedChanged += new EventHandler (Fixed3DBorderStyleRadioButton_CheckedChanged);
		_borderStyleGroupBox.Controls.Add (_fixed3DBorderStyleRadioButton);
		// 
		// _fixedSingleBorderStyleRadioButton
		// 
		_fixedSingleBorderStyleRadioButton = new RadioButton ();
		_fixedSingleBorderStyleRadioButton.Location = new Point (8, 36);
		_fixedSingleBorderStyleRadioButton.Text = "FixedSingle";
		_fixedSingleBorderStyleRadioButton.Size = new Size (95, 20);
		_fixedSingleBorderStyleRadioButton.CheckedChanged += new EventHandler (FixedSingleBorderStyleRadioButton_CheckedChanged);
		_borderStyleGroupBox.Controls.Add (_fixedSingleBorderStyleRadioButton);
		// 
		// _noneBorderStyleRadioButton
		// 
		_noneBorderStyleRadioButton = new RadioButton ();
		_noneBorderStyleRadioButton.Location = new Point (8, 56);
		_noneBorderStyleRadioButton.Text = "None";
		_noneBorderStyleRadioButton.Size = new Size (95, 20);
		_noneBorderStyleRadioButton.CheckedChanged += new EventHandler (NoneBorderStyleRadioButton_CheckedChanged);
		_borderStyleGroupBox.Controls.Add (_noneBorderStyleRadioButton);
		// 
		// MainForm
		// 
		AutoScaleDimensions = new SizeF (6F, 13F);
		AutoScaleMode = AutoScaleMode.Font;
		ClientSize = new Size (300, 120);
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82653";
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 44
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UCBrowser));
     this.ilToolbar             = new System.Windows.Forms.ImageList(this.components);
     this.toolTip1              = new System.Windows.Forms.ToolTip(this.components);
     this.wb                    = new System.Windows.Forms.WebBrowser();
     this.sbMain                = new System.Windows.Forms.StatusStrip();
     this.lblStatus             = new System.Windows.Forms.ToolStripStatusLabel();
     this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
     this.pbPage                = new System.Windows.Forms.ToolStripProgressBar();
     this.lblSecure             = new System.Windows.Forms.ToolStripStatusLabel();
     this.tsButtons             = new System.Windows.Forms.ToolStrip();
     this.tsbBack               = new System.Windows.Forms.ToolStripButton();
     this.tsbForward            = new System.Windows.Forms.ToolStripButton();
     this.tsbStop               = new System.Windows.Forms.ToolStripButton();
     this.tsbRefresh            = new System.Windows.Forms.ToolStripButton();
     this.tsAddress             = new System.Windows.Forms.ToolStrip();
     this.lblAddress            = new System.Windows.Forms.ToolStripLabel();
     this.txtAddress            = new System.Windows.Forms.ToolStripTextBox();
     this.cmdGo                 = new System.Windows.Forms.ToolStripButton();
     this.sbMain.SuspendLayout();
     this.tsButtons.SuspendLayout();
     this.tsAddress.SuspendLayout();
     this.SuspendLayout();
     //
     // ilToolbar
     //
     this.ilToolbar.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilToolbar.ImageStream")));
     this.ilToolbar.TransparentColor = System.Drawing.Color.Transparent;
     this.ilToolbar.Images.SetKeyName(0, "");
     this.ilToolbar.Images.SetKeyName(1, "");
     this.ilToolbar.Images.SetKeyName(2, "");
     this.ilToolbar.Images.SetKeyName(3, "");
     //
     // wb
     //
     this.wb.AllowWebBrowserDrop = false;
     this.wb.Dock                       = System.Windows.Forms.DockStyle.Fill;
     this.wb.Location                   = new System.Drawing.Point(0, 50);
     this.wb.MinimumSize                = new System.Drawing.Size(20, 20);
     this.wb.Name                       = "wb";
     this.wb.ScriptErrorsSuppressed     = true;
     this.wb.Size                       = new System.Drawing.Size(644, 407);
     this.wb.TabIndex                   = 7;
     this.wb.TabStop                    = false;
     this.wb.WebBrowserShortcutsEnabled = false;
     this.wb.Navigated                 += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.wb_Navigated);
     this.wb.Navigating                += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.wb_Navigating);
     this.wb.PreviewKeyDown            += new System.Windows.Forms.PreviewKeyDownEventHandler(this.wb_PreviewKeyDown);
     this.wb.NewWindow                 += new System.ComponentModel.CancelEventHandler(this.wb_NewWindow);
     this.wb.DocumentCompleted         += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.wb_DocumentCompleted);
     //
     // sbMain
     //
     this.sbMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.lblStatus,
         this.toolStripStatusLabel2,
         this.pbPage,
         this.lblSecure
     });
     this.sbMain.Location   = new System.Drawing.Point(0, 457);
     this.sbMain.Name       = "sbMain";
     this.sbMain.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
     this.sbMain.Size       = new System.Drawing.Size(644, 22);
     this.sbMain.SizingGrip = false;
     this.sbMain.TabIndex   = 8;
     this.sbMain.Text       = "statusStrip1";
     //
     // lblStatus
     //
     this.lblStatus.Image = global::TSDev.Properties.Resources.window_earth;
     this.lblStatus.Name  = "lblStatus";
     this.lblStatus.Size  = new System.Drawing.Size(54, 17);
     this.lblStatus.Text  = "Ready";
     //
     // toolStripStatusLabel2
     //
     this.toolStripStatusLabel2.Name   = "toolStripStatusLabel2";
     this.toolStripStatusLabel2.Size   = new System.Drawing.Size(575, 17);
     this.toolStripStatusLabel2.Spring = true;
     //
     // pbPage
     //
     this.pbPage.Name    = "pbPage";
     this.pbPage.Padding = new System.Windows.Forms.Padding(5, 0, 20, 0);
     this.pbPage.Size    = new System.Drawing.Size(125, 16);
     this.pbPage.Visible = false;
     //
     // lblSecure
     //
     this.lblSecure.Image   = global::TSDev.Properties.Resources._lock;
     this.lblSecure.Name    = "lblSecure";
     this.lblSecure.Size    = new System.Drawing.Size(113, 17);
     this.lblSecure.Text    = "Secure SSL 128-Bit";
     this.lblSecure.Visible = false;
     //
     // tsButtons
     //
     this.tsButtons.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.tsButtons.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.tsbBack,
         this.tsbForward,
         this.tsbStop,
         this.tsbRefresh
     });
     this.tsButtons.Location        = new System.Drawing.Point(0, 0);
     this.tsButtons.Name            = "tsButtons";
     this.tsButtons.Size            = new System.Drawing.Size(644, 25);
     this.tsButtons.TabIndex        = 9;
     this.tsButtons.Text            = "toolStrip1";
     this.tsButtons.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.tsButtons_PreviewKeyDown);
     //
     // tsbBack
     //
     this.tsbBack.Image = global::TSDev.Properties.Resources.arrow_left_blue;
     this.tsbBack.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tsbBack.Name   = "tsbBack";
     this.tsbBack.Size   = new System.Drawing.Size(49, 22);
     this.tsbBack.Text   = "Back";
     this.tsbBack.Click += new System.EventHandler(this.tsbBack_Click);
     //
     // tsbForward
     //
     this.tsbForward.Image = global::TSDev.Properties.Resources.arrow_right_blue;
     this.tsbForward.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tsbForward.Name   = "tsbForward";
     this.tsbForward.Size   = new System.Drawing.Size(67, 22);
     this.tsbForward.Text   = "Forward";
     this.tsbForward.Click += new System.EventHandler(this.tsbForward_Click);
     //
     // tsbStop
     //
     this.tsbStop.Image = global::TSDev.Properties.Resources.stop;
     this.tsbStop.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tsbStop.Name   = "tsbStop";
     this.tsbStop.Size   = new System.Drawing.Size(49, 22);
     this.tsbStop.Text   = "Stop";
     this.tsbStop.Click += new System.EventHandler(this.tsbStop_Click);
     //
     // tsbRefresh
     //
     this.tsbRefresh.Image = global::TSDev.Properties.Resources.refresh;
     this.tsbRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.tsbRefresh.Name   = "tsbRefresh";
     this.tsbRefresh.Size   = new System.Drawing.Size(65, 22);
     this.tsbRefresh.Text   = "Refresh";
     this.tsbRefresh.Click += new System.EventHandler(this.tsbRefresh_Click);
     //
     // tsAddress
     //
     this.tsAddress.CanOverflow = false;
     this.tsAddress.GripStyle   = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.tsAddress.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.lblAddress,
         this.txtAddress,
         this.cmdGo
     });
     this.tsAddress.Location        = new System.Drawing.Point(0, 25);
     this.tsAddress.Name            = "tsAddress";
     this.tsAddress.Size            = new System.Drawing.Size(644, 25);
     this.tsAddress.TabIndex        = 10;
     this.tsAddress.Text            = "toolStrip2";
     this.tsAddress.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.tsAddress_PreviewKeyDown);
     //
     // lblAddress
     //
     this.lblAddress.Name     = "lblAddress";
     this.lblAddress.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
     this.lblAddress.Size     = new System.Drawing.Size(50, 22);
     this.lblAddress.Text     = "Ad&dress:";
     //
     // txtAddress
     //
     this.txtAddress.AutoCompleteMode   = System.Windows.Forms.AutoCompleteMode.Suggest;
     this.txtAddress.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.AllUrl;
     this.txtAddress.AutoSize           = false;
     this.txtAddress.Name     = "txtAddress";
     this.txtAddress.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
     this.txtAddress.Size     = new System.Drawing.Size(100, 25);
     this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
     this.txtAddress.Enter   += new System.EventHandler(this.txtAddress_Enter);
     this.txtAddress.Leave   += new System.EventHandler(this.txtAddress_Leave);
     //
     // cmdGo
     //
     this.cmdGo.Image = global::TSDev.Properties.Resources.nav_right_green;
     this.cmdGo.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.cmdGo.Name     = "cmdGo";
     this.cmdGo.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
     this.cmdGo.Size     = new System.Drawing.Size(40, 22);
     this.cmdGo.Text     = "Go";
     this.cmdGo.Click   += new System.EventHandler(this.cmdGo_Click);
     //
     // UCBrowser
     //
     this.Controls.Add(this.wb);
     this.Controls.Add(this.tsAddress);
     this.Controls.Add(this.tsButtons);
     this.Controls.Add(this.sbMain);
     this.Font            = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name            = "UCBrowser";
     this.Size            = new System.Drawing.Size(644, 479);
     this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.UCBrowser_PreviewKeyDown);
     this.Load           += new System.EventHandler(this.UCBrowser_Load);
     this.Resize         += new System.EventHandler(this.UCBrowser_Resize);
     this.KeyDown        += new System.Windows.Forms.KeyEventHandler(this.UCBrowser_KeyDown);
     this.sbMain.ResumeLayout(false);
     this.sbMain.PerformLayout();
     this.tsButtons.ResumeLayout(false);
     this.tsButtons.PerformLayout();
     this.tsAddress.ResumeLayout(false);
     this.tsAddress.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Esempio n. 45
0
 private void InitializeComponent()
 {
     this.icontainer_0 = new Container();
     ComponentResourceManager manager = new ComponentResourceManager(typeof(MainForm));
     this.toolStrip1 = new ToolStrip();
     this.btnOpenDirectory = new ToolStripButton();
     this.toolStripSeparator1 = new ToolStripSeparator();
     this.btnAddFile = new ToolStripButton();
     this.btnDeleteFile = new ToolStripButton();
     this.toolStripSeparator2 = new ToolStripSeparator();
     this.btnAddCommand = new ToolStripButton();
     this.btnEditCommand = new ToolStripButton();
     this.btnDeleteCommnad = new ToolStripButton();
     this.toolStripSeparator3 = new ToolStripSeparator();
     this.btnSaveAll = new ToolStripButton();
     this.toolStripSeparator4 = new ToolStripSeparator();
     this.btnFindCommand = new ToolStripButton();
     this.toolStripSeparator5 = new ToolStripSeparator();
     this.btnHelp = new ToolStripButton();
     this.statusStrip1 = new StatusStrip();
     this.labCurrentPath = new ToolStripStatusLabel();
     this.labMessage = new ToolStripStatusLabel();
     this.treeView1 = new TreeView();
     this.imageList_0 = new ImageList(this.icontainer_0);
     this.splitter1 = new Splitter();
     this.panel1 = new Panel();
     this.txtSQL = new SyntaxHighlighterControlFix();
     this.splitter2 = new Splitter();
     this.txtXML = new SyntaxHighlighterControlFix();
     this.contextMenuStrip1 = new ContextMenuStrip(this.icontainer_0);
     this.menuAdd = new ToolStripMenuItem();
     this.menuEdit = new ToolStripMenuItem();
     this.menuDelete = new ToolStripMenuItem();
     this.menuPaste = new ToolStripMenuItem();
     this.toolStripMenuItem1 = new ToolStripSeparator();
     this.menuCopyName = new ToolStripMenuItem();
     this.menuCopyXml = new ToolStripMenuItem();
     this.toolStripMenuItem2 = new ToolStripSeparator();
     this.menuGenerateCallCode = new ToolStripMenuItem();
     this.fileSystemWatcher_0 = new FileSystemWatcher();
     this.timer_0 = new Timer(this.icontainer_0);
     this.toolStrip1.SuspendLayout();
     this.statusStrip1.SuspendLayout();
     this.panel1.SuspendLayout();
     this.contextMenuStrip1.SuspendLayout();
     this.fileSystemWatcher_0.BeginInit();
     base.SuspendLayout();
     this.toolStrip1.Items.AddRange(new ToolStripItem[] { this.btnOpenDirectory, this.toolStripSeparator1, this.btnAddFile, this.btnDeleteFile, this.toolStripSeparator2, this.btnAddCommand, this.btnEditCommand, this.btnDeleteCommnad, this.toolStripSeparator3, this.btnSaveAll, this.toolStripSeparator4, this.btnFindCommand, this.toolStripSeparator5, this.btnHelp });
     this.toolStrip1.Location = new Point(0, 0);
     this.toolStrip1.Name = "toolStrip1";
     this.toolStrip1.Size = new Size(0x39b, 0x19);
     this.toolStrip1.TabIndex = 0;
     this.toolStrip1.Text = "toolStrip1";
        // this.btnOpenDirectory.Image = Resources.openfolderHS;
     this.btnOpenDirectory.ImageTransparentColor = Color.Magenta;
     this.btnOpenDirectory.Name = "btnOpenDirectory";
     this.btnOpenDirectory.Size = new Size(0x5c, 0x16);
     this.btnOpenDirectory.Text = "打开目录(&D)";
     this.btnOpenDirectory.Click += new EventHandler(this.btnOpenDirectory_Click);
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new Size(6, 0x19);
     //this.btnAddFile.Image = Resources.NewFolderHS;
     this.btnAddFile.ImageTransparentColor = Color.Magenta;
     this.btnAddFile.Name = "btnAddFile";
     this.btnAddFile.Size = new Size(0x5d, 0x16);
     this.btnAddFile.Text = "新增文件(&N)";
     this.btnAddFile.Click += new EventHandler(this.btnAddFile_Click);
     //this.btnDeleteFile.Image = Resources.DeleteFolderHS;
     this.btnDeleteFile.ImageTransparentColor = Color.Magenta;
     this.btnDeleteFile.Name = "btnDeleteFile";
     this.btnDeleteFile.Size = new Size(0x4b, 0x16);
     this.btnDeleteFile.Text = "删除文件";
     this.btnDeleteFile.Click += new EventHandler(this.btnDeleteFile_Click);
     this.toolStripSeparator2.Name = "toolStripSeparator2";
     this.toolStripSeparator2.Size = new Size(6, 0x19);
        // this.btnAddCommand.Image = Resources.NewDocumentHS;
     this.btnAddCommand.ImageTransparentColor = Color.Magenta;
     this.btnAddCommand.Name = "btnAddCommand";
     this.btnAddCommand.Size = new Size(0x5b, 0x16);
     this.btnAddCommand.Text = "新增命令(&C)";
     this.btnAddCommand.Click += new EventHandler(this.menuAdd_Click);
     //this.btnEditCommand.Image = (Image) manager.GetObject("btnEditCommand.Image");
     this.btnEditCommand.ImageTransparentColor = Color.Magenta;
     this.btnEditCommand.Name = "btnEditCommand";
     this.btnEditCommand.Size = new Size(90, 0x16);
     this.btnEditCommand.Text = "修改命令(&E)";
     this.btnEditCommand.Click += new EventHandler(this.menuEdit_Click);
       //  this.btnDeleteCommnad.Image = Resources.DeleteHS;
     this.btnDeleteCommnad.ImageTransparentColor = Color.Magenta;
     this.btnDeleteCommnad.Name = "btnDeleteCommnad";
     this.btnDeleteCommnad.Size = new Size(0x4b, 0x16);
     this.btnDeleteCommnad.Text = "删除命令";
     this.btnDeleteCommnad.Click += new EventHandler(this.menuDelete_Click);
     this.toolStripSeparator3.Name = "toolStripSeparator3";
     this.toolStripSeparator3.Size = new Size(6, 0x19);
       //  this.btnSaveAll.Image = Resources.SaveAllHS;
     this.btnSaveAll.ImageTransparentColor = Color.Magenta;
     this.btnSaveAll.Name = "btnSaveAll";
     this.btnSaveAll.Size = new Size(0x72, 0x16);
     this.btnSaveAll.Text = "保存所有修改(&S)";
     this.btnSaveAll.Click += new EventHandler(this.btnSaveAll_Click);
     this.toolStripSeparator4.Name = "toolStripSeparator4";
     this.toolStripSeparator4.Size = new Size(6, 0x19);
       //  this.btnFindCommand.Image = Resources.FindHS;
     this.btnFindCommand.ImageTransparentColor = Color.Magenta;
     this.btnFindCommand.Name = "btnFindCommand";
     this.btnFindCommand.Size = new Size(0x59, 0x16);
     this.btnFindCommand.Text = "查找命令(&F)";
     this.btnFindCommand.Click += new EventHandler(this.btnFindCommand_Click);
     this.toolStripSeparator5.Name = "toolStripSeparator5";
     this.toolStripSeparator5.Size = new Size(6, 0x19);
     this.btnHelp.DisplayStyle = ToolStripItemDisplayStyle.Image;
      //   this.btnHelp.Image = Resources.Help;
     this.btnHelp.ImageTransparentColor = Color.Magenta;
     this.btnHelp.Name = "btnHelp";
     this.btnHelp.Size = new Size(0x17, 0x16);
     this.btnHelp.Text = "帮助页面";
     this.btnHelp.ToolTipText = "查看帮助页面";
     this.btnHelp.Click += new EventHandler(this.btnHelp_Click);
     this.statusStrip1.Items.AddRange(new ToolStripItem[] { this.labCurrentPath, this.labMessage });
     this.statusStrip1.Location = new Point(0, 0x1dd);
     this.statusStrip1.Name = "statusStrip1";
     this.statusStrip1.Size = new Size(0x39b, 0x18);
     this.statusStrip1.TabIndex = 1;
     this.statusStrip1.Text = "statusStrip1";
     this.labCurrentPath.BorderSides = ToolStripStatusLabelBorderSides.All;
     this.labCurrentPath.BorderStyle = Border3DStyle.SunkenOuter;
     this.labCurrentPath.ForeColor = Color.Tomato;
     this.labCurrentPath.IsLink = true;
     this.labCurrentPath.LinkBehavior = LinkBehavior.NeverUnderline;
     this.labCurrentPath.LinkColor = Color.Tomato;
     this.labCurrentPath.Name = "labCurrentPath";
     this.labCurrentPath.Size = new Size(0x61, 0x13);
     this.labCurrentPath.Text = "labCurrentPath";
     this.labCurrentPath.TextAlign = ContentAlignment.MiddleLeft;
     this.labCurrentPath.Click += new EventHandler(this.labCurrentPath_Click);
     this.labMessage.Name = "labMessage";
     this.labMessage.Size = new Size(0x32b, 0x13);
     this.labMessage.Spring = true;
     this.labMessage.Text = "Ready.";
     this.labMessage.TextAlign = ContentAlignment.MiddleLeft;
     this.treeView1.Dock = DockStyle.Left;
     this.treeView1.ImageIndex = 0;
     this.treeView1.ImageList = this.imageList_0;
     this.treeView1.Location = new Point(0, 0x19);
     this.treeView1.Name = "treeView1";
     this.treeView1.SelectedImageIndex = 0;
     this.treeView1.Size = new Size(0xe3, 0x1c4);
     this.treeView1.TabIndex = 2;
     this.treeView1.NodeMouseDoubleClick += new TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
     this.treeView1.AfterSelect += new TreeViewEventHandler(this.treeView1_AfterSelect);
     this.treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
     this.treeView1.KeyDown += new KeyEventHandler(this.treeView1_KeyDown);
     this.imageList_0.ColorDepth = ColorDepth.Depth8Bit;
     this.imageList_0.ImageSize = new Size(0x10, 0x10);
     this.imageList_0.TransparentColor = Color.Transparent;
     this.splitter1.Location = new Point(0xe3, 0x19);
     this.splitter1.Name = "splitter1";
     this.splitter1.Size = new Size(7, 0x1c4);
     this.splitter1.TabIndex = 3;
     this.splitter1.TabStop = false;
     this.panel1.Controls.Add(this.txtSQL);
     this.panel1.Controls.Add(this.splitter2);
     this.panel1.Controls.Add(this.txtXML);
     this.panel1.Dock = DockStyle.Fill;
     this.panel1.Location = new Point(0xea, 0x19);
     this.panel1.Name = "panel1";
     this.panel1.Size = new Size(0x2b1, 0x1c4);
     this.panel1.TabIndex = 4;
     this.txtSQL.Dock = DockStyle.Fill;
     this.txtSQL.Location = new Point(0, 0);
     this.txtSQL.Name = "txtSQL";
     this.txtSQL.Size = new Size(0x2b1, 0xc0);
     this.txtSQL.TabIndex = 2;
     this.splitter2.Dock = DockStyle.Bottom;
     this.splitter2.Location = new Point(0, 0xc0);
     this.splitter2.Name = "splitter2";
     this.splitter2.Size = new Size(0x2b1, 7);
     this.splitter2.TabIndex = 1;
     this.splitter2.TabStop = false;
     this.txtXML.Dock = DockStyle.Bottom;
     this.txtXML.SetLanguage("xml");
     this.txtXML.Location = new Point(0, 0xc7);
     this.txtXML.Name = "txtXML";
     this.txtXML.Size = new Size(0x2b1, 0xfd);
     this.txtXML.TabIndex = 0;
     this.contextMenuStrip1.Items.AddRange(new ToolStripItem[] { this.menuAdd, this.menuEdit, this.menuDelete, this.menuPaste, this.toolStripMenuItem1, this.menuCopyName, this.menuCopyXml, this.toolStripMenuItem2, this.menuGenerateCallCode });
     this.contextMenuStrip1.Name = "contextMenuStrip1";
     this.contextMenuStrip1.Size = new Size(0xb3, 170);
     this.contextMenuStrip1.Opening += new CancelEventHandler(this.contextMenuStrip1_Opening);
        // this.menuAdd.Image = Resources.NewDocumentHS;
     this.menuAdd.Name = "menuAdd";
     this.menuAdd.Size = new Size(0xb2, 0x16);
     this.menuAdd.Text = "新增命令";
     this.menuAdd.Click += new EventHandler(this.menuAdd_Click);
     //this.menuEdit.Image = Resources.EditTableHS;
     this.menuEdit.Name = "menuEdit";
     this.menuEdit.Size = new Size(0xb2, 0x16);
     this.menuEdit.Text = "修改命令";
     this.menuEdit.Click += new EventHandler(this.menuEdit_Click);
        // this.menuDelete.Image = Resources.DeleteHS;
     this.menuDelete.Name = "menuDelete";
     this.menuDelete.Size = new Size(0xb2, 0x16);
     this.menuDelete.Text = "删除命令";
     this.menuDelete.Click += new EventHandler(this.menuDelete_Click);
        // this.menuPaste.Image = Resources.PasteHS;
     this.menuPaste.Name = "menuPaste";
     this.menuPaste.Size = new Size(0xb2, 0x16);
     this.menuPaste.Text = "粘贴命令";
     this.menuPaste.Click += new EventHandler(this.menuPaste_Click);
     this.toolStripMenuItem1.Name = "toolStripMenuItem1";
     this.toolStripMenuItem1.Size = new Size(0xaf, 6);
        // this.menuCopyName.Image = Resources.CopyHS;
     this.menuCopyName.Name = "menuCopyName";
     this.menuCopyName.Size = new Size(0xb2, 0x16);
     this.menuCopyName.Text = "复制名称   Ctrl-C";
     this.menuCopyName.Click += new EventHandler(this.menuCopyName_Click);
     this.menuCopyXml.Name = "menuCopyXml";
     this.menuCopyXml.Size = new Size(0xb2, 0x16);
     this.menuCopyXml.Text = "复制节点XML";
     this.menuCopyXml.Click += new EventHandler(this.menuCopyXml_Click);
     this.toolStripMenuItem2.Name = "toolStripMenuItem2";
     this.toolStripMenuItem2.Size = new Size(0xaf, 6);
        // this.menuGenerateCallCode.Image = Resources.Bitmap_0;
     this.menuGenerateCallCode.Name = "menuGenerateCallCode";
     this.menuGenerateCallCode.Size = new Size(0xb2, 0x16);
     this.menuGenerateCallCode.Text = "生成调用代码   F12";
     this.menuGenerateCallCode.Click += new EventHandler(this.menuGenerateCallCode_Click);
     this.fileSystemWatcher_0.EnableRaisingEvents = true;
     this.fileSystemWatcher_0.SynchronizingObject = this;
     this.fileSystemWatcher_0.Deleted += new FileSystemEventHandler(this.fileSystemWatcher_0_Changed);
     this.fileSystemWatcher_0.Created += new FileSystemEventHandler(this.fileSystemWatcher_0_Changed);
     this.fileSystemWatcher_0.Changed += new FileSystemEventHandler(this.fileSystemWatcher_0_Changed);
     this.timer_0.Enabled = true;
     this.timer_0.Interval = 500;
     this.timer_0.Tick += new EventHandler(this.timer_0_Tick);
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(0x39b, 0x1f5);
     base.Controls.Add(this.panel1);
     base.Controls.Add(this.splitter1);
     base.Controls.Add(this.treeView1);
     base.Controls.Add(this.statusStrip1);
     base.Controls.Add(this.toolStrip1);
     this.MinimumSize = new Size(700, 400);
     base.Name = "MainForm";
     this.Text = "FastDBEngine XmlCommandTool";
     base.WindowState = FormWindowState.Maximized;
     base.Load += new EventHandler(this.MainForm_Load);
     base.FormClosing += new FormClosingEventHandler(this.MainForm_FormClosing);
     this.toolStrip1.ResumeLayout(false);
     this.toolStrip1.PerformLayout();
     this.statusStrip1.ResumeLayout(false);
     this.statusStrip1.PerformLayout();
     this.panel1.ResumeLayout(false);
     this.contextMenuStrip1.ResumeLayout(false);
     this.fileSystemWatcher_0.EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Esempio n. 46
0
 public void Apply(ToolStrip toolStrip)
 {
     toolStrip.CanOverflow = CanOverflow;
     toolStrip.LayoutStyle = LayoutStyle;
     toolStrip.Visible     = IsVisible;
 }
 public void Join(ToolStrip toolStripToDrag)
 {
 }
Esempio n. 48
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CirculationLoginDlg));
     this.checkBox_savePasswordShort = new System.Windows.Forms.CheckBox();
     this.textBox_password           = new System.Windows.Forms.TextBox();
     this.textBox_userName           = new System.Windows.Forms.TextBox();
     this.button_cancel                            = new System.Windows.Forms.Button();
     this.label3                                   = new System.Windows.Forms.Label();
     this.label_userName                           = new System.Windows.Forms.Label();
     this.label1                                   = new System.Windows.Forms.Label();
     this.button_OK                                = new System.Windows.Forms.Button();
     this.textBox_comment                          = new System.Windows.Forms.TextBox();
     this.textBox_location                         = new System.Windows.Forms.TextBox();
     this.label4                                   = new System.Windows.Forms.Label();
     this.checkBox_isReader                        = new System.Windows.Forms.CheckBox();
     this.checkBox_savePasswordLong                = new System.Windows.Forms.CheckBox();
     this.toolStrip_server                         = new System.Windows.Forms.ToolStrip();
     this.toolStripButton_server_setXeServer       = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator1                      = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripButton_server_setHongnibaServer = new System.Windows.Forms.ToolStripButton();
     this.comboBox_serverAddr                      = new System.Windows.Forms.ComboBox();
     this.toolStrip_server.SuspendLayout();
     this.SuspendLayout();
     //
     // checkBox_savePasswordShort
     //
     this.checkBox_savePasswordShort.Anchor          = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.checkBox_savePasswordShort.AutoSize        = true;
     this.checkBox_savePasswordShort.FlatStyle       = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox_savePasswordShort.Location        = new System.Drawing.Point(120, 290);
     this.checkBox_savePasswordShort.Name            = "checkBox_savePasswordShort";
     this.checkBox_savePasswordShort.Size            = new System.Drawing.Size(111, 16);
     this.checkBox_savePasswordShort.TabIndex        = 7;
     this.checkBox_savePasswordShort.Text            = "短期保持密码(&S)";
     this.checkBox_savePasswordShort.CheckedChanged += new System.EventHandler(this.checkBox_savePasswordShort_CheckedChanged);
     this.checkBox_savePasswordShort.Click          += new System.EventHandler(this.controls_Click);
     //
     // textBox_password
     //
     this.textBox_password.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.textBox_password.BackColor    = System.Drawing.SystemColors.ControlLight;
     this.textBox_password.BorderStyle  = System.Windows.Forms.BorderStyle.FixedSingle;
     this.textBox_password.ForeColor    = System.Drawing.SystemColors.ControlText;
     this.textBox_password.ImeMode      = System.Windows.Forms.ImeMode.Off;
     this.textBox_password.Location     = new System.Drawing.Point(120, 266);
     this.textBox_password.Name         = "textBox_password";
     this.textBox_password.PasswordChar = '*';
     this.textBox_password.Size         = new System.Drawing.Size(156, 21);
     this.textBox_password.TabIndex     = 6;
     this.textBox_password.Click       += new System.EventHandler(this.controls_Click);
     this.textBox_password.TextChanged += new System.EventHandler(this.textBox_password_TextChanged);
     //
     // textBox_userName
     //
     this.textBox_userName.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.textBox_userName.BackColor   = System.Drawing.SystemColors.ControlLight;
     this.textBox_userName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.textBox_userName.ForeColor   = System.Drawing.SystemColors.ControlText;
     this.textBox_userName.ImeMode     = System.Windows.Forms.ImeMode.Off;
     this.textBox_userName.Location    = new System.Drawing.Point(120, 221);
     this.textBox_userName.Name        = "textBox_userName";
     this.textBox_userName.Size        = new System.Drawing.Size(156, 21);
     this.textBox_userName.TabIndex    = 3;
     this.textBox_userName.Click      += new System.EventHandler(this.controls_Click);
     //
     // button_cancel
     //
     this.button_cancel.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.button_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.button_cancel.FlatStyle    = System.Windows.Forms.FlatStyle.Flat;
     this.button_cancel.Location     = new System.Drawing.Point(348, 340);
     this.button_cancel.Name         = "button_cancel";
     this.button_cancel.Size         = new System.Drawing.Size(78, 24);
     this.button_cancel.TabIndex     = 11;
     this.button_cancel.Text         = "取消";
     this.button_cancel.Click       += new System.EventHandler(this.button_cancel_Click);
     //
     // label3
     //
     this.label3.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(10, 268);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(53, 12);
     this.label3.TabIndex = 5;
     this.label3.Text     = "密码(&P):";
     //
     // label_userName
     //
     this.label_userName.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.label_userName.AutoSize = true;
     this.label_userName.Location = new System.Drawing.Point(10, 223);
     this.label_userName.Name     = "label_userName";
     this.label_userName.Size     = new System.Drawing.Size(65, 12);
     this.label_userName.TabIndex = 2;
     this.label_userName.Text     = "用户名(&U):";
     //
     // label1
     //
     this.label1.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(10, 149);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(149, 12);
     this.label1.TabIndex = 1;
     this.label1.Text     = "图书馆应用服务器地址(&H):";
     //
     // button_OK
     //
     this.button_OK.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.button_OK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button_OK.Location  = new System.Drawing.Point(348, 310);
     this.button_OK.Name      = "button_OK";
     this.button_OK.Size      = new System.Drawing.Size(78, 24);
     this.button_OK.TabIndex  = 10;
     this.button_OK.Text      = "确定";
     this.button_OK.Click    += new System.EventHandler(this.button_OK_Click);
     //
     // textBox_comment
     //
     this.textBox_comment.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                          | System.Windows.Forms.AnchorStyles.Left)
                                                                         | System.Windows.Forms.AnchorStyles.Right)));
     this.textBox_comment.BackColor   = System.Drawing.SystemColors.ControlDarkDark;
     this.textBox_comment.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.textBox_comment.Font        = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.textBox_comment.ForeColor   = System.Drawing.SystemColors.ControlLightLight;
     this.textBox_comment.Location    = new System.Drawing.Point(12, 12);
     this.textBox_comment.Multiline   = true;
     this.textBox_comment.Name        = "textBox_comment";
     this.textBox_comment.ReadOnly    = true;
     this.textBox_comment.ScrollBars  = System.Windows.Forms.ScrollBars.Vertical;
     this.textBox_comment.Size        = new System.Drawing.Size(414, 126);
     this.textBox_comment.TabIndex    = 0;
     this.textBox_comment.TextAlign   = System.Windows.Forms.HorizontalAlignment.Center;
     //
     // textBox_location
     //
     this.textBox_location.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.textBox_location.BackColor   = System.Drawing.SystemColors.ControlLight;
     this.textBox_location.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.textBox_location.ForeColor   = System.Drawing.SystemColors.ControlText;
     this.textBox_location.ImeMode     = System.Windows.Forms.ImeMode.Off;
     this.textBox_location.Location    = new System.Drawing.Point(120, 312);
     this.textBox_location.Name        = "textBox_location";
     this.textBox_location.Size        = new System.Drawing.Size(156, 21);
     this.textBox_location.TabIndex    = 9;
     this.textBox_location.Click      += new System.EventHandler(this.controls_Click);
     //
     // label4
     //
     this.label4.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(10, 314);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(77, 12);
     this.label4.TabIndex = 8;
     this.label4.Text     = "工作台号(&W):";
     //
     // checkBox_isReader
     //
     this.checkBox_isReader.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.checkBox_isReader.AutoSize  = true;
     this.checkBox_isReader.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox_isReader.Location  = new System.Drawing.Point(120, 244);
     this.checkBox_isReader.Name      = "checkBox_isReader";
     this.checkBox_isReader.Size      = new System.Drawing.Size(63, 16);
     this.checkBox_isReader.TabIndex  = 4;
     this.checkBox_isReader.Text      = "读者(&R)";
     this.checkBox_isReader.UseVisualStyleBackColor = true;
     this.checkBox_isReader.CheckedChanged         += new System.EventHandler(this.checkBox_isReader_CheckedChanged);
     this.checkBox_isReader.Click += new System.EventHandler(this.controls_Click);
     //
     // checkBox_savePasswordLong
     //
     this.checkBox_savePasswordLong.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.checkBox_savePasswordLong.AutoSize  = true;
     this.checkBox_savePasswordLong.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.checkBox_savePasswordLong.Location  = new System.Drawing.Point(12, 348);
     this.checkBox_savePasswordLong.Name      = "checkBox_savePasswordLong";
     this.checkBox_savePasswordLong.Size      = new System.Drawing.Size(111, 16);
     this.checkBox_savePasswordLong.TabIndex  = 12;
     this.checkBox_savePasswordLong.Text      = "长期保持密码(&L)";
     this.checkBox_savePasswordLong.UseVisualStyleBackColor = true;
     this.checkBox_savePasswordLong.CheckedChanged         += new System.EventHandler(this.checkBox_savePasswordLong_CheckedChanged);
     this.checkBox_savePasswordLong.Click += new System.EventHandler(this.controls_Click);
     //
     // toolStrip_server
     //
     this.toolStrip_server.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.toolStrip_server.AutoSize  = false;
     this.toolStrip_server.Dock      = System.Windows.Forms.DockStyle.None;
     this.toolStrip_server.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.toolStrip_server.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.toolStripButton_server_setXeServer,
         this.toolStripSeparator1,
         this.toolStripButton_server_setHongnibaServer
     });
     this.toolStrip_server.Location   = new System.Drawing.Point(12, 184);
     this.toolStrip_server.Name       = "toolStrip_server";
     this.toolStrip_server.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
     this.toolStrip_server.Size       = new System.Drawing.Size(414, 25);
     this.toolStrip_server.TabIndex   = 26;
     this.toolStrip_server.Text       = "toolStrip1";
     //
     // toolStripButton_server_setXeServer
     //
     this.toolStripButton_server_setXeServer.Alignment             = System.Windows.Forms.ToolStripItemAlignment.Right;
     this.toolStripButton_server_setXeServer.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.toolStripButton_server_setXeServer.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButton_server_setXeServer.Name        = "toolStripButton_server_setXeServer";
     this.toolStripButton_server_setXeServer.Size        = new System.Drawing.Size(84, 22);
     this.toolStripButton_server_setXeServer.Text        = "单机版服务器";
     this.toolStripButton_server_setXeServer.ToolTipText = "设为单机版服务器";
     this.toolStripButton_server_setXeServer.Click      += new System.EventHandler(this.toolStripButton_server_setXeServer_Click);
     //
     // toolStripSeparator1
     //
     this.toolStripSeparator1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
     this.toolStripSeparator1.Name      = "toolStripSeparator1";
     this.toolStripSeparator1.Size      = new System.Drawing.Size(6, 25);
     //
     // toolStripButton_server_setHongnibaServer
     //
     this.toolStripButton_server_setHongnibaServer.Alignment             = System.Windows.Forms.ToolStripItemAlignment.Right;
     this.toolStripButton_server_setHongnibaServer.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.toolStripButton_server_setHongnibaServer.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButton_server_setHongnibaServer.Name        = "toolStripButton_server_setHongnibaServer";
     this.toolStripButton_server_setHongnibaServer.Size        = new System.Drawing.Size(135, 22);
     this.toolStripButton_server_setHongnibaServer.Text        = "红泥巴.数字平台服务器";
     this.toolStripButton_server_setHongnibaServer.ToolTipText = "设为红泥巴.数字平台服务器";
     this.toolStripButton_server_setHongnibaServer.Click      += new System.EventHandler(this.toolStripButton_server_setHongnibaServer_Click);
     //
     // comboBox_serverAddr
     //
     this.comboBox_serverAddr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.comboBox_serverAddr.BackColor         = System.Drawing.SystemColors.ControlLight;
     this.comboBox_serverAddr.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.comboBox_serverAddr.ForeColor         = System.Drawing.SystemColors.ControlText;
     this.comboBox_serverAddr.FormattingEnabled = true;
     this.comboBox_serverAddr.Location          = new System.Drawing.Point(12, 164);
     this.comboBox_serverAddr.Name                  = "comboBox_serverAddr";
     this.comboBox_serverAddr.Size                  = new System.Drawing.Size(414, 20);
     this.comboBox_serverAddr.TabIndex              = 27;
     this.comboBox_serverAddr.SelectedIndexChanged += new System.EventHandler(this.comboBox_serverAddr_SelectedIndexChanged);
     this.comboBox_serverAddr.Click                += new System.EventHandler(this.controls_Click);
     //
     // CirculationLoginDlg
     //
     this.AcceptButton        = this.button_OK;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.SystemColors.ControlDark;
     this.ClientSize          = new System.Drawing.Size(438, 376);
     this.Controls.Add(this.comboBox_serverAddr);
     this.Controls.Add(this.checkBox_savePasswordLong);
     this.Controls.Add(this.checkBox_isReader);
     this.Controls.Add(this.textBox_location);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.textBox_comment);
     this.Controls.Add(this.checkBox_savePasswordShort);
     this.Controls.Add(this.textBox_password);
     this.Controls.Add(this.textBox_userName);
     this.Controls.Add(this.button_cancel);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label_userName);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.button_OK);
     this.Controls.Add(this.toolStrip_server);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name          = "CirculationLoginDlg";
     this.ShowInTaskbar = false;
     this.Text          = "登录";
     this.Load         += new System.EventHandler(this.LoginDlg_Load);
     this.toolStrip_server.ResumeLayout(false);
     this.toolStrip_server.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 public void Join(ToolStrip toolStripToDrag, int x, int y)
 {
 }
Esempio n. 50
0
        /// <summary>
        /// Adds or removes the visit count list view or the source code
        /// panel.
        /// </summary>
        void UpdateDisplay()
        {
            CreateTreeView();

            if (showVisitCountPanel)
            {
                CreateListView();
            }
            else
            {
                DisposeListView();
            }

            if (showSourceCodePanel)
            {
                CreateTextEditor();
            }
            else
            {
                DisposeTextEditor();
            }

            if (showVisitCountPanel || showSourceCodePanel)
            {
                CreateVerticalSplitContainer();
            }
            else
            {
                DisposeVerticalSplitContainer();
            }

            if (showSourceCodePanel && showVisitCountPanel)
            {
                CreateHorizontalSplitContainer();
            }
            else
            {
                DisposeHorizontalSplitContainer();
            }

            // Add tree view.
            if (showVisitCountPanel || showSourceCodePanel)
            {
                if (Controls.Contains(treeView))
                {
                    Controls.Remove(treeView);
                }
                if (!verticalSplitContainer.Panel1.Controls.Contains(treeView))
                {
                    verticalSplitContainer.Panel1.Controls.Add(treeView);
                }
            }
            else
            {
                if (!Controls.Contains(treeView))
                {
                    Controls.Add(treeView);
                }
            }

            // Add list view.
            if (showVisitCountPanel)
            {
                if (showSourceCodePanel)
                {
                    if (verticalSplitContainer.Panel2.Controls.Contains(listView))
                    {
                        verticalSplitContainer.Panel2.Controls.Remove(listView);
                    }
                    if (!horizontalSplitContainer.Panel1.Controls.Contains(listView))
                    {
                        horizontalSplitContainer.Panel1.Controls.Add(listView);
                    }
                }
                else
                {
                    if (!verticalSplitContainer.Panel2.Controls.Contains(listView))
                    {
                        verticalSplitContainer.Panel2.Controls.Add(listView);
                    }
                }
            }

            // Add text editor
            if (showSourceCodePanel)
            {
                if (showVisitCountPanel)
                {
                    if (verticalSplitContainer.Panel2.Controls.Contains(textEditorHost))
                    {
                        verticalSplitContainer.Panel2.Controls.Remove(textEditorHost);
                    }
                    if (!horizontalSplitContainer.Panel2.Controls.Contains(textEditorHost))
                    {
                        horizontalSplitContainer.Panel2.Controls.Add(textEditorHost);
                    }
                }
                else
                {
                    if (!verticalSplitContainer.Panel2.Controls.Contains(textEditorHost))
                    {
                        verticalSplitContainer.Panel2.Controls.Add(textEditorHost);
                    }
                }
            }

            // Add vertical split container.
            if (showVisitCountPanel || showSourceCodePanel)
            {
                if (!Controls.Contains(verticalSplitContainer))
                {
                    Controls.Add(verticalSplitContainer);
                }
            }

            // Add horizontal split container.
            if (showVisitCountPanel && showSourceCodePanel)
            {
                if (!verticalSplitContainer.Panel2.Controls.Contains(horizontalSplitContainer))
                {
                    verticalSplitContainer.Panel2.Controls.Add(horizontalSplitContainer);
                }
            }

            // Add toolstrip - need to re-add it last otherwise the
            // other controls will be displayed underneath it.
            if (toolStrip == null)
            {
                toolStrip           = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/CodeCoveragePad/Toolbar");
                toolStrip.GripStyle = ToolStripGripStyle.Hidden;
            }
            if (Controls.Contains(toolStrip))
            {
                Controls.Remove(toolStrip);
            }
            Controls.Add(toolStrip);
        }
Esempio n. 51
0
        private void InitializeComponent()
        {
            Text = "Graphite";
            ClientSize = new Size (640, 480);

            _toolStrip = new ToolStrip();
            _toolStrip.SuspendLayout ();
            SuspendLayout ();

            var g = CreateCommandGroups ();
            CreateToolbarButtons (g);
            CreateShapeSelector ();
            CreateMenu (g);
            CreateScene ();

            Controls.Add (_toolStrip);
            Controls.Add (_scene);
            Controls.Add (_menuStrip);

            _toolStrip.ResumeLayout (false);
            ResumeLayout (false);
            PerformLayout ();
        }
Esempio n. 52
0
		/// <summary>
		/// Disables all of a ToolStrip's children (recursively),
		/// but not the ToolStrip itself
		/// </summary>
		public static void Disable(ToolStrip ts) {
			Endisable(ts, false, PropagationMode.CHILDREN);
		}
Esempio n. 53
0
        // Gives parented ToolStrips a transparent background.
        protected override void Initialize(ToolStrip toolStrip)
        {
            if (toolStrip.Parent is ToolStripPanel)
                toolStrip.BackColor = Color.Transparent;

            base.Initialize(toolStrip);
        }
Esempio n. 54
0
 public void ExtendStatusBar(ToolStrip _statusbar)
 {
     // Nothing at this level.
     // No sub modules.
 }
 // Constructors
 public ToolStripAccessibleObject(ToolStrip owner)
 {
 }
Esempio n. 56
0
 public void RemoveToolStripItems(ToolStrip toolStrip)
 {
     // Remove all items from the toolbar
 }
Esempio n. 57
0
 private void InitializeComponent()
 {
     this.icontainer_0 = new Container();
     this.panel1 = new Panel();
     this.groupBox2 = new GroupBox();
     this.listView1 = new ListView();
     this.columnHeader_0 = new ColumnHeader();
     this.columnHeader_1 = new ColumnHeader();
     this.columnHeader_2 = new ColumnHeader();
     this.columnHeader_3 = new ColumnHeader();
     this.imageList_0 = new ImageList(this.icontainer_0);
     this.toolStrip1 = new ToolStrip();
     this.btnAdd = new ToolStripButton();
     this.btnEdit = new ToolStripButton();
     this.btnDelete = new ToolStripButton();
     this.panel2 = new Panel();
     this.btnImport = new Button();
     this.btnCancel = new Button();
     this.btnOK = new Button();
     this.groupBox1 = new GroupBox();
     this.cboCommandType = new ComboBox();
     this.label3 = new Label();
     this.txtDataBase = new TextBox();
     this.label2 = new Label();
     this.txtName = new TextBox();
     this.label1 = new Label();
     this.splitter1 = new Splitter();
     this.txtCode = new SyntaxHighlighterControl();
     this.label4 = new Label();
     this.nudTimeout = new NumericUpDown();
     this.panel1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.toolStrip1.SuspendLayout();
     this.panel2.SuspendLayout();
     this.groupBox1.SuspendLayout();
     this.nudTimeout.BeginInit();
     base.SuspendLayout();
     this.panel1.Controls.Add(this.groupBox2);
     this.panel1.Controls.Add(this.panel2);
     this.panel1.Controls.Add(this.groupBox1);
     this.panel1.Dock = DockStyle.Right;
     this.panel1.Location = new Point(0x296, 3);
     this.panel1.Name = "panel1";
     this.panel1.Size = new Size(0x189, 0x214);
     this.panel1.TabIndex = 0;
     this.groupBox2.Controls.Add(this.listView1);
     this.groupBox2.Controls.Add(this.toolStrip1);
     this.groupBox2.Dock = DockStyle.Fill;
     this.groupBox2.Location = new Point(0, 0x73);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new Size(0x189, 0x176);
     this.groupBox2.TabIndex = 2;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "命令参数";
     this.listView1.Columns.AddRange(new ColumnHeader[] { this.columnHeader_0, this.columnHeader_1, this.columnHeader_2, this.columnHeader_3 });
     this.listView1.Dock = DockStyle.Fill;
     this.listView1.FullRowSelect = true;
     this.listView1.HideSelection = false;
     this.listView1.Location = new Point(3, 0x2a);
     this.listView1.MultiSelect = false;
     this.listView1.Name = "listView1";
     this.listView1.Size = new Size(0x183, 0x149);
     this.listView1.SmallImageList = this.imageList_0;
     this.listView1.TabIndex = 1;
     this.listView1.UseCompatibleStateImageBehavior = false;
     this.listView1.View = View.Details;
     this.listView1.ItemActivate += new EventHandler(this.btnEdit_Click);
     this.listView1.Resize += new EventHandler(this.listView1_Resize);
     this.columnHeader_0.Text = "Name";
     this.columnHeader_0.Width = 0x8e;
     this.columnHeader_1.Text = "Type";
     this.columnHeader_1.Width = 0x54;
     this.columnHeader_2.Text = "Direction";
     this.columnHeader_2.Width = 0x4e;
     this.columnHeader_3.Text = "Size";
     this.columnHeader_3.TextAlign = HorizontalAlignment.Right;
     this.columnHeader_3.Width = 0x37;
     this.imageList_0.ColorDepth = ColorDepth.Depth8Bit;
     this.imageList_0.ImageSize = new Size(0x10, 0x10);
     this.imageList_0.TransparentColor = Color.Transparent;
     this.toolStrip1.Items.AddRange(new ToolStripItem[] { this.btnAdd, this.btnEdit, this.btnDelete });
     this.toolStrip1.Location = new Point(3, 0x11);
     this.toolStrip1.Name = "toolStrip1";
     this.toolStrip1.Size = new Size(0x183, 0x19);
     this.toolStrip1.TabIndex = 0;
     this.toolStrip1.Text = "toolStrip1";
     //this.btnAdd.Image = Resources.NewDocumentHS;
     this.btnAdd.ImageTransparentColor = Color.Magenta;
     this.btnAdd.Name = "btnAdd";
     this.btnAdd.Size = new Size(0x33, 0x16);
     this.btnAdd.Text = "新增";
     this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
     // this.btnEdit.Image = Resources.EditTableHS;
     this.btnEdit.ImageTransparentColor = Color.Magenta;
     this.btnEdit.Name = "btnEdit";
     this.btnEdit.Size = new Size(0x33, 0x16);
     this.btnEdit.Text = "修改";
     this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
     //this.btnDelete.Image = Resources.DeleteHS;
     this.btnDelete.ImageTransparentColor = Color.Magenta;
     this.btnDelete.Name = "btnDelete";
     this.btnDelete.Size = new Size(0x33, 0x16);
     this.btnDelete.Text = "删除";
     this.btnDelete.Click += new EventHandler(this.btnDelete_Click);
     this.panel2.Controls.Add(this.btnImport);
     this.panel2.Controls.Add(this.btnCancel);
     this.panel2.Controls.Add(this.btnOK);
     this.panel2.Dock = DockStyle.Bottom;
     this.panel2.Location = new Point(0, 0x1e9);
     this.panel2.Name = "panel2";
     this.panel2.Size = new Size(0x189, 0x2b);
     this.panel2.TabIndex = 1;
     this.btnImport.Location = new Point(7, 10);
     this.btnImport.Name = "btnImport";
     this.btnImport.Size = new Size(100, 0x17);
     this.btnImport.TabIndex = 2;
     this.btnImport.Text = "从剪切板导入";
     this.btnImport.UseVisualStyleBackColor = true;
     this.btnImport.Visible = false;
     this.btnImport.Click += new EventHandler(this.btnImport_Click);
     this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     this.btnCancel.DialogResult = DialogResult.Cancel;
     this.btnCancel.Location = new Point(0x12d, 10);
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.Size = new Size(0x4b, 0x17);
     this.btnCancel.TabIndex = 1;
     this.btnCancel.Text = "取消(&C)";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnOK.Anchor = AnchorStyles.Right | AnchorStyles.Top;
     this.btnOK.Location = new Point(0xce, 10);
     this.btnOK.Name = "btnOK";
     this.btnOK.Size = new Size(0x4b, 0x17);
     this.btnOK.TabIndex = 0;
     this.btnOK.Text = "确定(&K)";
     this.btnOK.UseVisualStyleBackColor = true;
     this.btnOK.Click += new EventHandler(this.btnOK_Click);
     this.groupBox1.Controls.Add(this.nudTimeout);
     this.groupBox1.Controls.Add(this.label4);
     this.groupBox1.Controls.Add(this.cboCommandType);
     this.groupBox1.Controls.Add(this.label3);
     this.groupBox1.Controls.Add(this.txtDataBase);
     this.groupBox1.Controls.Add(this.label2);
     this.groupBox1.Controls.Add(this.txtName);
     this.groupBox1.Controls.Add(this.label1);
     this.groupBox1.Dock = DockStyle.Top;
     this.groupBox1.Location = new Point(0, 0);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new Size(0x189, 0x73);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "基本信息";
     this.cboCommandType.DropDownStyle = ComboBoxStyle.DropDownList;
     this.cboCommandType.FormattingEnabled = true;
     this.cboCommandType.Location = new Point(0x3e, 0x4c);
     this.cboCommandType.Name = "cboCommandType";
     this.cboCommandType.Size = new Size(0xae, 20);
     this.cboCommandType.TabIndex = 5;
     this.label3.AutoSize = true;
     this.label3.Location = new Point(10, 80);
     this.label3.Name = "label3";
     this.label3.Size = new Size(0x1d, 12);
     this.label3.TabIndex = 4;
     this.label3.Text = "类型";
     this.txtDataBase.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.txtDataBase.Font = new Font("Courier New", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.txtDataBase.Location = new Point(0x3e, 0x2d);
     this.txtDataBase.Name = "txtDataBase";
     this.txtDataBase.Size = new Size(0x13e, 0x15);
     this.txtDataBase.TabIndex = 3;
     this.label2.AutoSize = true;
     this.label2.Location = new Point(10, 50);
     this.label2.Name = "label2";
     this.label2.Size = new Size(0x29, 12);
     this.label2.TabIndex = 2;
     this.label2.Text = "数据库";
     this.txtName.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.txtName.Font = new Font("Courier New", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.txtName.Location = new Point(0x3e, 0x12);
     this.txtName.Name = "txtName";
     this.txtName.Size = new Size(0x13e, 0x15);
     this.txtName.TabIndex = 1;
     this.label1.AutoSize = true;
     this.label1.ForeColor = Color.Red;
     this.label1.Location = new Point(10, 0x17);
     this.label1.Name = "label1";
     this.label1.Size = new Size(0x23, 12);
     this.label1.TabIndex = 0;
     this.label1.Text = "名称*";
     this.splitter1.Dock = DockStyle.Right;
     this.splitter1.Location = new Point(0x28f, 3);
     this.splitter1.Name = "splitter1";
     this.splitter1.Size = new Size(7, 0x214);
     this.splitter1.TabIndex = 1;
     this.splitter1.TabStop = false;
     this.txtCode.Dock = DockStyle.Fill;
     this.txtCode.Location = new Point(3, 3);
     this.txtCode.Name = "txtCode";
     this.txtCode.method_6(false);
     this.txtCode.Size = new Size(0x28c, 0x214);
     this.txtCode.TabIndex = 2;
     this.label4.AutoSize = true;
     this.label4.Location = new Point(0xf3, 80);
     this.label4.Name = "label4";
     this.label4.Size = new Size(0x35, 12);
     this.label4.TabIndex = 6;
     this.label4.Text = "超时(秒)";
     this.nudTimeout.Font = new Font("Courier New", 9f);
     this.nudTimeout.Location = new Point(0x12d, 0x4c);
     int[] bits = new int[4];
     bits[0] = 0x186a0;
     this.nudTimeout.Maximum = new decimal(bits);
     this.nudTimeout.Name = "nudTimeout";
     this.nudTimeout.Size = new Size(0x4f, 0x15);
     this.nudTimeout.TabIndex = 7;
     bits = new int[4];
     bits[0] = 30;
     this.nudTimeout.Value = new decimal(bits);
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.CancelButton = this.btnCancel;
     base.ClientSize = new Size(0x422, 0x21a);
     base.Controls.Add(this.txtCode);
     base.Controls.Add(this.splitter1);
     base.Controls.Add(this.panel1);
     base.MinimizeBox = false;
     base.Name = "EditCommandDialog";
     base.Padding = new Padding(3);
     base.ShowIcon = false;
     base.ShowInTaskbar = false;
     base.StartPosition = FormStartPosition.CenterScreen;
     this.Text = "新增命令";
     base.Load += new EventHandler(this.EditCommandDialog_Load);
     base.Shown += new EventHandler(this.EditCommandDialog_Shown);
     this.panel1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     this.toolStrip1.ResumeLayout(false);
     this.toolStrip1.PerformLayout();
     this.panel2.ResumeLayout(false);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.nudTimeout.EndInit();
     base.ResumeLayout(false);
 }
Esempio n. 58
0
 public void AddToolStripItems(ToolStrip toolStrip)
 {
     // Add items to the toolbar here
 }
Esempio n. 59
0
        private void InitializeComponent()
        {
            components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(TagGridContainer));

            lstStructuresGrid                   = new ListView();
            columnHeader1                       = new ColumnHeader();
            columnHeader3                       = new ColumnHeader();
            columnHeader4                       = new ColumnHeader();
            columnHeader5                       = new ColumnHeader();
            columnHeader6                       = new ColumnHeader();
            lstIdentGrid                        = new ListView();
            columnHeader7                       = new ColumnHeader();
            columnHeader9                       = new ColumnHeader();
            columnHeader10                      = new ColumnHeader();
            columnHeader11                      = new ColumnHeader();
            columnHeader12                      = new ColumnHeader();
            panel1                              = new Panel();
            lstStringIdentifiersGrid            = new ListView();
            columnHeader8                       = new ColumnHeader();
            columnHeader13                      = new ColumnHeader();
            columnHeader14                      = new ColumnHeader();
            columnHeader15                      = new ColumnHeader();
            toolStrip1                          = new ToolStrip();
            menuItemShow                        = new ToolStripSplitButton();
            structuresAndVoidsToolStripMenuItem = new ToolStripMenuItem();
            tagReferencesToolStripMenuItem      = new ToolStripMenuItem();
            stringIdentifiersToolStripMenuItem  = new ToolStripMenuItem();
            tagDataVoidsToolStripMenuItem       = new ToolStripMenuItem();
            lstVoidsGrid                        = new ListView();
            columnHeader16                      = new ColumnHeader();
            columnHeader18                      = new ColumnHeader();
            columnHeader20                      = new ColumnHeader();
            columnHeader21                      = new ColumnHeader();
            contextMenuStrip1                   = new ContextMenuStrip(components);
            swapSelectedToolStripMenuItem       = new ToolStripMenuItem();
            goToInCurrentTabToolStripMenuItem   = new ToolStripMenuItem();
            goToInNewTabToolStripMenuItem       = new ToolStripMenuItem();
            panel1.SuspendLayout();
            toolStrip1.SuspendLayout();
            contextMenuStrip1.SuspendLayout();
            base.SuspendLayout();
            lstStructuresGrid.BackColor = Color.White;
            lstStructuresGrid.Columns.AddRange(new ColumnHeader[] { columnHeader1, columnHeader3, columnHeader4, columnHeader5, columnHeader6 });
            lstStructuresGrid.ForeColor = Color.Black;
            lstStructuresGrid.GridLines = true;
            lstStructuresGrid.Location  = new Point(3, 0x18);
            lstStructuresGrid.Name      = "lstStructuresGrid";
            lstStructuresGrid.Size      = new Size(0x1aa, 0x146);
            lstStructuresGrid.TabIndex  = 4;
            lstStructuresGrid.UseCompatibleStateImageBehavior = false;
            lstStructuresGrid.View = View.Details;
            columnHeader1.Text     = "Name";
            columnHeader3.Text     = "Offset";
            columnHeader4.Text     = "Count";
            columnHeader5.Text     = "Size";
            columnHeader6.Text     = "Pointer";
            lstIdentGrid.BackColor = Color.White;
            lstIdentGrid.Columns.AddRange(new ColumnHeader[] { columnHeader7, columnHeader9, columnHeader10, columnHeader11, columnHeader12 });
            lstIdentGrid.ContextMenuStrip = contextMenuStrip1;
            lstIdentGrid.ForeColor        = Color.Black;
            lstIdentGrid.GridLines        = true;
            lstIdentGrid.Location         = new Point(0x45, 0x18);
            lstIdentGrid.Name             = "lstIdentGrid";
            lstIdentGrid.Size             = new Size(0x1aa, 0x146);
            lstIdentGrid.TabIndex         = 5;
            lstIdentGrid.UseCompatibleStateImageBehavior = false;
            lstIdentGrid.View   = View.Details;
            columnHeader7.Text  = "Name";
            columnHeader9.Text  = "Offset";
            columnHeader10.Text = "Identifier";
            columnHeader11.Text = "Class";
            columnHeader12.Text = "Name";
            panel1.Anchor       = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            panel1.Controls.Add(lstIdentGrid);
            panel1.Controls.Add(lstVoidsGrid);
            panel1.Controls.Add(lstStringIdentifiersGrid);
            panel1.Controls.Add(lstStructuresGrid);
            panel1.Location = new Point(0, 0);
            panel1.Name     = "panel1";
            panel1.Size     = new Size(0x21b, 0x171);
            panel1.TabIndex = 7;
            lstStringIdentifiersGrid.BackColor = Color.White;
            lstStringIdentifiersGrid.Columns.AddRange(new ColumnHeader[] { columnHeader8, columnHeader13, columnHeader14, columnHeader15 });
            lstStringIdentifiersGrid.ForeColor = Color.Black;
            lstStringIdentifiersGrid.GridLines = true;
            lstStringIdentifiersGrid.Location  = new Point(0x17, 0x18);
            lstStringIdentifiersGrid.Name      = "lstStringIdentifiersGrid";
            lstStringIdentifiersGrid.Size      = new Size(0x1aa, 0x146);
            lstStringIdentifiersGrid.TabIndex  = 6;
            lstStringIdentifiersGrid.UseCompatibleStateImageBehavior = false;
            lstStringIdentifiersGrid.View = View.Details;
            columnHeader8.Text            = "Name";
            columnHeader13.Text           = "Offset";
            columnHeader14.Text           = "Value";
            columnHeader15.Text           = "String";
            toolStrip1.Dock = DockStyle.Bottom;
            toolStrip1.Items.AddRange(new ToolStripItem[] { menuItemShow });
            toolStrip1.Location       = new Point(0, 0x171);
            toolStrip1.Name           = "toolStrip1";
            toolStrip1.Size           = new Size(0x21b, 0x19);
            toolStrip1.TabIndex       = 7;
            toolStrip1.Text           = "toolStrip1";
            menuItemShow.DisplayStyle = ToolStripItemDisplayStyle.Text;
            menuItemShow.DropDownItems.AddRange(new ToolStripItem[] { structuresAndVoidsToolStripMenuItem, tagDataVoidsToolStripMenuItem, tagReferencesToolStripMenuItem, stringIdentifiersToolStripMenuItem });
            menuItemShow.Image = (Image)manager.GetObject("menuItemShow.Image");
            menuItemShow.ImageTransparentColor = Color.Magenta;
            menuItemShow.Name         = "menuItemShow";
            menuItemShow.Size         = new Size(0x34, 0x16);
            menuItemShow.Text         = "Show";
            menuItemShow.ButtonClick += new EventHandler(menuItemShow_ButtonClick);
            structuresAndVoidsToolStripMenuItem.CheckOnClick = true;
            structuresAndVoidsToolStripMenuItem.Name         = "structuresAndVoidsToolStripMenuItem";
            structuresAndVoidsToolStripMenuItem.Size         = new Size(0xa1, 0x16);
            structuresAndVoidsToolStripMenuItem.Text         = "Structures";
            structuresAndVoidsToolStripMenuItem.Click       += new EventHandler(structuresAndVoidsToolStripMenuItem_Click);
            tagReferencesToolStripMenuItem.CheckOnClick      = true;
            tagReferencesToolStripMenuItem.Name             = "tagReferencesToolStripMenuItem";
            tagReferencesToolStripMenuItem.Size             = new Size(0xa1, 0x16);
            tagReferencesToolStripMenuItem.Text             = "Tag References";
            tagReferencesToolStripMenuItem.Click           += new EventHandler(tagReferencesToolStripMenuItem_Click);
            stringIdentifiersToolStripMenuItem.CheckOnClick = true;
            stringIdentifiersToolStripMenuItem.Name         = "stringIdentifiersToolStripMenuItem";
            stringIdentifiersToolStripMenuItem.Size         = new Size(0xa1, 0x16);
            stringIdentifiersToolStripMenuItem.Text         = "String Identifiers";
            stringIdentifiersToolStripMenuItem.Click       += new EventHandler(stringIdentifiersToolStripMenuItem_Click);
            tagDataVoidsToolStripMenuItem.Name   = "tagDataVoidsToolStripMenuItem";
            tagDataVoidsToolStripMenuItem.Size   = new Size(0xa1, 0x16);
            tagDataVoidsToolStripMenuItem.Text   = "Tag Data / Voids";
            tagDataVoidsToolStripMenuItem.Click += new EventHandler(tagDataVoidsToolStripMenuItem_Click);
            lstVoidsGrid.BackColor = Color.White;
            lstVoidsGrid.Columns.AddRange(new ColumnHeader[] { columnHeader16, columnHeader18, columnHeader20, columnHeader21 });
            lstVoidsGrid.ForeColor = Color.Black;
            lstVoidsGrid.GridLines = true;
            lstVoidsGrid.Location  = new Point(0x17, 0x18);
            lstVoidsGrid.Name      = "lstVoidsGrid";
            lstVoidsGrid.Size      = new Size(0x1aa, 0x146);
            lstVoidsGrid.TabIndex  = 7;
            lstVoidsGrid.UseCompatibleStateImageBehavior = false;
            lstVoidsGrid.View   = View.Details;
            columnHeader16.Text = "Name";
            columnHeader18.Text = "Offset";
            columnHeader20.Text = "Size";
            columnHeader21.Text = "Pointer";
            contextMenuStrip1.Items.AddRange(new ToolStripItem[] { swapSelectedToolStripMenuItem, goToInCurrentTabToolStripMenuItem, goToInNewTabToolStripMenuItem });
            contextMenuStrip1.Name                   = "contextMenuStrip1";
            contextMenuStrip1.Size                   = new Size(0xba, 0x5c);
            swapSelectedToolStripMenuItem.Name       = "swapSelectedToolStripMenuItem";
            swapSelectedToolStripMenuItem.Size       = new Size(0x98, 0x16);
            swapSelectedToolStripMenuItem.Text       = "Swap Selected";
            swapSelectedToolStripMenuItem.Click     += new EventHandler(swapSelectedToolStripMenuItem_Click);
            goToInCurrentTabToolStripMenuItem.Name   = "goToInCurrentTabToolStripMenuItem";
            goToInCurrentTabToolStripMenuItem.Size   = new Size(0xb9, 0x16);
            goToInCurrentTabToolStripMenuItem.Text   = "Go to: In Current Tab";
            goToInCurrentTabToolStripMenuItem.Click += new EventHandler(goToInCurrentTabToolStripMenuItem_Click);
            goToInNewTabToolStripMenuItem.Name       = "goToInNewTabToolStripMenuItem";
            goToInNewTabToolStripMenuItem.Size       = new Size(0xb9, 0x16);
            goToInNewTabToolStripMenuItem.Text       = "Go to: In New Tab";
            goToInNewTabToolStripMenuItem.Click     += new EventHandler(goToInNewTabToolStripMenuItem_Click);
            base.AutoScaleDimensions                 = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(toolStrip1);
            base.Controls.Add(panel1);
            base.Name = "TagGridContainer";
            base.Size = new Size(0x21b, 0x18a);
            panel1.ResumeLayout(false);
            toolStrip1.ResumeLayout(false);
            toolStrip1.PerformLayout();
            contextMenuStrip1.ResumeLayout(false);
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Esempio n. 60
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TiffViewerCtl));
     this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
     this.tiffviewer1         = new NAPS2.WinForms.TiffViewer();
     this.tStrip              = new System.Windows.Forms.ToolStrip();
     this.tsStretch           = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
     this.tsZoomActual        = new System.Windows.Forms.ToolStripButton();
     this.tsZoomPlus          = new System.Windows.Forms.ToolStripButton();
     this.tsZoomOut           = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
     this.tsZoom              = new System.Windows.Forms.ToolStripLabel();
     this.toolStripContainer1.ContentPanel.SuspendLayout();
     this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
     this.toolStripContainer1.SuspendLayout();
     this.tStrip.SuspendLayout();
     this.SuspendLayout();
     //
     // toolStripContainer1
     //
     //
     // toolStripContainer1.ContentPanel
     //
     this.toolStripContainer1.ContentPanel.Controls.Add(this.tiffviewer1);
     resources.ApplyResources(this.toolStripContainer1.ContentPanel, "toolStripContainer1.ContentPanel");
     resources.ApplyResources(this.toolStripContainer1, "toolStripContainer1");
     this.toolStripContainer1.Name = "toolStripContainer1";
     //
     // toolStripContainer1.TopToolStripPanel
     //
     this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.tStrip);
     //
     // tiffviewer1
     //
     resources.ApplyResources(this.tiffviewer1, "tiffviewer1");
     this.tiffviewer1.BackColor = System.Drawing.Color.White;
     this.tiffviewer1.Name      = "tiffviewer1";
     this.tiffviewer1.Zoom      = 0;
     this.tiffviewer1.KeyDown  += new System.Windows.Forms.KeyEventHandler(this.tiffviewer1_KeyDown);
     //
     // tStrip
     //
     resources.ApplyResources(this.tStrip, "tStrip");
     this.tStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.tsStretch,
         this.toolStripSeparator1,
         this.tsZoomActual,
         this.tsZoomPlus,
         this.tsZoomOut,
         this.toolStripSeparator2,
         this.tsZoom
     });
     this.tStrip.Name = "tStrip";
     //
     // tsStretch
     //
     this.tsStretch.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tsStretch.Image        = global::NAPS2.Icons.arrow_out;
     resources.ApplyResources(this.tsStretch, "tsStretch");
     this.tsStretch.Name            = "tsStretch";
     this.tsStretch.CheckedChanged += new System.EventHandler(this.tsStretch_CheckedChanged);
     this.tsStretch.Click          += new System.EventHandler(this.tsStretch_Click);
     //
     // toolStripSeparator1
     //
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
     //
     // tsZoomActual
     //
     this.tsZoomActual.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tsZoomActual.Image        = global::NAPS2.Icons.zoom_actual;
     resources.ApplyResources(this.tsZoomActual, "tsZoomActual");
     this.tsZoomActual.Name   = "tsZoomActual";
     this.tsZoomActual.Click += new System.EventHandler(this.tsZoomActual_Click);
     //
     // tsZoomPlus
     //
     this.tsZoomPlus.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tsZoomPlus.Image        = global::NAPS2.Icons.zoom_in;
     resources.ApplyResources(this.tsZoomPlus, "tsZoomPlus");
     this.tsZoomPlus.Name   = "tsZoomPlus";
     this.tsZoomPlus.Click += new System.EventHandler(this.tsZoomPlus_Click);
     //
     // tsZoomOut
     //
     this.tsZoomOut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.tsZoomOut.Image        = global::NAPS2.Icons.zoom_out;
     resources.ApplyResources(this.tsZoomOut, "tsZoomOut");
     this.tsZoomOut.Name   = "tsZoomOut";
     this.tsZoomOut.Click += new System.EventHandler(this.tsZoomOut_Click);
     //
     // toolStripSeparator2
     //
     this.toolStripSeparator2.Name = "toolStripSeparator2";
     resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
     //
     // tsZoom
     //
     this.tsZoom.Name = "tsZoom";
     resources.ApplyResources(this.tsZoom, "tsZoom");
     //
     // TiffViewerCtl
     //
     this.Controls.Add(this.toolStripContainer1);
     this.Name = "TiffViewerCtl";
     resources.ApplyResources(this, "$this");
     this.SizeChanged += new System.EventHandler(this.TiffViewer_SizeChanged);
     this.toolStripContainer1.ContentPanel.ResumeLayout(false);
     this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
     this.toolStripContainer1.TopToolStripPanel.PerformLayout();
     this.toolStripContainer1.ResumeLayout(false);
     this.toolStripContainer1.PerformLayout();
     this.tStrip.ResumeLayout(false);
     this.tStrip.PerformLayout();
     this.ResumeLayout(false);
 }