示例#1
0
        public PropertyCmdView(PropertyCall propertyCall, bool isNew)
        {
            InitializeComponent();

            if (isNew)
            {
                this.Text = Rekod.Properties.Resources.CMD_NewProgram;
            }
            else
            {
                this.Text = Rekod.Properties.Resources.CMD_SettingsProgram;
            }

            if (propertyCall == null)
            {
                return;
            }
            _propertyCall       = propertyCall;
            this.txtIcon.Text   = _propertyCall.Icon;
            this.txtFile.Text   = _propertyCall.File;
            this.txtTitle.Text  = _propertyCall.Title;
            this.txtParams.Text = _propertyCall.Params;

            this.pIcon.BackgroundImage = IconModule.GetIcon(txtIcon.Text, txtFile.Text).ToBitmap();
        }
示例#2
0
        private void btnFile_Click(object sender, EventArgs e)
        {
            var dial = new OpenFileDialog();

            if (dial.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            txtFile.Text = GetRelativePath(dial.FileName);
            this.pIcon.BackgroundImage = IconModule.GetIcon(txtIcon.Text, txtFile.Text).ToBitmap();
        }
示例#3
0
        private void AddConrolPanelTools(ICollection <PropertyCall> listPropertyCall)
        {
            if (listPropertyCall == null)
            {
                return;
            }
            var toolBar = Program.BManager.FindToolBar("TbFastStart");

            toolBar.ListButton.Clear();
            _listToolStripItem.Clear();
            foreach (var item in listPropertyCall.Reverse())
            {
                Icon          icon   = IconModule.GetIcon(item.Icon, item.File);
                ToolButton_VM button = new ToolButton_VM(toolBar, item.Title, ToolButton_Click);
                button.Image = (icon != null)
                            ? icon.ToBitmap()
                            : null;
                toolBar.ListButton.Add(button);
                _listToolStripItem.Add(button, item);
            }
        }