Beispiel #1
0
        public void Initialize()
        {
            UpdateRenderer();
            ReadMaxViewContentCount();
            MenuComplete += new EventHandler(SetStandardStatusBar);
            SetStandardStatusBar(null, null);
            try
            {
                ArrayList contents = AddInTree.GetTreeNode(viewContentPath).BuildChildItems(this);
                foreach (PadDescriptor content in contents)
                {
                    if (content != null)
                    {
                        ShowPad(content);
                    }
                }
            }
            catch (TreePathNotFoundException) { }

            CreateMainMenu();
            CreateToolBars();

            toolbarUpdateTimer          = new System.Windows.Forms.Timer();
            toolbarUpdateTimer.Tick    += new EventHandler(UpdateMenu);
            toolbarUpdateTimer.Tick    += new EventHandler(ClearMemory);
            toolbarUpdateTimer.Interval = 500;
            toolbarUpdateTimer.Start();

            RightToLeftConverter.Convert(this);
        }
 public void ApplyRightToLeftConverter(Control control, bool recurse)
 {
     if (recurse)
     {
         RightToLeftConverter.ConvertRecursive(control);
     }
     else
     {
         RightToLeftConverter.Convert(control);
     }
 }
        public void InitializeWorkspace()
        {
            UpdateRenderer();

            MenuComplete += new EventHandler(SetStandardStatusBar);

            SetStandardStatusBar(null, null);

            ProjectService.CurrentProjectChanged += new ProjectEventHandler(SetProjectTitle);

            FileService.FileRemoved  += CheckRemovedOrReplacedFile;
            FileService.FileReplaced += CheckRemovedOrReplacedFile;
            FileService.FileRenamed  += CheckRenamedFile;

            FileService.FileRemoved += FileService.RecentOpen.FileRemoved;
            FileService.FileRenamed += FileService.RecentOpen.FileRenamed;

            try {
                ArrayList contents = AddInTree.GetTreeNode(viewContentPath).BuildChildItems(this);
                foreach (PadDescriptor content in contents)
                {
                    if (content != null)
                    {
                        ShowPad(content);
                    }
                }
            } catch (TreePathNotFoundException) {}

            CreateMainMenu();
            CreateToolBars();

            toolbarUpdateTimer       = new System.Windows.Forms.Timer();
            toolbarUpdateTimer.Tick += new EventHandler(UpdateMenu);

            toolbarUpdateTimer.Interval = 500;
            toolbarUpdateTimer.Start();

            RightToLeftConverter.Convert(this);
        }
Beispiel #4
0
        public void InitializeWorkspace()
        {
            UpdateRenderer();

            try
            {
                ArrayList contents      = AddInTree.GetTreeNode(viewContentPath).BuildChildItems(this);
                ArrayList viewMenuItems = new ArrayList();
                foreach (PadDescriptor content in contents)
                {
                    if (content != null)
                    {
                        ShowPad(content);
                        viewMenuItems.Add(new MyMenuItem(content));
                    }
                }
                // 创建outlook
                CreateOutlook(contents);
                if (viewMenuItems.Count > 0)
                {
                    _ViewItem = viewMenuItems.ToArray(typeof(ToolStripItem)) as ToolStripItem[];
                }
            }
            catch (Exception ex)
            {
            }

            CreateMainMenu();

            toolbarUpdateTimer       = new System.Windows.Forms.Timer();
            toolbarUpdateTimer.Tick += delegate
            {
                UpdateMenus();
            };
            toolbarUpdateTimer.Interval = 500;
            toolbarUpdateTimer.Start();

            RightToLeftConverter.Convert(this);
        }
        protected void MyInitializeComponents()
        {
            InitializeComponent();

            foreach (Control ctl in Controls.GetRecursive())
            {
                ctl.Text = StringParser.Parse(ctl.Text);
            }
            this.Text = StringParser.Parse(this.Text);
            RightToLeftConverter.Convert(this);

            ImageList imglist = new ImageList();

            imglist.ColorDepth = ColorDepth.Depth32Bit;
            imglist.Images.Add(IconService.GetBitmap("Icons.16x16.OpenFolderBitmap"));
            imglist.Images.Add(IconService.GetBitmap("Icons.16x16.ClosedFolderBitmap"));
            categoryTreeView.ImageList = imglist;

            templateListView.SelectedIndexChanged += new EventHandler(SelectedIndexChange);
            categoryTreeView.AfterSelect          += new TreeViewEventHandler(CategoryChange);
            categoryTreeView.BeforeSelect         += new TreeViewCancelEventHandler(OnBeforeExpand);
            categoryTreeView.BeforeExpand         += new TreeViewCancelEventHandler(OnBeforeExpand);
            categoryTreeView.BeforeCollapse       += new TreeViewCancelEventHandler(OnBeforeCollapse);
            solutionNameTextBox.TextChanged       += new EventHandler(PathChanged);
            nameTextBox.TextChanged     += new EventHandler(PathChanged);
            locationTextBox.TextChanged += new EventHandler(PathChanged);

            if (createNewSolution)
            {
                createDirectoryForSolutionCheckBox.Checked         = CreateDirectoryForSolution;
                createDirectoryForSolutionCheckBox.CheckedChanged += delegate {
                    CreateDirectoryForSolution = createDirectoryForSolutionCheckBox.Checked;
                };
            }
            else
            {
                solutionNameTextBox.Visible = false;
                solutionNameLabel.Visible   = false;
                createDirectoryForSolutionCheckBox.Visible = false;
                bottomPanel.Height -= solutionNameTextBox.Height;

                createDirectoryForSolutionCheckBox.Checked = false;
            }

            largeIconsRadioButton.Checked         = PropertyService.Get("Dialogs.NewProjectDialog.LargeImages", true);
            largeIconsRadioButton.CheckedChanged += new EventHandler(IconSizeChange);
            largeIconsRadioButton.Image           = IconService.GetBitmap("Icons.16x16.LargeIconsIcon");

            smallIconsRadioButton.Checked         = !PropertyService.Get("Dialogs.NewProjectDialog.LargeImages", true);
            smallIconsRadioButton.CheckedChanged += new EventHandler(IconSizeChange);
            smallIconsRadioButton.Image           = IconService.GetBitmap("Icons.16x16.SmallIconsIcon");

            openButton.Click   += new EventHandler(TryCreateProject);
            browseButton.Click += new EventHandler(BrowseDirectories);
            createDirectoryForSolutionCheckBox.CheckedChanged += new EventHandler(PathChanged);

            ToolTip tooltip = new ToolTip();

            tooltip.SetToolTip(largeIconsRadioButton, StringParser.Parse("${res:Global.LargeIconToolTip}"));
            tooltip.SetToolTip(smallIconsRadioButton, StringParser.Parse("${res:Global.SmallIconToolTip}"));
            tooltip.Active = true;

            IconSizeChange(this, EventArgs.Empty);
        }